How to make a major or minor release - mne-tools/mne-python GitHub Wiki
Important
Before releasing, ensure all milestone issues and PRs are complete, or bump milestones if needed.
- Workflow-dispatch the scheduled updates action, then fix and merge the resulting PR.
- Workflow-dispatch the contributor credit action, then fix and merge the resulting PR.
- Versions more than four years old can be taken offline and archived as zips on the
docs-archiverelease of mne-data, linked from https://mne.tools/dev/old_versions/. To retireX.Y, in the site clone:Then add the link togit archive --format=zip --prefix=X.Y/ -o mne-python-docs-X.Y.zip origin/main:X.Y gh release upload docs-archive mne-python-docs-X.Y.zip --repo mne-tools/mne-data python -m docstacks delete X.Y python -m docstacks retitle 0.20 "≤ X.Y ..." --pushdoc/old_versions/index.rst.
- Add missing authors. Add anyone who will be missing from the author list (e.g., first-time contributors who did not (co)author any commits but contributed during review/iteration), because the next step builds that list from
git shortlog. NOTE: make sure things are clean / not in process before doing this:git commit --allow-empty --author="First last <[email protected]>" -m "Empty commit for credit"
- Build the changelog:
It runs
python tools/dev/finalize_changelog.py X.Y.Z
towncrier, writesdoc/changes/vX.Y.rst(with the version anchor,:newcontrib:entries first in each section, and anAuthorslist marking first-timers with+), and points the what's new toctree at it. It refuses to build, having written nothing, while any author has no link indoc/changes/names.inc-- that is a.mailmapgap between the commit identity and the credited name, and it prints the line to add.
- Update the supported version table in
SECURITY.md - Update the
backport-candidatelabel to saymaint/X.Y - Change button links
doc/install/installers.rstto point to the upcoming new installer files for all platforms.
These files are generated by MNE-Tools, from pyproject.toml plus the extra metadata in .extended_metadata.yaml. They should only be regenerated at release time.
- Edit
.extended_metadata.yamlto update thecompound_surnameslist (if needed, based on new contributors from the changelog). - Then install the
mne-toolsproject and run them, and stage the results:Both commands take the release version as a required argument, and default to today's date; passpython -m mne_tools.generate_codemeta . X.Y.Z python -m mne_tools.generate_citation . X.Y.Z
--date-modified YYYY-MM-DD/--release-date YYYY-MM-DDto override.
- Check the dev docs to make sure it looks OK, and check CircleCI to make sure it was green on the latest scheduled run. If it wasn't or there are problems, fix them before committing.
- ✨ Commit all changes with
[circle deploy]and push tomain(or open a PR)
- Use the GitHub feature "Releases" to make a new release. Use
vX.Y.Zfor all fields (version number, name, description), otherwise they get auto-populated with annoying things. The "target" of the release should bemain. This should automatically push to PyPI, which should then automatically trigger a conda-forge update.
- The release action opens an issue titled "@conda-forge-admin, please update version" on conda-forge/mne-feedstock as
mne-botonce the PyPI upload finishes, and the conda-forge bot answers it with a version-bump PR. Check that the PR appeared, then review it: at a minimumversionandsha256inrecipe/meta.yamlare updated automatically, but minimum dependency changes must be edited in by hand (e.g. this PR). If no issue was opened (e.g. the bot token expired), open it manually with that exact title.
- Update
mne-tools/mne-installers. In that repo, use for examplegit grep "1\.7\.[0-9]" -- ':!*.svg' doc/to go through and change toX.Y.Zand make a PR. - Release MNE-Installers with the new MNE-Python version. This makes the links go live on the websites when they deploy.
- Create and check out a new branch
maint/X.Ybased on currentupstream/main/ tagvX.Y.Z - Edit
pyproject.tomlto haveversion = "X.Y.Z" instead of "dynamic = ["version"]. - ✨ Commit with
[circle deploy]in the commit message and push: this builds theX.Y/docs and, becauseX.Yis newer than the currentstable, makes them the stable website (see below). - Retire CI on the previous stable branch so it stops building nightly:
git checkout maint/X.W && git rm .circleci/config.yml && git commit -m "Retire CircleCI on maint/X.W [ci skip]" && git push upstream maint/X.W. A later patch release of that series can restore it withgit checkout main -- .circleci/config.yml. - Check that https://mne.tools/stable/ is the new version and the switcher dropdown on both
stableand an old version (e.g. https://mne.tools/1.11/) listsX.Y (stable). - Run the switcher validation (the ignores are archives from before the pydata theme) and make sure it exits 0:
$ pip install "docstacks @ git+https://github.com/larsoner/docstacks@$(grep -o 'docstacks@[0-9a-f]*' .circleci/config.yml | cut -d@ -f2)" $ python -m docstacks validate https://mne.tools/versions.json --check-urls --check-match --ignore 0.20
- Restore dev.rst
cp doc/changes/dev.rst.template doc/changes/dev.rst git add doc/changes/dev.rst
- Add
../changes/dev.rstback into thetoctree::indoc/development/whats_new.rst - ✨ Commit and push to
mainwith[circle deploy]
- add a post in the Announcements category on Discourse. After posting, close it (so no replies allowed), then pin it globally.
- unpin the previous release announcement on Discourse.
- include update from steering council in release announcement
- Find all the deprecations that are slated to be removed in the now-current dev version, and open a PR to remove them with something like
make -C tools/dev dep, which willgit grepdeprecation andFutureWarning-related things for you.
- Check out the repo.
# make sure your ssh key + ssh config is configured for the remote repo, then: git clone ssh://git.debian.org/git/debian-med/python-mne.git cd python-mne uscan --verbose --force-download git import-orig --pristine-tar ../mne-python_XXX.orig.tar.gz dch -i # update changelog + eventually copyright is need files added
- Remove previous builds if they exist.
rm -r build rm mne/html/bootstrap.min.js rm debian/python-mne* rm -r debian/python-mne - Build the package.
git-buildpackage --git-verbose --git-ignore-new -uc -us --git-tag - If the build fails: make modifications, commit the patch and try building again:
dpkg-source --commit - Check conformity to debian build rules.
lintian -i python-mne*.changes cme fix dpkg-copyright # check formatting of copyright file
- Commit the release.
git push
- Check out
upstream/maint/1.10or similar - Update version number in
pyproject.toml - Manually take any
doc/changes/dev/*.rstand put indoc/changes/v1.10.rstunder a new1.10.1 (<date>)heading - Update links in
doc/install/installers.rst(knowing the next installer version number) - Update codemeta and citation:
python -m mne_tools.generate_codemeta . X.Y.Z python -m mne_tools.generate_citation . X.Y.Z
- Commit, push to
maint/1.10(e.g., 2efba964) - Cut a new release on GitHub making sure to use
maint/1.10as the target, not main! - Update conda-forge recipe (diff)
- Update mne-installers (bump, release, wait for release to finish, finalize release)
- Update installer links on
dev(andmaint/1.10if not done already)