BLD: Switch CI tests to use pixi for environments - #1126
Conversation
ca3518b to
42ed0a7
Compare
There was a problem hiding this comment.
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-pixiand 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.
|
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
left a comment
There was a problem hiding this comment.
Overall, LGTM. Just a couple of minor comments and questions.
| [feature.doc.pypi-dependencies] | ||
| autodoc = "*" | ||
| myst_parser = "*" | ||
| nessai-bilby = "*" |
There was a problem hiding this comment.
nessai-bilby can be installed via conda
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Can we defer this to a follow-up PR?
|
Noting that this also closes #1123 since the base py3.x envs don't have jax in them. |
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
4bcd878 to
d7c637e
Compare
|
Thanks @ColmTalbot! I am very much in favour of this.
Unless I completely misunderstood what you are suggesting, don't we need a separate workflow yml for this? |
|
(unrelated, but I'm reading up about pixi, and it could be better than conda for managing the igwn-* environments on the LDG clusters) |
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
left a comment
There was a problem hiding this comment.
Looks good to me!
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.