Skip to content

Conversation

@GarethCabournDavies
Copy link
Contributor

Making the release strategy more automatic should make things a bit nicer for developers, and mean that the releases don't require us to set aside a few hours of our time waiting to set back to development (also not waiting on others' approval for PRs)

This patch updates the release strategy, and automates the steps in https://pycbc.org/pycbc/latest/html/release.html (though this page should be updated here, so the link won't work if this is merged, see #4778)

The current status of that page is:

1. Make sure that the setup.py file contains the correct version number, which should be in the format x.y.z (where x, y, and z are the major, minor, and patch levels of the release) in PyCBC’s setup.py file.
2. Set release = True in the PyCBC’s setup.py file.
3. Commit the changed setup.py file and push to commit to the repository.
Go to the [PyCBC release page](https://github.com/gwastro/pycbc/releases) and click on Draft a new release.
4. Enter a tag version in the format vx.y.z. Note the v in front of the major, minor, and patch numbers.
5. Enter a descriptive release title and write a description of the release in the text box provided.
6. Click on Publish release to create the release.
7. Update the setup.py file with an incremented major or minor version number and make sure that the string dev appears in that version. For example, if you just released 1.2.1 then change the string to 1.3.dev0 or 2.0.dev0 as appropriate. This is needed to ensure that if someone is building from source, it always takes precedence over an older release version.
Set release = False in PyCBC’s setup.py file.
8. Commit these changes and push them to the repository.

The way this is done after this change is through the distribution.yml workflow.

  1. When the wheels are being built, there is a check for if the job has been triggered by the repo being tagged.
    • If it has not then the following steps do not run
  2. setup.py is altered for the 'release = True' and 'version = vX.Y.Z' (version number from the tag) - note that this only changes for the version that is being used in this runner. This change is never actually pushed to master
  3. This change is done in both building the wheels, and pushing to pypi.
  4. Independently of this, a job is run; bump_version. This only runs when a tag is pushed, and takes the version, vX.Y.Z, and updated the number in setup.py to vX.Y.dev(Z+1), and then pushes that change to master.
    • I don't know if this could introduce a race condition anywhere, but we could make it 'need' the deploy_pypi job, which I think would make it wait

Testing performed

I'm not sure how to test this without actually doing a release

  • The author of this pull request confirms they will adhere to the code of conduct

Copilot AI review requested due to automatic review settings January 28, 2026 15:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Automates the PyCBC release workflow by rewriting version/release metadata during tagged builds and then bumping the repository back to a dev version after publishing.

Changes:

  • Add tag-triggered steps to set a release version and rewrite setup.py during wheel/sdist builds.
  • Add a bump_version job that updates setup.py back to a dev version and pushes the change to master.
  • Introduce a composite GitHub Action to perform the setup.py version/release rewrite.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
.github/workflows/distribution.yml Adds tag-gated release version rewriting and a post-publish dev version bump/push job.
.github/actions/update-version/action.yml New composite action to rewrite setup.py version/release lines via regex.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

GarethCabournDavies and others added 14 commits January 28, 2026 16:23
…gotimegps (gwastro#5237)

* add constants module to fall back on astropy/numpy values if lal is not installed

* Update timeseries to use a float64 rather than ligotimegps

* inject constants

* Use import_optional to avoid repeating try/excepts

* unused imports

* More removal of LAL constants/routines

* More movement away from LAL

* Need a couple more checks in timeseries

* removing lal from tests

* Use astropy rather than lal gpstime in live plotting

* Move gaussian noise module away from lal, add test coverage for that module

* psd reading, results/versioning shouldnt require lal

* More work

* copilot review suggestions

* Unused imports

* Add some logic to allow LIGOTimeGPS to be passed into frequencyseries or timeseries

* testing print

* Allow wider variation in psd

* Fix to eventmgr which assumes a ligotimegps

* epoch_float64: use LIGOTimeGPS for epoch (switch epoch handling to float64)

* epoch_float64: move epoch debug instrumentation and tracing helpers here (origins buffer, trace helpers, test instrumentation)

* re moving unrelated changes

* Removing unrelated changes

* more unrelated stuff

* Set coinc, stat and test live coinc back to master

* Cleanup of this branch

* Cleanup of this branch

* I think this is the right stuff to make a start again

* Fix stable sort problem with test_live_coinc_compare

* Dont know where this change came from., but its wrong

* Apply suggestion from @GarethCabournDavies

* I cant remember why this change was made - lets revert it and run the tests

* Handle slicing with None epochs for timeseries

* Move epoch logic to a shared function, in-depth explanation logic of how epochs are input/converted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants