-
Notifications
You must be signed in to change notification settings - Fork 32
Release Procedure
These are the instructions for finalizing a new version/release of pvanalytics. This is inspired by, and a simpler version of, pvlib's equivalent: https://github.com/pvlib/pvlib-python/wiki/Release-procedures
Sometimes issues and PRs accidentally get omitted from milestones; it's nice to review the list of closed issues and PRs and make sure nothing got missed.
Oftentimes there is some minor cleanup necessary before the package is actually ready to be released. We typically open a "vX.Y.Z" PR for whatever miscellaneous items need to be done. See examples for previous versions here: https://github.com/pvlib/pvanalytics/issues?q=label%3Arelease
Common to-do items:
- Ensure the "what's new" page for this version is ready to go, including:
- Correct release date
- Contributors list is complete, not forgetting people that created or commented on issues and PRs
- No RST errors (backticks, etc)
- Check that the ReadTheDocs build log doesn't have any unexpected warnings/errors (RST syntax, indirect dependency compatibility issues, etc)
- Create an empty/template whatsnew file for the next version (take your best guess what the next version will be; can always change it later)
Usually this PR is the last one you merge before making the release.
Make the GitHub release using the releases page. The tag should be e.g. v0.1.1
(including the v
). The title is Version 0.1.1
. The description can be a link to the version-specific whats new section on readthedocs. To help the link remain valid in the long term, you can link not just to the specific whatsnew section, but also to the version of the docs themselves (e.g. if you're releasing v0.1.1, link to v0.1.1
instead of stable
). Note that this URL won't actually be valid until after the release is tagged and RTD builds the new version. Here's an example link: https://pvanalytics.readthedocs.io/en/v0.1.1/whatsnew/0.1.1.html
Once you make the release, GitHub Actions will automatically build the package and push it to PyPI. You can monitor its progress and make sure it completes successfully here: https://github.com/pvlib/pvanalytics/actions/workflows/pythonpublish.yml
Once the upload is complete, you should see the new version and distribution files displayed on our PyPI page: https://pypi.org/project/pvanalytics/#files
If things went south, you can also build the dist and upload it to PyPI manually. See pvlib's docs: https://github.com/pvlib/pvlib-python/wiki/Release-procedures#manual-upload-to-pypi
Once it's on PyPI, create and activate a fresh virtual environment (e.g. conda create -n pvanalytics-release-test python=3.7
, conda activate pvanalytics-release-test
), install the new version (pip install pvanalytics
), and make sure the installation results in a valid package (python -c "import pvanalytics"
). It's also a good idea to verify that it passes the test suite. You can do the same with pvanalytics[optional]
if you like.
The Zenodo integration should automatically detect and import the new version. You can verify that it worked by going here: https://doi.org/10.5281/zenodo.6110569