-
Notifications
You must be signed in to change notification settings - Fork 1.3k
How to make a major or minor release
Detailed instructions here but the basic steps are:
- Using an editable install of the website theme, build docs locally against current
HEAD
of the theme, and find the newest commit that still looks good with our site - update the website theme pin in our
pyproject.toml
.
- Fix other milestone issues and PRs.
- Check dev-docs build to make sure they look OK, and check CircleCI to make sure the most recent build was green. NOTE: If any PRs were merged since the most recent overnight run of
build-dev-docs
, you may need to run a[circle deploy]
to get the docs up-to-date with the desired state of the code at release time. - Manually update counts in
docs/cited.rst
- Squash all website commits since the last release:
$ git reset --soft 3c7b371fc5 # find the appropriate hash, should be the previous "Archive X-1.Y" commit $ git commit -am "X.Y Squash" $ cp -a stable X.W # the previous stable version $ git add X.W/* $ git commit -m "Archive X.W" $ git push origin -f main
-
Generate author list (note there is a version number in this command, be sure to update it):
git shortlog -s --group=author --group=trailer:co-authored-by HEAD...v1.6.0 | sed "s/^ *[0-9]* *\t*/* /"
Using the --group option in
git shortlog
is important to capture "co-authored-by", and requires git 2.29+ (if your git is older than that, there is an official git PPA for debian-like systems). -
Add missing authors. Add anyone missing from the author list (e.g., first-time contributors who did not (co)author any commits but contributed during review/iteration). NOTE: make sure things are clean / not in process before doing this:
git commit --allow-empty --author="First last <use.git.log.pipe.grep.name@to.find.email.com>" -m "Empty commit for credit"
-
Ensure full names for all authors. If there are authors without full names, check if they already exist in
doc/changes/names.inc
; if so, update.mailmap
to map their full name to their alias. If they're not yet indoc/changes/names.inc
, use the--email
option in thegit shortlog
command above to get their email address and ping them to ask if they want to provide a full name and URL; when they do, update.mailmap
anddoc/changes/names.inc
. -
Deduplicate authors. Check the list for duplicate names (e.g., Alex Gramfort and Alexandre Gramfort) and deduplicate by adding more
.mailmap
entries. -
Add "authors" section to
doc/changes/devel.rst
. Rerun thegit shortlog
command above to generate the final list. Look at previous files (doc/changes/1.0.inc
) for formatting example. Run make codespell and add any violating names toignore_words.txt
. -
Highlight new contributors. Manually add + symbols next to new contributors in the list, and make sure their entries are properly formatted. Some users will not be associated with a given pull request / have a
:newcontrib:
entry --git grep <name>
can tell you if it's their first time contributing. -
Update changelog title and shortcut. At the top of
doc/changes/devel.rst
Change "Current" to "Version X.Y.Z (YYYY-MM-DD)", replacing X.Y.Z with the release version being prepared, and YYYY-MM-DD with the release date. Also change.. _current:
to.. _changes_X_Y_Z:
. -
Rename changelog file.
git mv doc/changes/devel.rst doc/changes/vX.Y.rst
-
Update
doc/development/whats_new.rst
to point toX.Y.inc
instead ofdevel.rst
- In mne-python, update
doc/_static/versions.json
to add an entry and updated stable/devel. - Update the supported version table in
SECURITY.md
- Edit
tools/generate_codemeta.py
to update thecompound_surnames
variable (if needed, based on new contributors from the changelog). - Then run
python tools/generate_codemeta.py X.Y.Z
to update the codemeta metadata and CITATION.cff files for this release, and stage them:git add codemeta.json CITATION.cff
- If you have been committing along the way, squash your commits. Otherwise commit all changes made so far
- Push to
upstream main
(or merge in your "prep for release" PR)
- Use the GitHub feature "Releases" to make a new release. Use
vX.Y.Z
for 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.
- Create and check out a new branch
maint/X.Y
based on currentupstream/main
/ tagvX.Y.Z
- Edit
.circleci/config.yml
to change names "build_docs_main" to "build_docs_stable", change the workflow name from "main" to "stable", change the branch filter frommain
to/maint\/.*/
(regex), and change the scheduled build time to 4 AM GMT (e.g., this commit, which also contains the following step as well). - Edit
pyproject.toml
to haveversion = "X.Y.Z" instead of "dynamic = ["version"]
. Push. - Check out the previous stable branch (
maint/X.Y-1
ormaint/X-1.Y
) and remove the "stable" workflow from.circleci/config.yml
. Commit and push this to the appropriatemaint/X-1.Y
branch with[ci skip]
in the commit message.
- Update conda-forge/mne-feedstock. This will eventually happen automatically (example here, but you can speed things up by opening a manual pull request. At a minimum, you must update
version
andsha256
inrecipe/meta.yaml
; other additions will depend on what has changed for the project (e.g., minimum dependency versions). You can get the sha sum fromsha256 dist/mne-X.Y.Z.tar.gz
(with X.Y.Z subsituted for the real version number, of course)
- Restore latest.inc.
Now edit the version number in it, and add it (back) to the list of
cp doc/changes/latest.inc.template doc/changes/latest.inc git add doc/changes/latest.inc
include
s indoc/whats_new.rst
- Commit and push to
main
- Update MNE Installers. Here is an example PR
- Update documentation links to installers. Change button links
doc/install/installers.rst
to point to the new installer files. Make sure to update links for all 3 platforms. Push this change to bothmaint/X.Y
andmain
, with commit message[circle deploy]
.
- email mne_analysis@nmr.mgh.harvard.edu
- add a post in the Announcements category on Discourse
- announce on Discord
- do something like
git grep deprecat -- ':!*.js' mne/
, find all the deprecations that are slated to be removed in the now-current dev version, and open a PR to remove them.
- 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.*
```bash
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