print a one-list summary of the current git repository, the current branch, and the hash for the current head
Project description
gitsummary
Pure python utility to print a one-line summary of the current git repository, the current branch, and the hash for the current head.
Installation
pip install gitsummary
Usage
import gitsummary
gitsummary.print_cwd_git_version()
returns a string containing the current git repository, the current branch, and the hash of the branch head. This information is useful in scientific codes to quickly determine the origin of a plot or dataset. The string can, for example, be written in a jupyter notebook or placed in the metadata of a netcdf file.
The git repository is reported as final portion of the URL of the remote 'origin'. If there is no remote named origin, it uses the full path on disk to the .git directory.
License
This project is licensed under the terms of the MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gitsummary-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb3c30974bac6a53da3effdaeb409599868c6a565e7106b9fbeedfe41914f9c7 |
|
MD5 | 36c67dcb37211a7e8454c28473a91f19 |
|
BLAKE2b-256 | 2ada5ffd024955e19088cf14d6eca5d4d564e133dcb327ffdddb17d78ced7066 |