Skip to content

Commit dc394d7

Browse files
Document Python version update and release
Closes #3380
1 parent 6d91dd1 commit dc394d7

1 file changed

Lines changed: 44 additions & 9 deletions

File tree

docs/development.md

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,13 @@ on GitHub, and help us fix any, or add issues for anything that's wrong or missi
336336
If you see a typo or some other small problem that you'd like to fix,
337337
this is most easily done through the GitHub UI.
338338

339-
Mouse over the GitHub icon at the top right of the page and
340-
click on the "Suggest edit" button. This will bring you to a web
339+
Mouse over the GitHub icon at the top right of the page and
340+
click on the "Suggest edit" button. This will bring you to a web
341341
editor on GitHub for the source file in question, allowing you to
342342
quickly fix the typo and submit a pull request with the changes.
343-
Fix the typo, click the "Commit changes", add a commit message like
344-
"Fixed typo" and click on the green "Propose file change" button.
345-
Then follow the dialogues until you've created a new pull request
343+
Fix the typo, click the "Commit changes", add a commit message like
344+
"Fixed typo" and click on the green "Propose file change" button.
345+
Then follow the dialogues until you've created a new pull request
346346
with your changes, so that we can incorporate them.
347347

348348
If the change you'd like to make is in the API documentation
@@ -766,7 +766,7 @@ Generate coverage data:
766766
$ find ../tskit/*.c -type f -printf "%f\n" | xargs -i gcov -pb libtskit.a.p/tskit_{}.gcno ../tskit/{}
767767
```
768768

769-
The generated `.gcov` files can then be viewed directly with `cat filename.c.gcov`.
769+
The generated `.gcov` files can then be viewed directly with `cat filename.c.gcov`.
770770
Lines prefixed with `#####` were never executed, lines with numbers show execution counts, and lines with `-` are non-executable code.
771771

772772
`lcov` can be used to create browsable HTML coverage reports:
@@ -1156,7 +1156,7 @@ shown in the header of the report.
11561156

11571157
### Adding a new benchmark
11581158

1159-
The benchmarks are specified by the `config.yaml` file in `python/benchmark`. To add a new benchmark
1159+
The benchmarks are specified by the `config.yaml` file in `python/benchmark`. To add a new benchmark
11601160
add an entry to the `benchmarks` dictionary. For example:
11611161

11621162
```yaml
@@ -1173,7 +1173,23 @@ add an entry to the `benchmarks` dictionary. For example:
11731173
Strings are interpreted as Python f-strings, so you can use the `parameters` dictionary to provide
11741174
values that will be interpolated into both the `setup` and `code` strings.
11751175

1176-
The suite can be run for all released versions with the `run-for-all-releases.py` script.
1176+
The suite can be run for all released versions with the `run-for-all-releases.py` script.
1177+
1178+
## Python version support
1179+
1180+
:::{todo}
1181+
Document Python version support policy (see
1182+
[issue #3381](https://github.com/tskit-dev/tskit/issues/3381))
1183+
:::
1184+
1185+
To add or remove support for a given Python version we need to update
1186+
the following files:
1187+
1188+
- Update the ``.github/workflows/tests.yml`` workflow. We run two Python
1189+
versions for CI (oldest and newest).
1190+
- Update the ``.github/workflows/wheels.yml`` workflow.
1191+
- Update the ``.github/workflows/docker/shared.env`` file.
1192+
- Update the ``python/pyproject.toml`` file
11771193

11781194
## Releasing a new version
11791195

@@ -1213,7 +1229,13 @@ e.g. 1.0.0b1. Update the Python CHANGELOG.rst, ensuring that all significant
12131229
changes since the last release have been listed. Comparing
12141230
`git log --follow --oneline -- python`
12151231
with `git log --follow --oneline -- python/CHANGELOG.rst` may help here.
1216-
Once this PR is merged, push a tag to github:
1232+
1233+
Once this PR is merged, the release is ready. This can be done in one of
1234+
two ways.
1235+
1236+
#### Manual tagging via git
1237+
1238+
To do this push a tag to github:
12171239

12181240
```bash
12191241
git tag -a MAJOR.MINOR.PATCH -m "Python version MAJOR.MINOR.PATCH"
@@ -1227,6 +1249,19 @@ the release looks good there, then publish the draft release on the
12271249
[releases page](https://github.com/tskit-dev/tskit/releases) (Click on the little pencil).
12281250
Publishing this release will cause the github
12291251
action to deploy to the [production PyPI](https://pypi.org/project/tskit/).
1252+
1253+
#### Automatic tagging via GitHub UI
1254+
1255+
Once the repo is in a ready state to tag, it is also possible to create the
1256+
release directly in the GitHub UI. Click on the "Draft new release" button on
1257+
the "releases" page, and update the release notes based on the changelog. Then
1258+
set the tag number appropriately (create tag on release) and create the release.
1259+
This will trigger the wheel build and should result in the artefacts being
1260+
uploaded to PyPI. It is a good idea to go the "actions" tab to check that
1261+
this completes and uploads.
1262+
1263+
#### Post release
1264+
12301265
After release, start a section in the changelog for new developments, close the
12311266
GitHub issue milestone of the release and update the python version to a `.dev`.
12321267
For a major release the website (github repo tskit-dev/tskit-site) should then

0 commit comments

Comments
 (0)