Conversation
Also drop pkg_resources.
Not sure if we need it in pyproject.toml though.
`--filter pandoc-citeproc` --> `--citeproc`.
…into packaging-parity
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1028 +/- ##
==========================================
+ Coverage 46.28% 47.13% +0.85%
==========================================
Files 65 66 +1
Lines 9814 9836 +22
Branches 1088 1084 -4
==========================================
+ Hits 4542 4636 +94
+ Misses 5036 4979 -57
+ Partials 236 221 -15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
It's finally ready!!!! |
There was a problem hiding this comment.
Pull request overview
This PR modernizes QSIPrep’s packaging/build/CI to align with NiPreps-style workflows, including moving away from pkg_resources, adopting pixi environments for container builds, and reworking CI to build/test via Docker images.
Changes:
- Replace
pkg_resources.resource_filename(...)withimportlib.resources.files(...)-based resource resolution across workflows/interfaces. - Introduce pixi-based build/test Docker images (plus a new
Dockerfile.base) and update CircleCI to build/test using those images and cached datasets. - Add lockfile automation (
pixi-lock.yml), new maintenance docs, and expand test coverage (incl. a new gradients unit test).
Reviewed changes
Copilot reviewed 29 out of 31 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
qsiprep/workflows/fieldmap/unwarp.py |
Switch resource file lookup away from pkg_resources. |
qsiprep/workflows/fieldmap/syn.py |
Switch atlas/transform resource lookup away from pkg_resources. |
qsiprep/workflows/fieldmap/pepolar.py |
Switch ANTs settings JSON resource lookup away from pkg_resources. |
qsiprep/workflows/dwi/util.py |
Update commented resource lookup example to new files()/as_path() pattern. |
qsiprep/workflows/dwi/registration.py |
Replace pkg_resources resource lookup with files()/as_path(). |
qsiprep/workflows/dwi/intramodal_template.py |
Replace pkg_resources resource lookup with files()/as_path(). |
qsiprep/workflows/dwi/hmc.py |
Replace pkg_resources resource lookup with files()/as_path(). |
qsiprep/workflows/dwi/fsl.py |
Replace pkg_resources lookup for eddy config JSON with files()/as_path(). |
qsiprep/workflows/anatomical/volume.py |
Replace pkg_resources lookups for LUT/config/JSON/identity transform resources. |
qsiprep/utils/resources.py |
Add as_path() helper to adapt importlib.resources.files() results into filesystem paths. |
qsiprep/tests/test_interfaces_gradients.py |
Add an end-to-end unit test for get_fsl_motion_params(). |
qsiprep/tests/test_cli.py |
Adjust integration tests (dataset choice, sloppy mode, and add “unbiased” anat-only run). |
qsiprep/tests/run_local_tests.py |
Update local docker test runner to match pixi-based image layout. |
qsiprep/tests/data/intramodal_template_outputs.txt |
Update expected outputs list for intramodal template integration test. |
qsiprep/interfaces/itk.py |
Make composite transform disassembly more robust across ANTs/ITK naming conventions. |
qsiprep/interfaces/gradients.py |
Harden ITK→FSL conversion by using subprocess.run and text ITK transforms to avoid segfaults. |
qsiprep/interfaces/eddy.py |
Replace pkg_resources lookup for b02b0_1.cnf with files()/as_path(). |
qsiprep/interfaces/ants.py |
Make output transform discovery more robust across ANTs naming/location conventions. |
qsiprep/cli/workflow.py |
Replace pkg_resources lookups; update pandoc invocation to use --citeproc. |
pyproject.toml |
Update key dependencies; add pixi workspace configuration; move codespell config into pyproject.toml. |
Dockerfile.base |
Add new “base” image Dockerfile for non-Python runtime dependencies. |
Dockerfile |
Switch to pixi-based environment build; produce test and qsiprep image targets. |
.maint/INSTRUCTIONS.md |
Add maintainer docs for Docker/pixi/tag bump workflows. |
.gitignore |
Ignore pixi environments and Cursor env file. |
.github/workflows/pixi-lock.yml |
Add a lockfile-update workflow for PRs. |
.gitattributes |
Treat pixi.lock as generated/binary for merges and linguist. |
.dockerignore |
Ensure .pixi is excluded from docker build context. |
.cursor/rules/cursorenv.mdc |
Add Cursor editor rule for conda environment activation. |
.codespellrc |
Remove standalone codespell config (now in pyproject.toml). |
.circleci/config.yml |
Major CI refactor: build images + run tests inside docker with cached data/registry and combined coverage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ENV PERL5LIB="$MINC_LIB_DIR/perl5/5.8.5" \ | ||
| MNI_PERL5LIB="$MINC_LIB_DIR/perl5/5.8.5" \ | ||
| PATH="$FREESURFER_HOME/bin:$FSFAST_HOME/bin:$FREESURFER_HOME/tktools:$MINC_BIN_DIR:$PATH" \ | ||
| FREESURFER_DEPS="bc ca-certificates curl libgomp1 libxmu6 libxt6 tcsh perl" |
There was a problem hiding this comment.
PATH references $FSFAST_HOME, but that variable is never set in this Dockerfile, so the value will expand to empty at build time (and triggers the UndefinedVar warning noted in the PR description). Either define FSFAST_HOME explicitly or remove it from PATH if it’s not required.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Closes none.
Changes proposed in this pull request
qsiprep_build, except for the main Dockerfile there.pkg_resources, which is no longer supported. Useimportlib.resourcesinstead.