-
Notifications
You must be signed in to change notification settings - Fork 84
How to make a release
Mainak Jas edited this page Oct 31, 2019
·
6 revisions
[Inspired by mne-bids]
- Make sure all milestones are achieved or migrated to the next version
- Make sure the CI passes on master
- edit version in
__init__.py... we useX.X, ... andX.X.dev0for development versions - edit
whats_new.rstaccording 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.1..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
- merge the PR into master using SQUASH and merge ... the release PR should be a single commit
- from your PR branch first run
pip install -e .and thenmakeandmake build-docand assert that all runs without errors- inspect the built docs for errors
- run
pip install -U setuptools wheel twineto prepare for building the dist - run
python setup.py sdist bdist_wheel... build the dist - Upload to test-pypi:
- upload to test-pypi
twine upload --repository-url https://test.pypi.org/legacy/ dist/* - inspect it
- test it via
pip install --index-url https://test.pypi.org/simple/ pyglmnet- you might want to do this install in a separate environment
- the
-vvvflag and--no-cache-dirflag might come in handy if it is not working as expected
- upload to test-pypi
- from master, branch off a
maint/0.2branch (or whatever the version-to-be-released is) - push the
maint/0.2branch to upstream - Build the docs by running the command
$ make installin thedoc/folder of themaint/0.2branch or themaster(they should both point to the same commit at this point)
- run
twine upload dist/*to upload to pypi
- make an annotated tag for the version:
git tag -a -m "v0.2" v0.2 upstream/master - push the tag to GitHub:
git push upstream v0.2 - use the GitHub feature "Releases" to make a new release on the newly pushed tag, e.g.
v0.2. Usev0.2for all fields (version number, name, description), otherwise they get auto-populated with annoying things. - close milestone on GitHub
- add
.dev0to the version in__init__.py - add a
currentsection to the changelogwhats_new.rst