Skip to content

Commit bafed75

Browse files
committed
Add release process docs
1 parent 2aca42c commit bafed75

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

docs/development.rst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,3 +877,54 @@ the C and Python APIs.
877877
11. Update your Pull Request (`rebasing <https://stdpopsim.readthedocs.io/en/
878878
latest/development.html#rebasing>`_ if necessary!) and let the community check
879879
your work.
880+
881+
***********************
882+
Releasing a new version
883+
***********************
884+
885+
Tskit maintains separate visioning for the C API and Python package, each has its own
886+
release process.
887+
888+
-----
889+
C API
890+
-----
891+
892+
To release the C API, the ``TSK_VERSION_*`` macros should be updated, and the changelog
893+
updated with the release date and version. The changelog should also be checked for
894+
completeness. Comparing ``git log --follow --oneline -- c`` with
895+
``git log --follow --oneline -- c/CHANGELOG.rst`` may help here.
896+
After the commit including these changes has been merged, tag a
897+
release on GitHub using the pattern ``C_MAJOR.MINOR.PATCH``, with::
898+
899+
git tag -a C_MAJOR.MINOR.PATCH -m "C API version C_MAJOR.MINOR.PATCH"
900+
git push upstream --tags
901+
902+
Then prepare a release for the tag on GitHub, copying across the changelog.
903+
After release, start a section in the changelog for new developments.
904+
905+
------
906+
Python
907+
------
908+
909+
To make a release first prepare a pull request that sets the correct version
910+
number in ``tskit/_version.py`` following PEP440 format. For a normal release
911+
this should be MAJOR.MINOR.PATCH, for a beta release use MAJOR.MINOR.PATCH.bX.
912+
Update the Python CHANGELOG.rst, ensuring that all significant changes since
913+
the last release have been listed. Comparing ``git log --follow --oneline -- python``
914+
with ``git log --follow --oneline -- python/CHANGELOG.rst`` may help here.
915+
Once this PR is merged, push a tag to github::
916+
917+
git tag -a MAJOR.MINOR.PATCH -m "Python version MAJOR.MINOR.PATCH"
918+
git push upstream --tags
919+
920+
This will trigger a build of the distribution artifacts for Python
921+
on `Github Actions <https://github.com/tskit-dev/tskit/actions>`_. and deploy
922+
them to the `test PyPI <https://test.pypi.org/project/tskit/>`_. Check
923+
the release looks good there, then create a release on Github based on the tag you
924+
pushed. Copy the changelog into the release. Publishing this release will cause
925+
the github action to deploy to the
926+
`production PyPI <https://pypi.org/project/tskit/>`_.
927+
After release, start a section in the changelog for new developments.
928+
929+
930+

0 commit comments

Comments
 (0)