Skip to content

Toil Release Instructions

Adam Novak edited this page Jun 3, 2026 · 62 revisions
  1. Before each minor release, update the AWS instance types by running:

    src/toil/utils/toilUpdateEC2Instances.py
    

    Commit the result and create a pull request (PR) to get the update merged in. We want the release branch to be created based on the merge commit form this PR.

    Wait for CI to pass on the PR (as reported to Github), and then for the PR to be merged (possibly by you). Note that this can take about a day.

  2. Figure out what version number the release will be (here, 1.2.x). Consult the Draft Changelog, and bump the major version for breaking changes. (If you want to manipulate the wiki from the CLI, you can git clone git@github.com:DataBiosphere/toil.wiki.git.)

  3. Create branch releases/1.2.x based on the update-instances PR merge commit commit:

    git checkout -b releases/1.2.x
    
  4. In a direct commit/push to master, bump project version from 1.2.0a1 to 1.3.0a1 in version_template.py.

    git checkout origin/master
    sed -i 's/1\.2\.0a1/1.3.0a1/g' version_template.py
    git add version_template.py
    git commit
    git push origin HEAD:master
    

    Note that if your databiosphere/toil GitHub repository remote is named something other than origin, like upstream, use that instead.

  5. Make a new section on the Toil wiki Draft Changelog page for the anticipated next release, 1.3.0.

  6. In a direct commit to releases/1.2.x, bump project version from 1.2.0a1 to 1.2.0 in version_template.py, and push.

    git checkout releases/1.2.x
    sed -i 's/1\.2\.0a1/1.2.0/g' version_template.py
    git add version_template.py
    git commit
    git push origin releases/1.2.x
    
  7. Notify people such as https://matrix.to/#/@mr-c:matrix.org, and the Toil Matrix channel in general, about the impending release. Include a link to the release branch.

  8. Once the CI tests from pushing the release branch finish, according to Github, tag the HEAD commit on the releases/1.2.x branch as releases/1.2.0 and push that tag:

    git checkout releases/1.2.x
    git tag -a 'releases/1.2.0' -m 'release 1.2.0'
    git push origin releases/1.2.0
    
  9. On GitHub create a pre-release release pointing to this tag. Include release notes giving an overview of bug fixes and new features in this release. Use the Draft Changelog, or the diff linked from the number of commits to master since the last release, to see the changes. Note contributors.

  10. CI/CD will create and upload the appliance images to quay.io. This used to be done manually with make push_docker.

  11. Once the images are created (CI/CD appliance tests conclude), tag the images with latest and 1.2.0: https://quay.io/repository/ucsc_cgl/toil?tab=tags. Assign the tags to the build for the latest Python release. Since the image is multi-architecture, this can't be done with docker tag; you need to use a tool like regctl:

    regctl image copy quay.io/ucsc_cgl/toil:8.1.0b1-4bb05349c027096ab4785259e39b2648118b5dd7-py3.13 quay.io/ucsc_cgl/toil:8.1.0b1
    regctl image copy quay.io/ucsc_cgl/toil:8.1.0b1-4bb05349c027096ab4785259e39b2648118b5dd7-py3.13 quay.io/ucsc_cgl/toil:latest
    
  12. Build the updated branch with a clean build, to make sure src/toil/version.py is correct.

    git checkout releases/1.2.x
    
    # This needs to happen in a virtual environment, if you aren't already in one
    . venv/bin/activate || (virtualenv --system-site-packages -p python3.10 --never-download venv || . venv/bin/activate) && . venv/bin/activate
    
    # make clean wants sphinx-build first, so we need to prepare
    make prepare
    make clean
    make develop extras='[all]'  # (must be the same as the extras in Dockerfile.py)
    

    TODO: Should there be a test step here???

  13. Before building the PyPI packages, double-check to make sure you aren't including files to the release that shouldn't go there, like one-off development files left lying around. If in doubt, use a fresh clone to do the build (for version.py) and package build!

    Check the source and documentation directories for untracked files:

    git status src/ docs/
    

    If untracked files are listed, either delete them (if they're development artifacts) or use a fresh clone to ensure nothing unexpected gets packaged.

  14. Build the packages for PyPI.

    git checkout releases/1.2.x
    . venv/bin/activate || (virtualenv --system-site-packages -p python3.10 --never-download venv || . venv/bin/activate) && . venv/bin/activate
    make prepare
    make clean
    pip install --upgrade pip
    pip install --upgrade setuptools wheel build
    python -m build
    
  15. PyPI - WARNING: This step cannot be redone! First make sure that the proper credentials are in ~/.pypirc, then:

    pip install --upgrade twine 'packaging>=24.2'
    twine upload dist/*
    
  16. Mark the release you created on Github as the latest release.

  17. On http://readthedocs.org/projects/toil/, check to make sure that the latest docs built correctly.

  18. In a direct edit to the releases/1.2.x branch, bump project version from 1.2.0 to 1.2.1a1 in version_template.py.

    git checkout releases/1.2.x
    sed -i 's/1\.2\.0/1.2.1a1/g' version_template.py
    git add version_template.py
    git commit
    git push origin releases/1.2.x
    

Hotfix Release, e.g. 1.2.1

  1. Start from the branch releases/1.2.x:

    git checkout releases/1.2.x
    
  2. Do the step where you bump the version number on the release branch, above, and the following steps, using 1.2.1, instead of 1.2.0.

Clone this wiki locally