A Python utility to automagically update the package version from the git history and generate the Changelog
Pyhist is a Python utility to automagically update the package version from the git history and generate the Changelog. Inspired by the Conventional Commits specification, this tool inspects the commits history and calculates the new version.
- Init: initializes the pyhist from the current git history and creates a
.pyhistbinary file and creates a versioning commit with the initialization of the utility.
pyhist --init- Update: triggers the version update (minor and/or patch). The command inspects the changes applied to the git history from the previous version update and performs the following changes:
- Updates the version in the
setup.py - Generates a
Changelog.mdwith the content of the version updates (or appends the changes if previously created) - Updates the .pyhist
- Adds a versioning commit with the changes (i.e.
versioning: Set version to 1.3.7)
- Updates the version in the
pyhist --update- Major: triggers the version update in the major version. This command performs the equivalent steps to the update command.
pyhist --majorPyhist requires Python 3.7 or higher.
pip install pyhistgit clone https://github.com/jgoodman8/pyhist.git
cd pyhist
pip install -e .git clone https://github.com/jgoodman8/pyhist.git
cd pyhist
pip install -e .
pip install -e .[tests]
pytest pyhist/testsThis project is inspired by the Conventional Commits specification. Given this, we establish the following rules.
- Major update:
- Explicitly called using the
pyhist --majorcommand.
- Explicitly called using the
- Minor update:
feat
- Patch update:
fixdocstestchoreperfrefactorstyle