Skip to main content

Simplified releases using GitHub Issues

Project description

fastrelease

Auto-generated tagged releases, and release notes (from GitHub issues).

fastrelease provides two commands that you can run from your shell:

  • nbdev_changelog: creates a CHANGELOG.md file from closed and labeled GitHub issues
  • nbdev_tag_release: tags and creates a release in GitHub for the current version.

Be sure to check out the full documentation at fastrelease.fast.ai. Here's a brief demonstration of how to use fastrelease. This demo first creates an issue using the gh command line tool, and then closes it using git; you can also use GitHub's web interface for both of these tasks.

Install

fastrelease has only one small prerequisite (fastcore) and will run on Python 3.6 or later. You can install from pip:

pip install fastrelease

...or conda:

conda install -c fastai fastrelease

How to use

Set up

First, create a settings.ini file with the following contents (replacing the values as described below):

[DEFAULT]
lib_name = fastrelease
user = fastai
version = 0.0.1

Set lib_name to the name of GitHub repo, user to the owner of that repo, and version to the version number of your library. (Note that if you use nbdev then you'll already have this information, so you don't need to do anything further to set it up.)

You'll need to get a GitHub personal access token if you haven't already. To do so, click here and enter "fastrelease" in the "Note" section, and click the repo checkbox.

Then click "Generate Token" at the bottom of the screen, and copy the token (the long string of letters and numbers shown). You can easily do that by clicking the little clipboard icon next to the token.

Copying your token

Paste that token into a file called token into the root of your repo. You can run the following in your terminal (cd to the root of your repo first) to create that file:

echo XXX > token

Replace XXX above with the token you copied. Also, ensure that this file isn't added to git, by running this in your terminal:

echo token >> .gitignore

Creating release notes

Now you're ready to create your release notes. These are created in a file called CHANGELOG.md. Here's an example of what it creates: nbdev CHANGELOG.

All issues with the label bug, enhancement, or breaking that have been closed in your repo since your last release will be added to the top of this file. If you haven't made any releases before, then all issues with those labels will be included.

Therefore, before you create or update CHANGELOG.md, go to your GitHub issues page, remove is:open from the filter, and label any issues you want included with one of the labels above. When you've done that, you can create or update your release notes by running in your terminal:

fastrelease_changelog

The titles and bodies of each issue will be added. Open CHANGELOG.md in your editor and make any edits that you want, and then commit the file to your repo (remember to git add it!)

Tagging a release

You should now tag a release. This will create a tag in GitHub with your current version number in settings.ini, and will then make it into a release, using your latest release notes as the description of the release:

fastrelease_release

After you run this, be sure to increment your version number in settings.ini. You can either edit it manually, or if you use nbdev it can be done for you by running:

nbdev_bump_version

Doing both (creating release notes, and tagging a release)

To complete both of the steps above, run:

fastrelease

See the screencast above for a demonstration of this.

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

fastrelease-0.1.13.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastrelease-0.1.13-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file fastrelease-0.1.13.tar.gz.

File metadata

  • Download URL: fastrelease-0.1.13.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.64.0 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

File hashes

Hashes for fastrelease-0.1.13.tar.gz
Algorithm Hash digest
SHA256 9f0637bf0482dc2bdc763d7720df5d6e3509c84d219cffd6d18eb46a4d9f1542
MD5 9674899b5e8eeff179aa246c4105b386
BLAKE2b-256 3dd8ad862819c1bbd908f2341b05cb5ab20579c1a7da07ccc724a77544eaf497

See more details on using hashes here.

File details

Details for the file fastrelease-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: fastrelease-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.64.0 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

File hashes

Hashes for fastrelease-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 a1857d25c6ff16a9acd7e57daa7d1bc50603ed77acb4e22284be18e64e63f727
MD5 a4b6b0a80f4fa0944ad26c75f84f78a1
BLAKE2b-256 3eec161c1fa460ffee4735f29df75a3e59f94ca5986185fce56ef3b71f790c57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page