-
Notifications
You must be signed in to change notification settings - Fork 74
How to make a release
Local steps
-
Bump version: Edit
pyproject.toml,e.g., change version = "1.1.2" to version = "1.2.0" (or whatever the new version is). -
Edit
CHANGESfile: Add major changes, minor changes and bug fixes. -
Run
python render_citation.pyto generate the list of contributors: This list is generated in theCITATION.cfffile which is then used by Zenodo and Github to create citations. The contributors include everyone who has contributed since the beginning, and they are ordered by how many lines of code each person has added, from most to least. For known contributors we add the affiliations too.
GitHub steps: GitHub release, website, Zenodo
-
Merge dev to master and then master back to dev.
-
This merge to master _triggers _the webhook and rebuilds the stable website.
-
Create a GitHub Release: Here you can create a new tag that matches the released version (e.g., v1.2.0). Then paste the contents of the CHANGES file there too.
-
This release triggers Zenodo, which creates a new publication.
PyPI steps
-
Build the Python package: Run
pip install buildand thenpython -m build. This creates dist/pcntoolkit-1.2.0.tar.gz and dist/pcntoolkit-1.2.0-py3-none-any.whl -
Upload to PyPI: Run
pip install twineand thentwine upload dist/*1.2.0*. It will ask for your user's API token. To make one, go to your PyPI account settings and generate one, then create a file in $HOME/.pypirc ($HOME/ is C:/Users/user in Windows) and add the token in there:
[pypi]
username = __token__
password = <add your token here>
Note that when you upload, it is automatically checked what the package is in the .toml file and PyPI uploads it in the right project (in this case the pcntoolkit PyPI project)