autowisp.miscellaneous module
Collection of small utils that is hard to classify.
- autowisp.miscellaneous.get_code_version_str()[source]
Return a string identifying the version of the code being used.
For an installed package - which is not a git repository - returns the version string recorded at build time in
autowisp._version(seeautowisp/_write_version.py).When running from a git checkout with no build-generated version file, walks up from the caller’s file to the enclosing git repository, so the returned hash (with a
:dirtysuffix when the working tree has uncommitted changes) identifies the entire working tree that produced the call. This requires GitPython, which is only a build dependency, so when it is not installed a placeholder string is returned instead.