Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 44 additions & 9 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,13 @@ on GitHub, and help us fix any, or add issues for anything that's wrong or missi
If you see a typo or some other small problem that you'd like to fix,
this is most easily done through the GitHub UI.

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

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

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

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

### Adding a new benchmark

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

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

The suite can be run for all released versions with the `run-for-all-releases.py` script.
The suite can be run for all released versions with the `run-for-all-releases.py` script.

## Python version support

:::{todo}
Document Python version support policy (see
[issue #3381](https://github.com/tskit-dev/tskit/issues/3381))
:::

To add or remove support for a given Python version we need to update
the following files:

- Update the ``.github/workflows/tests.yml`` workflow. We run two Python
versions for CI (oldest and newest).
- Update the ``.github/workflows/wheels.yml`` workflow.
- Update the ``.github/workflows/docker/shared.env`` file.
- Update the ``python/pyproject.toml`` file

## Releasing a new version

Expand Down Expand Up @@ -1213,7 +1229,13 @@ e.g. 1.0.0b1. Update the Python CHANGELOG.rst, ensuring that all significant
changes since the last release have been listed. Comparing
`git log --follow --oneline -- python`
with `git log --follow --oneline -- python/CHANGELOG.rst` may help here.
Once this PR is merged, push a tag to github:

Once this PR is merged, the release is ready. This can be done in one of
two ways.

#### Manual tagging via git

To do this push a tag to github:

```bash
git tag -a MAJOR.MINOR.PATCH -m "Python version MAJOR.MINOR.PATCH"
Expand All @@ -1227,6 +1249,19 @@ the release looks good there, then publish the draft release on the
[releases page](https://github.com/tskit-dev/tskit/releases) (Click on the little pencil).
Publishing this release will cause the github
action to deploy to the [production PyPI](https://pypi.org/project/tskit/).

#### Automatic tagging via GitHub UI

Once the repo is in a ready state to tag, it is also possible to create the
release directly in the GitHub UI. Click on the "Draft new release" button on
the "releases" page, and update the release notes based on the changelog. Then
set the tag number appropriately (create tag on release) and create the release.
This will trigger the wheel build and should result in the artefacts being
uploaded to PyPI. It is a good idea to go the "actions" tab to check that
this completes and uploads.
Comment on lines +1255 to +1261
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushing a tag generates the release notes automatically, so I'm not sure why we're promoting the manual path? Pushing the tag also releases to test.pypi.org, which is helpful to check before publishing the release.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I just find the manual approach easier, and I've never checked the tests PyPI ones. We're testing things sufficiently already surely - just writing stuff for future me here really, as I'm likely going to be doing it.


#### Post release

After release, start a section in the changelog for new developments, close the
GitHub issue milestone of the release and update the python version to a `.dev`.
For a major release the website (github repo tskit-dev/tskit-site) should then
Expand Down
6 changes: 6 additions & 0 deletions python/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
--------------------
[1.0.x] - 2026-XX-XX
--------------------

In development

--------------------
[1.0.1] - 2026-02-06
--------------------
Expand Down
2 changes: 1 addition & 1 deletion python/tskit/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Definitive location for the version number.
# During development, should be x.y.z.devN
# For beta should be x.y.zbN
tskit_version = "1.0.1"
tskit_version = "1.0.2.dev1"