Skip to content

MAINT: Move CI to GHA and fix stale niworkflows imports#248

Merged
oesteban merged 10 commits intomasterfrom
maint/move-circle-to-gha
Feb 14, 2026
Merged

MAINT: Move CI to GHA and fix stale niworkflows imports#248
oesteban merged 10 commits intomasterfrom
maint/move-circle-to-gha

Conversation

@oesteban
Copy link
Member

@oesteban oesteban commented Feb 13, 2026

Summary

This PR migrates dMRIPrep's CI/CD from CircleCI to GitHub Actions (tests, style checks, and PyPI publishing) and fixes several stale imports and workflow bugs that surfaced when testing against current versions of niworkflows and nipype.

CircleCI is retained only for Docker image builds; all other CI responsibilities now live in GHA with proper matrix testing, trusted publisher PyPI deployment, and pull request triggers.

Changes

CI/CD

  • Created .github/workflows/test.yml with matrix testing across Python 3.10--3.13 and three dependency strategies (latest, pre-release, minimum supported). Includes style checks and Codecov upload.
  • Created .github/workflows/pypi-package.yml implementing the build-package, TestPyPI, and PyPI deployment pipeline with a Release environment gate for production uploads.
  • Added pull_request triggers to docs and pypi-package workflows; restricted push triggers in test.yml to master only to prevent double-triggering on PRs.
  • Removed test_deploy_pypi, deploy_pypi, and deployable jobs from the CircleCI configuration. CircleCI now handles Docker builds exclusively.
  • Fixed a duplicated file inclusion in the sdist/wheel distribution.

Workflow fixes

  • Replaced from niworkflows.interfaces.images import ValidateImage with from niworkflows.interfaces.header import ValidateImage to match the current niworkflows API.
  • Fixed vocabulary mismatch in the BBR registration workflow: epi2t1w_init value changed from 't1w' to 'register' and corresponding BBR output field names updated to match current niworkflows conventions.
  • Split the hmc_buffer node to resolve a graph cycle in the DWI fit workflow that caused Nipype to fail at execution time.
  • Replaced the removed PatchedMRICoreg with the upstream MRICoreg interface and removed the unavailable LTAConvert import.
  • Fixed docstring examples and removed the unsupported footbibliography Sphinx directive.

Style

  • Applied ruff auto-fixes to satisfy linting across all modified files.

Post-merge admin

Before the PyPI workflow can publish:

  1. TestPyPI trusted publisher must be configured for nipreps/dmriprep on test.pypi.org (workflow: pypi-package.yml, environment: none for TestPyPI).
  2. PyPI trusted publisher must be configured for nipreps/dmriprep on pypi.org (workflow: pypi-package.yml, environment: Release).
  3. A GitHub Environment named Release must be created in the repository settings with appropriate protection rules (e.g., manual approval, restricted to master branch tags).

Test plan

  • GHA test matrix passes across all Python versions and dependency strategies
  • Style/lint checks pass in GHA
  • pypi-package.yml successfully builds the sdist and wheel (the "build-package" job)
  • Docker build jobs on CircleCI remain functional
  • Workflow import fixes verified by successful test collection (no ImportError at import time)
  • Graph cycle fix verified by constructing the DWI fit workflow without Nipype raising a cycle error

🤖 Generated with Claude Code

@oesteban oesteban force-pushed the maint/move-circle-to-gha branch from cbaeb5a to 02e692d Compare February 14, 2026 15:23
oesteban and others added 3 commits February 14, 2026 16:32
…ycle

Address several compatibility issues with current niworkflows/nipype
versions that surfaced when building documentation (workflow graphs):

- Move ``ValidateImage`` import from ``niworkflows.interfaces.images``
  to ``niworkflows.interfaces.header`` (reorganized upstream).
- Map ``dwi2anat_init`` vocabulary for ``init_bbreg_wf``: niworkflows
  now expects ``'register'``/``'header'`` instead of ``'t1w'``/``'header'``.
- Update BBR output field names: ``itk_epi2t1`` → ``itk_epi_to_t1w``,
  ``itk_t1_to_epi`` → ``itk_t1w_to_epi``.
- Replace removed ``PatchedMRICoreg`` with ``nipype.interfaces.freesurfer.MRICoreg``.
- Remove ``LTAConvert`` inversion step (removed from nipype; output was unused).
- Split ``hmc_buffer`` into ``hmc_buffer`` + ``mask_buffer`` to break
  the ``hmc_buffer ↔ brainextraction_wf`` graph cycle that prevented
  ``topological_sort`` (and thus doc-build workflow plotting).
- Fix ``init_dwi_fit_wf`` docstring example to query the actual DWI
  file from the mock BIDS layout instead of a hardcoded dummy path.
- Remove unsupported ``.. footbibliography::`` directive (no
  ``sphinxcontrib-bibtex`` configured).
- Update ``CLAUDE.md`` with doc-build instructions.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@oesteban oesteban changed the title MAINT: Move tests from CircleCI to GHA MAINT: Move CI to GHA and fix stale niworkflows imports Feb 14, 2026
@oesteban oesteban force-pushed the maint/move-circle-to-gha branch from 1b3831a to acfc72b Compare February 14, 2026 18:18
Load each 3D volume's data into memory before concatenation
to prevent `indexed_gzip` `ZranError` when many gzipped NIfTI
files are open simultaneously.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@oesteban oesteban force-pushed the maint/move-circle-to-gha branch from acfc72b to 1cdfb6a Compare February 14, 2026 18:26
@oesteban oesteban merged commit 6f562b1 into master Feb 14, 2026
17 checks passed
@oesteban oesteban deleted the maint/move-circle-to-gha branch February 14, 2026 20:26
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.

1 participant