| 1 |
Guidelines for Releasing PyWavelets |
| 2 |
=================================== |
| 3 |
|
| 4 |
The following are guidelines for preparing a release of PyWavelets. The |
| 5 |
notation ``vX.X.X`` in the commands below would be replaced by the actual release |
| 6 |
number. |
| 7 |
|
| 8 |
|
| 9 |
Updating the release notes |
| 10 |
-------------------------- |
| 11 |
|
| 12 |
Prior to the release, make sure the release notes are up to date. The author |
| 13 |
lists can be generated via:: |
| 14 |
|
| 15 |
python ./util/authors.py vP.P.P.. |
| 16 |
|
| 17 |
where ``vP.P.P`` is the previous release number. |
| 18 |
|
| 19 |
The lists of issues closed and PRs merged can be generated via |
| 20 |
(script requires Python 2.X to run):: |
| 21 |
|
| 22 |
python ./util/gh_lists.py vX.X.X |
| 23 |
|
| 24 |
|
| 25 |
Tag the release |
| 26 |
--------------- |
| 27 |
|
| 28 |
Change ``ISRELEASED`` to ``True`` in ``setup.py`` and commit. |
| 29 |
|
| 30 |
Tag the release via:: |
| 31 |
|
| 32 |
git tag -s vX.X.X |
| 33 |
|
| 34 |
Then push the ``vX.X.X`` tag to the PyWavelets GitHub repo. |
| 35 |
|
| 36 |
Build Windows, OS X and Linux wheels and upload to PyPI |
| 37 |
------------------------------------------------------- |
| 38 |
|
| 39 |
Pushing the vX.X.X tag to the repository will kick off automated build and |
| 40 |
deployment of the wheels to PyPI. The wheel builds proceed via GitHub Actions |
| 41 |
and their status can be checked by going to the Actions tab on GitHub. |
| 42 |
|
| 43 |
In the event that the automated deployment fails, the built wheels can be |
| 44 |
downloaded via the GitHub Actions artifacts and then uploaded manually using |
| 45 |
twine as described below. |
| 46 |
|
| 47 |
Create the source distribution |
| 48 |
------------------------------ |
| 49 |
|
| 50 |
The automated wheel build process should also automatically upload the sdist |
| 51 |
to PyPI. In the event that automated upload of the sdist fails, please proceed |
| 52 |
in generating and uploading it manually as described in this section. |
| 53 |
|
| 54 |
Remove untracked files and directories with ``git clean``. |
| 55 |
*Warning: this will delete files & directories that are not under version |
| 56 |
control so you may want to do a dry run first by adding -n, so you can see what |
| 57 |
will be removed*:: |
| 58 |
|
| 59 |
git clean -xfdn |
| 60 |
|
| 61 |
Then run without ``-n``:: |
| 62 |
|
| 63 |
git clean -xfd |
| 64 |
|
| 65 |
Create the source distribution files via:: |
| 66 |
|
| 67 |
python setup.py sdist --formats=gztar,zip |
| 68 |
|
| 69 |
|
| 70 |
Upload the release to PyPI |
| 71 |
-------------------------- |
| 72 |
|
| 73 |
These instructions cover how to upload wheels and source distributions to PyPI |
| 74 |
in the event that the automated deployment fails. The binary Windows wheels downloaded from GitHub Actions (see above) should also be placed into the |
| 75 |
``/dist`` subfolder along with the sdist archives. |
| 76 |
|
| 77 |
The wheels and source distributions created above can all be securely uploaded |
| 78 |
to pypi.python.org using twine:: |
| 79 |
|
| 80 |
twine upload -s dist/* |
| 81 |
|
| 82 |
Note that the documentation on ReadTheDocs (http://pywavelets.readthedocs.org) |
| 83 |
will have been automatically generated, so no actions need to be taken for |
| 84 |
documentation. |
| 85 |
|
| 86 |
|
| 87 |
Update conda-forge |
| 88 |
------------------ |
| 89 |
|
| 90 |
The is an autotick bot run by conda-forge that is likely to autodetect the new |
| 91 |
PyPI release and autogenerate a PR for you that will update the PyWavelets |
| 92 |
feedstock for conda-forge. If this automated PR does not appear, you will need |
| 93 |
to send a PR with the new version number and ``sha256`` hash of the source |
| 94 |
release to https://github.com/conda-forge/pywavelets-feedstock. |
| 95 |
|
| 96 |
|
| 97 |
Create the release on GitHub |
| 98 |
---------------------------- |
| 99 |
|
| 100 |
On the project's GitHub page, click the releases tab and then press the |
| 101 |
"*Draft a new release*" button to create a release from the appropriate tag. |
| 102 |
|
| 103 |
|
| 104 |
Announcing the release |
| 105 |
---------------------- |
| 106 |
|
| 107 |
Send release announcements to: |
| 108 |
|
| 109 |
- [email protected] |
| 110 |
- [email protected] |
| 111 |
- [email protected] |
| 112 |
|
| 113 |
|
| 114 |
Prepare for continued development |
| 115 |
--------------------------------- |
| 116 |
|
| 117 |
Increment the version number in setup.py and change ISRELEASED to False. |
| 118 |
|
| 119 |
Prepare new release note files for the upcoming release:: |
| 120 |
|
| 121 |
git add doc/release/X.X.X-notes.rst |
| 122 |
git add doc/source/release.X.X.X.rst |
| 123 |
|
| 124 |
And add ``release.X.X.X`` to the list in ``doc/source/releasenotes.rst`` |