Skip to content

Release procedure

mrbean-bremen edited this page Dec 10, 2022 · 24 revisions

The pyfakefs package is in GitHub and on PyPi. The Pypi release is done automatically by the release workflow if a GitHub release is created.

This article shows how to prepare a release for pyfakefs (for maintainers only).

Creating a Release Branch

Decide on a new version "M.m.p" (e.g. 5.2.1) according to semantic versioning.

On your local computer, clone or pull branch main of pyfakefs. Check out a new branch version-M.m.p:

git checkout -b version-M.m.p

Edit CHANGES.md, replace the heading Unreleased with the new version and the current date:

## [Version M.mm.pp](https://pypi.python.org/pypi/pyfakefs/M.m.p) (20##-##-##)
Short description of the release purpose.

Make sure that pyfakefs/_version.py attribute __version__ is the correct version number:

__version__ = 'M.mm.p'

Make sure that pyfakefs/docs/conf.py attributes version and release are set correctly:

version = 'M.m.p'
release = 'M.m.p'

If needed, also adapt the year in the copyright attribute.

Git add, commit.

Push your branch to GitHub:

git push --set-upstream origin version-M.m.p

Wait until all tests in GitHub Actions are passed.

GitHub Release

On GitHub, go to Release.

Create a version tag of the format vM.m.p, where M.m.p is the version number.

Choose the previously release branch version-M.m.p.

Explain the contents of the release, and release it!

After the release, the release-deploy workflow is triggered, that will create a release on PyPI and create the release documentation on Read the Docs. Wait until the worklow is finished and check for any problems.

Prepare main for the next release

Return to branch main:

git checkout main
git pull

Edit CHANGES.md, adding the new release heading after the Unreleased heading. Edit pyfakefs/fake_filesystem.py attribute __version__ with the new version number M.nn.dev0, where nn=mm+1:

__version__ = 'M.nn.dev0'

Edit pyfakefs/docs/conf.py attributes version and release accordingly:

version = 'M.nn'
release = 'M.nn.dev'
Clone this wiki locally