Skip to main content

CI

Current version: 1.1.7

Tested with Python 3.8, 3,9, 3.10 and 3.11 on latest Linux, MacOS and Windows. Code is simple. Probably works in other versions and platforms.

Pypi: https://pypi.org/project/bumpytrack/
Github: https://github.com/nandilugio/bumpytrack

BumpyTrack

Bumping the (semantic) version of your software every time a release is done can be a tedious task, if you:

  • Have the version written in various files, e.g. setup.py or a dedicated version file.
  • Manage versioning with tags in GIT.

This little script automates this process for you.

Say you're using git-flow and you've just merged a feature to your development branch. You can just checkout and pull it, and then do:

bumpytrack minor  # or major if you have breaking changes, or patch if it's a simple bugfix

It will:

  • Replace the version string in all relevant files (see config below).
  • Commit those changes to GIT, taking care not to commit anything else (can be omitted).
  • Create a GIT tag for this new version (can be omitted).

Now you're free to push, merge to master and deploy!

git push
git push --tags

Unless you forgot something or bumped by mistake of course, in which case you can just undo the commit and tag created in Git by doing:

bumpytrack git-undo

For the above version string replacements we'll need some config. This example should be autoexplicative. Create a pyproject.toml or add your config to the one you already have in the root of your repository and you're good to go.

Installation

pip install bumpytrack

Then add a pyproject.toml to the root of your repository (if you don't already have it) and configure it like this.

Help

The script is really simple, and has a decent on-line documentation. Just do:

bumpytrack --help

Some of the available options:

  --current-version CURRENT_VERSION
                        force current version instead using version in config
                        file
  --new-version NEW_VERSION
                        force new version instead using version in config file
  --git-commit          Git: Commit files with version replacements
  --no-git-commit
  --git-tag             Git: Tag this reference with the new version
  --no-git-tag
  --config-path CONFIG_PATH
                        path to config file. Defaults to pyproject.toml in
                        current directory
  --verbose

You can also just peek at the code. Not much of it... it just adds one to some little numbers ;p

Contributing

Make sure you have the lastest pip and pipenv versions:

pip install --upgrade pip pipenv

To start developing, start the environment by:

pipenv shell
pipenv install -d

The installed bumpytrack within the pipenv environment is the editable (alla pip install -e .) version of the package, so you can manually test right away.

This tool uses both pipenv for development and setuptools for packaging and distribution. To this date there is not a 100% community-accepted best practice so I've taken this approach. In summary:

To add an application dependency, add it in setup.py and leave it with a loose version definition. Then, just do pipenv install -e . to install the dependency. Pipenv locking mecanism will work as expected, since bumpytrack itself in in the [packages] section of Pipfile (check Pipfile.lock and you'll find the deps there).

To add a development dependency, add it to Pipfile via pipenv install -d <my-dependency>.

This way there's a single source of truth for package definition. No need to repeat the deps in setup.py and Pipfile*.

Tests

To test the project run pytest inside the pipenv. Once you have something running, run tox to check it's compatible with all python versions supported.

IMPORTANT: in order to make tox test with different python versions, those have to be installed. pyenv is used for that purpose and should work out of the box. Check the required versions in tox.ini and related files.

Dev tasks automation and publishing to PyPI

This project uses pepython for automation. There you'll find tasks to build and publish the package to PyPI.

Check the project out and the tasks.py file for more info.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for bumpytrack 1.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bumpytrack 1.1.7
File Size Uploaded Provenance
bumpytrack-1.1.7.tar.gz 7.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bumpytrack 1.1.7
File Interpreter ABI Platform
bumpytrack-1.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 15.4 kB

Release files / bumpytrack-1.1.7.tar.gz

Download URL bumpytrack-1.1.7.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fdfe3fa148d0691ba8d4c2a485233b12f3bef05145df2ce4d2e496750b79c9ca
BLAKE2b-256 checksum
How to use checksums
efc7145130c2ffa3d64786114e9d370e89840996e369ca71d8e008bbc4fa1234
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / bumpytrack-1.1.7-py3-none-any.whl

Download URL bumpytrack-1.1.7-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb204b00b68e7e7e5d21c0b54d3956009f56e60290fd979297ab6aa86b6510e6
BLAKE2b-256 checksum
How to use checksums
90f8ebfb83282340c8fa3ed440af13cdad61a2a21f28babf1832f1b00728f1e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for bumpytrack 1.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page