Skip to main content
https://img.shields.io/pypi/pyversions/bumpymcbumpface.svg https://img.shields.io/github/tag/cjrh/bumpymcbumpface.svg https://img.shields.io/badge/install-pip%20install%20bumpymcbumpface-ff69b4.svg https://img.shields.io/pypi/v/bumpymcbumpface.svg https://img.shields.io/badge/calver-YYYY.MM.MINOR-22bfda.svg

Bumpy McBumpface

TL,DR

To run:

/home/blah/myproject $ bumpymcbumpface --push-git --push-pypi

To get help:

/home/blah/myproject $ bumpymcbumpface -h
usage: bumpymcbumpface.py [-h] [--debug] [--show] [--dry-run] [--push-git]
                          [--push-pypi]
                          [{major,minor,patch}]

bumpymcbumpface - version-bump, tag, push, deploy

positional arguments:
  {major,minor,patch}

optional arguments:
  -h, --help           show this help message and exit
  --debug              Print debugging messages (default: False)
  --show               Show the current version and exit (default: False)
  --dry-run            Describe what would be done, and exit (default: False)
  --push-git           Push the new commit and tag to github (default: False)
  --push-pypi          Push the new built packages to PyPI (default: False)
/home/blah/myproject $

Overview

When doing a new release, I got real tired of doing these things by hand:

  1. Update the version number of my package

  2. Commit that change to git

  3. Create a git tag with the new version

  4. Push the tag (and the new commit) to github

  5. Build new distributable packages: wheel (.whl) and source dist (.tar.gz)

  6. Upload the new packages to pypi

Bumpy McBumpface will do these things, and will not ask questions.

Requirements

You need to have these:

  • A file called VERSION in your project root, with MAJOR.MINOR.PATCH numbers

  • git

  • twine (set up keyring so that twine won’t ask you for login/password)

  • pip

  • wheel

You probably SHOULD BE in master branch branch when you run, but you only need to be in a branch that has a valid remote.

Instructions

There are a several options, but only two important ones. By default, it will NOT do these things automatically:

  • Push to github

  • Deploy to PyPI

This is just so that it defaults to “safe” by not affecting anything beyond your computer during testing. To make it do these things too, run it like this:

$ bumpymcbumpface --push-git --push-pypi

Bumpy McBumpface assumes that your version number is in the following format:

MAJOR.MINOR.PATCH

where each of the three fields is an integer. This also works for calendar-based versioning. By default, the PATCH value will be increased by 1 if you run without arguments. These two are the same:

$ bumpymcbumpface --push-git --push-pypi
$ bumpymcbumpface --push-git --push-pypi patch

For a MINOR bump, change the word patch to minor. Likewise for major.

Now that you’re using a file called VERSION in your project root to store your version number, how do you get it into your setup.py? Just read it in, like this:

# setup.py
from os import path
from io import open  # For universal packages + py27

here = path.abspath(path.dirname(__file__))

setup(
    name='bumpymcbumpface',
    version=open(path.join(here, 'VERSION')).readline().strip(),
    ...
)

Good luck!

Metadata

Release files for bumpymcbumpface 0.2.3

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

Source distribution (sdist)

Source distribution for bumpymcbumpface 0.2.3
File Size Uploaded Provenance
bumpymcbumpface-0.2.3.tar.gz 6.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bumpymcbumpface 0.2.3
File Interpreter ABI Platform
bumpymcbumpface-0.2.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 23.2 kB

Release files / bumpymcbumpface-0.2.3.tar.gz

Download URL bumpymcbumpface-0.2.3.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bbe6c6245972a5fe1882aa106afd1c0d5d140b0aeebbe71c9ed8ee7bd0271667
BLAKE2b-256 checksum
How to use checksums
c7fde340d8b2fba83f880cab9485b5369c4ec802de5d7c07c2a450741762d5bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release files / bumpymcbumpface-0.2.3-py2.py3-none-any.whl

Download URL bumpymcbumpface-0.2.3-py2.py3-none-any.whl
Size 16.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7be7db6280b58cedfbba00e6806a686bf26e253c68493dc90e5f8f8851835ee7
BLAKE2b-256 checksum
How to use checksums
46a8e13e3e056b54a15c28c67184b0672fdddba17dfbae5f1ac10f7ab8c71b1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Security for bumpymcbumpface 0.2.3

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