git_hash
- PlasmaCalcs.tools.history.git_hash(module_or_path='.', *, default=UNSET)
returns the git commit hash for current git HEAD at the provided module or path.
if string, treat it as a path; if module object, use path to module.__file__.- module_or_path: string or module object, default ‘.’
- place to get git hash from.string –> path=module_or_path. If not a directory, also try os.path.dirname(path)module –> module=module_or_path. path=os.path.dirname(module.__file__)
- default: any object
- if provided, and can’t get hash, return default & print message.