-
Notifications
You must be signed in to change notification settings - Fork 52
How to make a release
Nicholas Tolley edited this page Aug 15, 2024
·
23 revisions
- Make sure all milestones are achieved or migrated to the next version
- Make sure the CI passes on master
- edit version in
__init__.py
andconf.py
... we useX.X
, ... andX.X.dev0
for development versions - edit
whats_new.rst
according to the schema that was used for previous releases (changelog, bug, api)- for releases, we also add an authors section (this is not present for the "current" section)
- run
git shortlog v0.3..HEAD --summary --numbered
(replace the version tag to the most recent version) to find contributor names for this release - manually add authors who have done a lot of work (reviewing, advising, ...) but don't show up in the shortlog because they did not submit PRs
- Then order the names alphabetically and add to the last section of the version-to-be-released's changelog
-
adjust(no longer building optimization examples for release docs)optimize_evoked.py
toplot_optimize_evoked.py
- update any URLs containing
dev
withstable
in README.rst. - Update
hnn-core/doc/_templates/navbar.html
to include a link the version being released
- from your PR branch first run
pip install -e .
and thenmake
andmake html
inside the doc/ folder and assert that all runs without errors- inspect the built docs for errors
- merge the PR into master using SQUASH and merge ... the release PR should be a single commit
- run
pip install -U setuptools wheel twine
to prepare for building the dist -
rm -rf hnn-core/hnn_core/mod/x86_64
to delete any pre-built mod files. They should not be distributed - run
python setup.py sdist
... archive the dist for distribution - Upload to test-pypi:
- upload to test-pypi
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
- inspect it
- Run
twine check
and make sure there are no errors - test it via
pip install --extra-index-url https://test.pypi.org/simple/ hnn-core[gui]
- you might want to do this install in a separate environment
- the
-vvv
flag and--no-cache-dir
flag might come in handy if it is not working as expected
- check that the README renders correctly on https://test.pypi.org/project/hnn-core/
- upload to test-pypi
- from master, branch off a
maint/0.4
branch (or whatever the version-to-be-released is) - push the
maint/0.4
branch to upstream - Build the docs by running the command
$ make html
in thedoc/
folder of themaint/0.4
branch or themaster
(they should both point to the same commit at this point). Copy thedoc/
directory and its contents to a location outside of the root~/hnn-core/
directory. The output will be stored in<outside_location>/doc/_build/html
- on the
gh-pages
branch:- add a new folder
v0.4
where you put the contents ofdoc/_build/html
with$ cp -r <outside_location>/doc/_build/html/* ~/hnn-core/v0.4/
- replace the contents of the
stable
folder with the contents ofdoc/_build/html
with$ cp -r <outside_location>/doc/_build/html/* ~/hnn-core/stable/
- this is effectively duplicating the
doc/_build/html
contents, but that's okay, and we want that - push all of this, so that it's upstream in jonescompneurolab's
gh-pages
branch
- add a new folder
- run
twine upload dist/*
to upload to pypi
- make an annotated tag for the version:
git tag -a -m "v0.4" v0.4 upstream/master
- push the tag to GitHub:
git push upstream v0.4
- use the GitHub feature "Releases" to make a new release on the newly pushed tag, e.g.
v0.4
. Usev0.4
for all fields (version number, name, description), otherwise they get auto-populated with annoying things. - close milestone on GitHub
- add
.dev0
to the version in__init__.py
andconf.py
- add a
current
section to the changelogwhats_new.rst
- adjust
plot_optimize_evoked.py
tooptimize_evoked.py
and update any URLs containingstable
withdev
in README.rst