-
Notifications
You must be signed in to change notification settings - Fork 63
Guide to Making A Release
Shannon Osborne edited this page Feb 4, 2020
·
12 revisions
This can probably be streamlined and automated...
Steps to follow:
Note, you probably will want to do all of the following for poppy
(if making a poppy release), then after that's done, do all of the following for webbpsf
.
- Pre-release checklist.
- Ensure the release notes have what you want in them,
- ensure all the issues you want closed are closed, and all the relevant PRs are merged,
- Update the data files, if necessary.
- If updating the webbpsf data files, do that using the scripts in
webbpsf/dev_utils/master_data_release.sh
. - Unzip the resulting zip file someplace. Manually set
$WEBBPSF_DATA_PATH
to that. Test that stuff works. - Update
webbpsf/__init__.py
to setDATA_VERSION_MIN
to that version.
- If updating the webbpsf data files, do that using the scripts in
- check all the tests pass,
- And check the 'latest' docs on Readthedocs build successfully and have what you want.
- Optional: Create release branch and get ready to release, following http://nvie.com/posts/a-successful-git-branching-model/
- Dec 2018 update: I think this is an outdated idea and not necessary right now? We haven’t so far been keeping persistent open branches for each version.
- Do the following:
-
git pull upstream
# ensure you have latest master! - Update version numbers
-
git tag -a “v1.2.3" -m "Release 1.2.3"
# This creates a local tag. Do not push it yet. - For webbpsf, in the data file download URLs in
docs/installation.rst
- PROBABLY UPDATE WEBBPSF’s setup.cfg TO DEPEND ON LATEST POPPY RELEASE TOO
-
- Run
python setup.py clean
-
- Run
python setup.py sdist
- This makes the ‘sdist’ zip file that will be uploaded to PyPI in a later step.
- Test installing from that file and make sure it works
cd dist
pip install <name of dist file>
python
>>> import poppy
-
>>> print(poppy.__path__, poppy.__version__)
# check these are as desired -
>>> poppy.test()
# checks functionality of the installed package >>> quit
cd ..
- Tag the release in git and Release on Github:
-
git commit -m “Release 1.2.3"
# If you already committed the update of version number above, this may be a null commit. git push upstream master
-
git push upstream v1.2.3
# This pushes that one tag upstream - Add a release via the Github web interface. See https://help.github.com/articles/creating-releases/
-
-
Release the package on PyPI.
- You need to have accounts on both PyPI and TestPyPI. Register there if you haven't already. An owner (admin) of webbpsf and poppy will need to add you to the list of maintainers there.
- Ensure you have twine installed and set up. See https://pypi.org/project/twine/
- Upload a test file to TestPYPI:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
- Look at test.pypi.org and verify things seem ok. https://test.pypi.org/project/poppy/ or https://test.pypi.org/project/webbpsf/
- Assuming the test does look good, run
twine upload dist/*
-
Release the updated docs
- Readthedocs should automatically build the latest docs from the push to GitHub. But verify this has taken place, and if necessary kick off a manual build.
-
Release the package via Astroconda
- For the astroconda-contrib repository, submit a PR updating the poppy, webbpsf, and webbpsf-data versions appropriately
- See https://github.com/astroconda/astroconda-contrib/tree/master/poppy, https://github.com/astroconda/astroconda-contrib/tree/master/webbpsf, https://github.com/astroconda/astroconda-contrib/tree/master/webbpsf-data
- These very simple PRs can be done just via the Github web interface
- Now you're done with the release, but not quite done. Time to get back into development mode.
- Undo the installation of the sdist and get back to develop mode:
python setup.py develop
- Edit
setup.py
and set the version number back to development mode for a higher-numbered release, e.g."1.2.4dev"
- Commit that edit. Now you might be done.
- Undo the installation of the sdist and get back to develop mode:
Send a triumphant email to webbpsf-users@maillist.stsci.edu! Brief is good - mention the highlights and link to the online doc release notes.