Skip to main content

Modeltee is a tool to automate software releases.

I find that release time often involves several manual steps: remember to update the version number in several places, commit, make a clean build, upload, make and push a git tag…

Why a new tool? I could automate all that with a shell script. Modeltee lets you:

  • Define a reusable release procedure and subclass that for different projects.

  • Automatically check for required tools before starting a release.

  • Share components which can add checks and information.

Install it with:

pip install modeltee

You define a release process as a subclass of modeltee.ReleaserBase. There are five steps you can control.

  1. Automated checks (check_prereqs): check that e.g. git is installed. The base method runs checks from components you’re using. If you override it, it’s recommended to call it using super().

  2. Manual confirmation (user_confirm): present information to the user, and give them an opportunity to cancel. The base method presents information provided by components you’re using.

  3. Steps before release (before_release): you might want to set the version number, make a clean build, give the tests a final run…

  4. The release itself (do_release): upload and tag the release. This is the one step you must define.

  5. Steps after release (after_release): e.g. set the version number to x+1.dev.

A simple releaser for a Python package might look like this:

from modeltee import ReleaserBase, Command, Bumpversion, Git
import sys

class Releaser(ReleaserBase):
    # These are components: they define checks to run before starting and
    # info to present, as well as providing shortcuts to use below.
    git = Git()
    twine = Command('twine')
    python = Command(sys.executable)
    bumpversion = Bumpversion()

    def before_release(self):
        self.bumpversion('--new-version', self.version, 'minor')
        self.python('setup.py', 'sdist')
        self.git('commit', '-am', 'version number -> {}'.format(self.version))
        self.git('push')

    def do_release(self):
        self.twine('upload', 'dist/foo-{}.tar.gz'.format(self.version))
        self.git('tag', str(self.version))
        self.git('push', '--tags')

if __name__ == '__main__':
    Releaser.main()

And you’d run it like this:

./release.py 1.3

Modeltee is named after the Ford Model T, one of the first cars to be mass produced on an assembly line.

Metadata

Release files for modeltee 0.1.1

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

Source distribution (sdist)

Source distribution for modeltee 0.1.1
File Size Uploaded Provenance Actions
modeltee-0.1.1.tar.gz 4.7 kB Without provenance Details for modeltee-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 13.6 kB

Release files / modeltee-0.1.1.tar.gz

Download URL modeltee-0.1.1.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
76c2a99adbee9754d695453c9309934228f7095e2cd0dd7111e74cdccd08dd44
BLAKE2b-256 checksum
How to use checksums
4122883a8afdb8bd4e94b1b7d2678c94456de5d24b7ca18004846ba25bc530e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / modeltee-0.1.1-py3-none-any.whl

Download URL modeltee-0.1.1-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45327a522009a1594946fee2d652fb38e6d75e09c76cd0571f743bc89c688529
BLAKE2b-256 checksum
How to use checksums
35a9c3467ae34225c7b52061f488029bb9663935668aee6fb32302027a4b28bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for modeltee 0.1.1

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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