This guide documents
napari’s release process.
Currently, it only handles distribution, but as the project matures,
it will include generating release notes, documentation, etc.
This is mainly meant for the core developers who will actually be performing the release.
They will need to have a PyPI account with upload permissions to the
You will also need the additional
release dependencies (
pip install -e .[release]) to complete the release process.
MANIFEST.indetermines which non-Python files are included. Make sure to check that all necessary ones are listed before beginning the release process.
napari/napari repository must have a PyPI API token as a GitHub secret.
This likely has been done already, but if it has not, follow
this guide to gain a token and
to add it as a secret.
Determining the version¶
The version of
napari is automatically determined at install time by
setuptools_scm from the latest
git tag beginning with
v. Thus, you’ll need to tag the
the new version number. It is likely something like
X.Y.Z. Before making a
release though we need to generate the release notes.
Generating release notes¶
Make a list of merges, contributors, and reviewers by running
python docs/release/generate_release_notes.py -hand following that file’s usage. For each release generate the list to include everything since the last release for which there are release notes (which should just be the last release). For example making the release notes for the
0.2.1release can be done as follows:
python docs/release/generate_release_notes.py v0.2.0 main --version 0.2.1 | tee docs/release/release_0_2_1.md
Scan the PR titles for highlights, deprecations, API changes, and bugfixes, and mention these in the relevant sections of the notes. Try to present the information in an expressive way by mentioning the affected functions, elaborating on the changes and their consequences. If possible, organize semantically close PRs in groups.
Make sure the file name is of the form
Make and merge a PR with these release notes before moving onto the next steps.
Update translation strings¶
As new code is included in the codebase, some of the strings that need to be translated might
not yet be using the
trans methods. To help keep the codebase up to date in terms
of translations we added a test script that
runs daily on CI
and can be also run locally to ensure that a release includes the most up to date translatable
The test script is available on the
/tools/test_strings.py file and it relies on an additional
/tools/strings_list.py to include strings to skip safely from translation.
The test checks:
Untranslated strings: not using the
Outdated skip strings: should no longer be included in the
Translation usage errors: where translation strings may be missing interpolation variables.
You can execute tests locally from the repository root, and follow the instructions printed
stdout if any test fails.
pytest tools/ --tb=short
Tagging the new release candidate¶
First we will generate a release candidate, which will contain the letters
Using release candidates allows us to test releases on PyPI without using up the actual
You can tag the current source code as a release candidate with:
git tag vX.Y.Zrc1 main
If the tag is meant for a previous version of main, simply reference the specific commit:
git tag vX.Y.Zrc1 abcde42
Note here how we are using
rc for release candidate to create a version of our release we can test
before making the real release.
You can read more on tagging here.
Testing the release candidate¶
Our CI automatically makes a release, copying the release notes to the tag and uploading the distribution to PyPI.
You can trigger this by pushing the new tag to
git push upstream --tags
The release candidate can then be tested with
pip install --pre napari
It is recommended that the release candidate is tested in a virtual environment in order to isolate dependencies.
If the release candidate is not what you want, make your changes and repeat the process from the beginning but
incrementing the number after
rc on tag (e.g.
Once you are satisfied with the release candidate it is time to generate the actual release.
Generating the actual release¶
To generate the actual release you will now repeat the processes above but now dropping the
git tag vX.Y.Z main git push upstream --tags