Skip to content

BLD: Switch CI tests to use pixi for environments - #1126

Open
ColmTalbot wants to merge 3 commits into
bilby-dev:mainfrom
ColmTalbot:use-pixi-for-testing
Open

BLD: Switch CI tests to use pixi for environments#1126
ColmTalbot wants to merge 3 commits into
bilby-dev:mainfrom
ColmTalbot:use-pixi-for-testing

Conversation

@ColmTalbot

Copy link
Copy Markdown
Collaborator

This is an attempt to remove our need to generate containers in scheduled jobs and have them occasionally just fail because of upstream changes and instead use pixi (conda+pypi+rust) with a lock file.
The lockfile can be modified on a schedule using pull requests so we know updating our test environment won't break things.

@ColmTalbot
ColmTalbot force-pushed the use-pixi-for-testing branch from ca3518b to 42ed0a7 Compare August 11, 2026 14:52
@ColmTalbot
ColmTalbot requested review from a team and a lite review from Copilot August 11, 2026 19:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the project’s CI and supporting test/docs tooling to use Pixi-managed environments (with a lockfile) instead of prebuilt container images, aiming to reduce flakiness from upstream container changes and make environment updates more controlled.

Changes:

  • Replace container-based GitHub Actions workflows with prefix-dev/setup-pixi and Pixi environments (unit tests, array-backend tests, docs build, latest-dynesty).
  • Add Pixi workspace configuration (pixi.toml) and remove container build infrastructure (Dockerfile, conda env template, scheduled container build workflow).
  • Adjust tests to work with the new CI setup (ROQ data path discovery + CI ROQ download/cache; reduce JAX dependency in a prior test; increase signal-delay in sampler interrupt test).

Reviewed changes

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

Show a summary per file
File Description
test/integration/sampler_run_test.py Increases SIGINT trigger delay to reduce interrupt-test flakiness in CI.
test/gw/source_test.py Makes ROQ basis directory discovery configurable (incl. env var) rather than hardcoding /roq_basis.
test/core/prior/base_test.py Removes dependency on jax.numpy for a namespace assertion in a warning test.
pixi.toml Defines Pixi environments/features for CI, docs, GW deps, array-backends, and dynesty variants.
docs/Makefile Runs Sphinx via Pixi documentation environment.
containers/environment.yml Removed legacy conda environment template used for container builds.
containers/Dockerfile Removed legacy CI container build (including ROQ data baked into image).
.gitignore Ignores Pixi and venv working directories.
.github/workflows/unit-tests.yml Switches unit tests / sampler tests / array-backend tests to Pixi; adds ROQ download+cache job.
.github/workflows/pages.yml Switches docs/notebook execution to Pixi documentation environment.
.github/workflows/latest-dynesty.yml Switches dynesty-on-master testing to Pixi environment.
.github/workflows/build-containers.yml Removes scheduled container build/push pipeline.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/unit-tests.yml
Comment thread .github/workflows/unit-tests.yml
@lucascolley

Copy link
Copy Markdown

I was randomly browsing the project after noticing that you use array-api-extra, and saw this too — very cool! Feel free to drop me a ping if you ever have questions about using Pixi or array-api-extra :)

@mj-will mj-will left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall, LGTM. Just a couple of minor comments and questions.

Comment thread pixi.toml Outdated
Comment thread pixi.toml
Comment thread containers/environment.yml
Comment thread containers/environment.yml
Comment thread pixi.toml
Comment thread containers/environment.yml
Comment thread pixi.toml
[feature.doc.pypi-dependencies]
autodoc = "*"
myst_parser = "*"
nessai-bilby = "*"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nessai-bilby can be installed via conda

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This introduces a circular dependency, which made it very unhappy.

$ pixi lock
Error:   × failed to solve the pypi requirements of environment 'documentation' for platform 'osx-arm64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Because there is no version of bilby==2.8.2 and you require bilby==2.8.2, we can conclude that your requirements are unsatisfiable.
  help: The following PyPI packages have been pinned by the conda solve, and this version may be causing a conflict:
        bilby==2.8.2
        See https://pixi.sh/latest/concepts/conda_pypi/#pinned-package-conflicts for more information.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Weird, I dug into this at it seems that the issue is that nessai-bilby depends on bilby and if one installs that from conda then it pins the versions to bilby==2.8.2. The editable pip install of bilby for the tests then fails since it doesn't provided 2.8.2.

From some digging there may be ways around this but I'm not familiar enough with pixi to know if they make sense. For example:

[workspace.conda-pypi-map]
conda-forge = { mapping = { bilby = false } }

apparently tells pixi to not pass the conda version to pip.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Can we defer this to a follow-up PR?

Comment thread test/core/prior/base_test.py
@mj-will

mj-will commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Noting that this also closes #1123 since the base py3.x envs don't have jax in them.

@mj-will mj-will linked an issue Aug 26, 2026 that may be closed by this pull request
Add missing dependencies

Add ROQ data

Update pixi lock

Fix CI

Fix ROQ path

Try again

Make unit test jobs have access to cached ROQ data

Add some more lal requirements

Attempt to fix pages and precommit jobs

Fix broken tests

Fix pages requirements and pixi formatting

Another attempt to fix py311 and 312

Remove old container approach

Make sure dynesty is installed from source for latest dynesty test

FMT: formatting fix for pixi toml

Add coverage for testing

Fix coverage report

Try increasing timeout length for interruption test

Split unit tests and sampler running tests

CI: Update pixi lock file
@ColmTalbot
ColmTalbot force-pushed the use-pixi-for-testing branch from 4bcd878 to d7c637e Compare August 27, 2026 04:57
@mj-will mj-will linked an issue Aug 27, 2026 that may be closed by this pull request
@ColmTalbot
ColmTalbot requested review from a team and mj-will August 30, 2026 05:08
@adivijaykumar

Copy link
Copy Markdown
Collaborator

Thanks @ColmTalbot! I am very much in favour of this.

The lockfile can be modified on a schedule using pull requests

Unless I completely misunderstood what you are suggesting, don't we need a separate workflow yml for this?

@adivijaykumar

Copy link
Copy Markdown
Collaborator

(unrelated, but I'm reading up about pixi, and it could be better than conda for managing the igwn-* environments on the LDG clusters)

@ColmTalbot

Copy link
Copy Markdown
Collaborator Author

Thanks @ColmTalbot! I am very much in favour of this.

The lockfile can be modified on a schedule using pull requests

Unless I completely misunderstood what you are suggesting, don't we need a separate workflow yml for this?

Yeah, my plan was to implement this after this PR is merged. It would need to run based on an existing lock file on main.

@adivijaykumar adivijaykumar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: ensure a version of the CI runs without jax Remove lal install in CI

5 participants