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 (see autowisp/_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 :dirty suffix 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.

autowisp.miscellaneous.get_hat_source_id_str(source_id)[source]

Return the string representation of 3-integer HAT-id.