API for auto-generated tagged releases, and release notes (from GitHub issues)

find_config[source]

find_config(cfg_name='settings.ini')

class FastRelease[source]

FastRelease(owner=None, repo=None, token=None, **groups)

To create a markdown changelog, first create a FastRelease object, optionally passing a mapping from GitHub labels to markdown titles. Put your github token in a file named token at the root of your repo. FastRelease attempts to fetch values for arguments from the following locations if not supplied:

  • owner: fetched from the field user in settings.ini. This is the owner name of the repository on GitHub. For example for the repo fastai/fastcore the owner would be fastai.
  • repo: fetched from the field lib_name in settings.ini. This is the name of the repository on GitHub. For example for the repo fastai/fastcore the owner would be fastcore.
  • token: fetched from a file named token at the root of your repo. Creating a token is discussed in the setup section.
  • groups: (optional) fetched from the field label_groups in settings.ini, which is a JSON string. This is a mapping from label names to titles in your release notes. If not specified, this defaults to:
{"breaking": "Breaking Changes", "enhancement":"New Features", "bug":"Bugs Squashed"}
rel = FastRelease()

FastRelease.changelog[source]

FastRelease.changelog(debug=False)

Create the CHANGELOG.md file, or return the proposed text if debug is True

All relevant pull requests and issues are fetched from the GitHub API, and are categorized according to a user-supplied mapping from labels to markdown headings.

 

FastRelease.release[source]

FastRelease.release()

Tag and create a release in GitHub for the current version

This uses the version information from your settings.ini.

CLI functions

fastrelease_changelog[source]

fastrelease_changelog(debug:"Print info to be added to CHANGELOG, instead of updating file"=False)

Create a CHANGELOG.md file from closed and labeled GitHub issues

fastrelease_release[source]

fastrelease_release(token:"Optional GitHub token (otherwise token file is used)"=None)

Tag and create a release in GitHub for the current version

fastrelease[source]

fastrelease(debug:"Print info to be added to CHANGELOG, instead of updating file"=False, token:"Optional GitHub token (otherwise token file is used)"=None)

Calls fastrelease_changelog, lets you edit the result, then pushes to git and calls fastrelease_release

bump_version[source]

bump_version(version, part=2)

test_eq(bump_version('0.1.1'   ), '0.1.2')
test_eq(bump_version('0.1.1', 1), '0.2.0')

fastrelease_bump_version[source]

fastrelease_bump_version(part:"Part of version to bump"=2)

Increment version in settings.py by one