Skip to content

How to make a patch release

Eric Larson edited this page Jun 6, 2023 · 6 revisions

update changelog

  • anything that has been backported, copy over its what's new entry from doc/changes/latest.inc on main into a new patch release section in doc/changes/X.Y.inc on maint/X.Y branch. The new section for the patch release should mirror the structure of the minor release notes, i.e., for patch release Z add something like this to the top of doc/changes/X.Y.inc:

    .. _changes_X_Y_Z:
    
    Version X.Y.Z (YYYY-MM-DD)
    --------------------------
    
    Bugs
    ----
    - Fix bug in the ``.whatever()`` where something was wrongly computed for some inputs (:gh:`00000` by `Some Contributor`_)

check stable website

  • If the most recent commit to the stable branch wasn't deployed, push an empty commit to deploy it: git commit --allow-empty -m '[circle deploy]'. Check CircleCI that it succeeds (use the branch dropdown to select the appropriate branch, e.g., maint/1.2).

update the version string

  • In mne/setup.py change os.environ["SETUPTOOLS_SCM_PRETEND_VERSION"] = "X.Y.Z" to X.Y.Z+1

update codemeta and citation

  • run cd tools/ && python generate_codemeta.py && cd - to update the codemeta metadata and CITATION.cff files for this release, and stage them: git add codemeta.json CITATION.cff

commit and push

  • If you have been committing along the way, squash your commits. Otherwise commit all changes made so far
  • Push to upstream maint/X.Y (or merge in your "prep for patch release" PR)

make a release tag

  • 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 be maint/X.Y.

package for PyPI

  • empty the dist/ folder (in case you have wheels left from prior releases).
  • create wheel and source dist. python setup.py sdist bdist_wheel
  • test the wheel.
    $ pip uninstall mne
    $ pip install dist/mne-*-py3-none-any.whl
    # [output omitted]
    $ pushd ~; python -c "import mne; mne.sys_info()" | grep mne; popd
  • upload to TestPyPI. twine upload dist/* --repository testpypi --verbose
  • upload to Real PyPI. twine upload dist/* --verbose

package for Conda

  • 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 and sha256 in recipe/meta.yaml; other additions will depend on what has changed for the project (e.g., minimum dependency versions). You can get the sha sum from sha256 dist/mne-X.Y.Z.tar.gz (with X.Y.Z subsituted for the real version number, of course).

update MNE Installers

  • 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 both maint/X.Y and main, with commit message [circle deploy].