Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚧 [WIP] 🚑️ Hotfix 1.8.7: Restore longitudinal functionality #2160

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
08948a4
:goal_net: Fall back on workflow name, then empty string if no "subje…
shnizzedy Oct 15, 2024
2874287
:bug: Set subject ID for longitudinal workflow
shnizzedy Oct 15, 2024
47f1de1
:bookmark: Set version to `1.8.7.post1.dev1`
shnizzedy Oct 15, 2024
cc72177
:package: Disable variant image builds
shnizzedy Oct 15, 2024
d2f960a
:bug: Pass `get` method through from `Configuration.dict()`
shnizzedy Oct 22, 2024
cb5861b
:necktie: Persist longitudinal resource pool
shnizzedy Oct 28, 2024
282f3f7
:loud_sound: :alembic: Pickle rpool
shnizzedy Oct 28, 2024
828d589
:alembic: :loud_sound: Pickle lots of rpools
shnizzedy Oct 29, 2024
0cd1639
:alien: Update path matching for longitudinal
shnizzedy Oct 29, 2024
7fb44cc
:bug: Iterate keys without mutating
shnizzedy Oct 29, 2024
f2da817
:bug: Fallback to config for regtool
shnizzedy Oct 29, 2024
5d34172
:necktie: Use longitudinal transform
shnizzedy Oct 29, 2024
87e723e
:alembic: Don't delete T1w key
shnizzedy Oct 29, 2024
626984d
:necktie: Differentiate T1w/longitudinal space
shnizzedy Oct 29, 2024
f6c27f8
:bug: Include `space-longitudinal_pveseg` in `tissue_seg_fsl)fast`
shnizzedy Oct 30, 2024
8a17f72
:recycle: Simplify outputs definition
shnizzedy Oct 30, 2024
2a54356
:alien: Only call `ingress_output_dir` if "derivatives_dir"
shnizzedy Oct 30, 2024
b09257a
:recycle: Fix broken connections in `anat_longitudinal_wf`
shnizzedy Oct 31, 2024
8666475
:bug: Clone instead of rename
shnizzedy Oct 31, 2024
024f28f
:bug: Fix header reading for bandpass filters
shnizzedy Sep 17, 2024
87dd957
:memo: Add bandpass filter fix to CHANGELOG
shnizzedy Oct 31, 2024
99adf4b
:construction_worker: Skip `update-yaml-comments` job in pre-commit CI
shnizzedy Nov 1, 2024
161b40d
:construction_worker: Merge updated `.github/scripts/autoversioning.s…
shnizzedy Nov 1, 2024
e916d33
:recycle: SSOT `warp_mask_to_template` decorator
shnizzedy Nov 1, 2024
16cb70c
:construction: Restore `template_node` connections
shnizzedy Nov 1, 2024
4679ef4
:coffin: Remove temporary debugging code
shnizzedy Nov 1, 2024
6eef5af
:coffin: Remove commented-out code
shnizzedy Nov 1, 2024
9169203
:rewind: Revert f2da817f5
shnizzedy Nov 1, 2024
e7e82b7
:recycle: SSOT `warp_to_template`
shnizzedy Nov 1, 2024
4ddb58f
fixup! :bug: Clone instead of rename
shnizzedy Nov 4, 2024
0cf793f
:necktie: Handle connections from unconnected graphs that run separately
shnizzedy Nov 8, 2024
606638c
:necktie: Clone *and* handle unconnected graphs
shnizzedy Nov 11, 2024
4bb363c
:recycle: Name each preparatory graph uniquely
shnizzedy Nov 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .circleci/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ jobs:
key: coverage-docker--{{ .Revision }}
# - restore_cache:
# key: coverage-singularity--{{ .Revision }}
- restore_cache:
key: coverage-docker-ABCD-HCP-{{ .Revision }}
# - restore_cache:
# key: coverage-docker-ABCD-HCP-{{ .Revision }}
# - restore_cache:
# key: coverage-singularity-ABCD-HCP-{{ .Revision }}
- restore_cache:
Expand Down Expand Up @@ -280,9 +280,9 @@ workflows:
# - "Test in Singularity"
- "Test lite variant in Docker"
# - "Test lite variant in Singularity"
- "Test ABCD-HCP variant in Docker"
# - "Test ABCD-HCP variant in Docker"
# - "Test ABCD-HCP variant in Singularity"
- "Test fMRIPrep-LTS variant in Docker"
# - "Test fMRIPrep-LTS variant in Docker"
- push-branch-to-docker-hub:
filters:
branches:
Expand All @@ -293,18 +293,18 @@ workflows:
variant:
- ""
- lite
- ABCD-HCP
- fMRIPrep-LTS
# - ABCD-HCP
# - fMRIPrep-LTS
requires:
- "Combine coverage"
- pytest-docker:
name: "Test in Docker"
- pytest-docker:
name: "Test ABCD-HCP variant in Docker"
variant: ABCD-HCP
- pytest-docker:
name: "Test fMRIPrep-LTS variant in Docker"
variant: fMRIPrep-LTS
# - pytest-docker:
# name: "Test ABCD-HCP variant in Docker"
# variant: ABCD-HCP
# - pytest-docker:
# name: "Test fMRIPrep-LTS variant in Docker"
# variant: fMRIPrep-LTS
- pytest-docker:
name: "Test lite variant in Docker"
variant: lite
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/fcp-indi/c-pac/stage-base:abcd-hcp-v1.8.7.dev1
FROM ghcr.io/fcp-indi/c-pac/stage-base:abcd-hcp-v1.8.7.post1.dev3
LABEL org.opencontainers.image.description "Full C-PAC image with software dependencies version-matched to [ABCD-HCP BIDS fMRI Pipeline](https://github.com/DCAN-Labs/abcd-hcp-pipeline/blob/e480a8f99534f1b05f37bf44c64827384b69b383/Dockerfile)"
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
USER root
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/fcp-indi/c-pac/stage-base:fmriprep-lts-v1.8.7.dev1
FROM ghcr.io/fcp-indi/c-pac/stage-base:fmriprep-lts-v1.8.7.post1.dev3
LABEL org.opencontainers.image.description "Full C-PAC image with software dependencies version-matched to [fMRIPrep LTS](https://reproducibility.stanford.edu/fmriprep-lts#long-term-support-lts)"
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
USER root
Expand Down
2 changes: 1 addition & 1 deletion .github/Dockerfiles/C-PAC.develop-jammy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# You should have received a copy of the GNU Lesser General Public
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
FROM ghcr.io/fcp-indi/c-pac/stage-base:standard-v1.8.7.dev1
FROM ghcr.io/fcp-indi/c-pac/stage-base:standard-v1.8.7.post1.dev3
LABEL org.opencontainers.image.description "Full C-PAC image"
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
USER root
Expand Down
2 changes: 1 addition & 1 deletion .github/Dockerfiles/C-PAC.develop-lite-jammy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# You should have received a copy of the GNU Lesser General Public
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
FROM ghcr.io/fcp-indi/c-pac/stage-base:lite-v1.8.7.dev1
FROM ghcr.io/fcp-indi/c-pac/stage-base:lite-v1.8.7.post1.dev3
LABEL org.opencontainers.image.description "Full C-PAC image without FreeSurfer"
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
USER root
Expand Down
2 changes: 1 addition & 1 deletion .github/Dockerfiles/base-standard.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.
FROM ghcr.io/fcp-indi/c-pac/freesurfer:6.0.0-min.neurodocker-jammy as FreeSurfer

FROM ghcr.io/fcp-indi/c-pac/stage-base:lite-v1.8.7.dev1
FROM ghcr.io/fcp-indi/c-pac/stage-base:lite-v1.8.7.post1.dev3
LABEL org.opencontainers.image.description "NOT INTENDED FOR USE OTHER THAN AS A STAGE IMAGE IN A MULTI-STAGE BUILD \
Standard software dependencies for C-PAC standard images"
LABEL org.opencontainers.image.source https://github.com/FCP-INDI/C-PAC
Expand Down
26 changes: 17 additions & 9 deletions .github/scripts/autoversioning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.

# Update version comment strings
cd CPAC
function wait_for_git_lock() {
while [ -f "./.git/index.lock" ]; do
echo "Waiting for the git lock file to be removed..."
sleep 1
done
}

cd CPAC || exit 1
VERSION=$(python -c "from info import __version__; print(('.'.join(('.'.join(__version__[::-1].split('-')[1].split('.')[1:])[::-1], __version__.split('-')[1])) if '-' in __version__ else __version__).split('+', 1)[0])")
cd ..
echo "v${VERSION}" > version
Expand All @@ -30,8 +37,8 @@ else
# Linux and others
find ./CPAC/resources/configs -name "*.yml" -exec sed -i'' -r "${_SED_COMMAND}" {} \;
fi
git add version
VERSIONS=( `git show $(git log --pretty=format:'%h' -n 2 version | tail -n 1):version` `cat version` )
wait_for_git_lock && git add version
VERSIONS=( `git show $(git log --pretty=format:'%h' -n 1 version | tail -n 1):version` `cat version` )
export PATTERN="(declare|typeset) -a"
if [[ "$(declare -p VERSIONS)" =~ $PATTERN ]]
then
Expand All @@ -52,11 +59,12 @@ then
done
unset IFS
fi
git add CPAC/resources/configs .github/Dockerfiles
wait_for_git_lock && git add CPAC/resources/configs .github/Dockerfiles

# Overwrite top-level Dockerfiles with the CI Dockerfiles
cp .github/Dockerfiles/C-PAC.develop-jammy.Dockerfile Dockerfile
cp .github/Dockerfiles/C-PAC.develop-ABCD-HCP-bionic.Dockerfile variant-ABCD-HCP.Dockerfile
cp .github/Dockerfiles/C-PAC.develop-fMRIPrep-LTS-xenial.Dockerfile variant-fMRIPrep-LTS.Dockerfile
cp .github/Dockerfiles/C-PAC.develop-lite-jammy.Dockerfile variant-lite.Dockerfile
git add *Dockerfile
wait_for_git_lock && cp .github/Dockerfiles/C-PAC.develop-jammy.Dockerfile Dockerfile
wait_for_git_lock && cp .github/Dockerfiles/C-PAC.develop-lite-jammy.Dockerfile variant-lite.Dockerfile
for DOCKERFILE in $(ls *Dockerfile)
do
wait_for_git_lock && git add $DOCKERFILE
done
4 changes: 1 addition & 3 deletions .github/stage_requirements/phase_three.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
lite
ABCD-HCP
fMRIPrep-LTS
lite
64 changes: 32 additions & 32 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,25 +317,25 @@ jobs:
with:
variant: lite

C-PAC-ABCD-HCP:
needs: build-base
uses: ./.github/workflows/build_C-PAC.yml
with:
variant: ABCD-HCP
# C-PAC-ABCD-HCP:
# needs: build-base
# uses: ./.github/workflows/build_C-PAC.yml
# with:
# variant: ABCD-HCP

C-PAC-fMRIPrep-LTS:
needs: build-base
uses: ./.github/workflows/build_C-PAC.yml
with:
variant: fMRIPrep-LTS
# C-PAC-fMRIPrep-LTS:
# needs: build-base
# uses: ./.github/workflows/build_C-PAC.yml
# with:
# variant: fMRIPrep-LTS

smoke-tests-participant:
name: Run participant-level smoke tests
needs:
- C-PAC
- C-PAC-lite
- C-PAC-ABCD-HCP
- C-PAC-fMRIPrep-LTS
# - C-PAC-ABCD-HCP
# - C-PAC-fMRIPrep-LTS
if: github.ref_name == 'develop' || github.ref_name == 'main'
uses: ./.github/workflows/smoke_test_participant.yml

Expand All @@ -358,8 +358,8 @@ jobs:
needs:
- C-PAC
- C-PAC-lite
- C-PAC-ABCD-HCP
- C-PAC-fMRIPrep-LTS
# - C-PAC-ABCD-HCP
# - C-PAC-fMRIPrep-LTS
if: github.ref_type == 'branch'
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -425,22 +425,22 @@ jobs:
variant: 'lite'
secrets: inherit

Deploy_to_Docker_Hub-ABCD-HCP:
name: Deploy 'ABCD-HCP' to Docker Hub
needs:
- C-PAC-ABCD-HCP
if: github.ref_type == 'tag'
uses: ./.github/workflows/deploy_to_Docker_Hub.yml
with:
variant: 'ABCD-HCP'
secrets: inherit
# Deploy_to_Docker_Hub-ABCD-HCP:
# name: Deploy 'ABCD-HCP' to Docker Hub
# needs:
# - C-PAC-ABCD-HCP
# if: github.ref_type == 'tag'
# uses: ./.github/workflows/deploy_to_Docker_Hub.yml
# with:
# variant: 'ABCD-HCP'
# secrets: inherit

Deploy_to_Docker_Hub-fMRIPrep-LTS:
name: Deploy 'fMRIPrep-LTS' to Docker Hub
needs:
- C-PAC-fMRIPrep-LTS
if: github.ref_type == 'tag'
uses: ./.github/workflows/deploy_to_Docker_Hub.yml
with:
variant: 'fMRIPrep-LTS'
secrets: inherit
# Deploy_to_Docker_Hub-fMRIPrep-LTS:
# name: Deploy 'fMRIPrep-LTS' to Docker Hub
# needs:
# - C-PAC-fMRIPrep-LTS
# if: github.ref_type == 'tag'
# uses: ./.github/workflows/deploy_to_Docker_Hub.yml
# with:
# variant: 'fMRIPrep-LTS'
# secrets: inherit
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

# You should have received a copy of the GNU Lesser General Public
# License along with C-PAC. If not, see <https://www.gnu.org/licenses/>.

ci:
skip:
- update-yaml-comments
repos:
- repo: local
hooks:
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.8.7.post1] - unreleased

### Changed

- Disabled variant image builds.

### Fixed

- A bug in which bandpass filters always assumed 1D regressor files have exactly 5 header rows.
- Graph-building bugs that prevented longitudinal workflows from running.

## [1.8.7] - 2024-05-03

### Added
Expand Down Expand Up @@ -294,7 +305,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

See [Version 1.8.1 Beta](https://fcp-indi.github.io/docs/user/release_notes/v1.8.1) for release notes for v1.8.1 and [Release Notes](https://fcp-indi.github.io/docs/user/release_notes) for all release notes back to v0.1.1.

[unreleased]: https://github.com/FCP-INDI/C-PAC/compare/v1.8.6...develop
[1.8.7.post1]: https://github.com/FCP-INDI/C-PAC/compare/v1.8.7...v1.8.7.post1.dev3
[1.8.7]: https://github.com/FCP-INDI/C-PAC/releases/tag/v1.8.7
[1.8.6]: https://github.com/FCP-INDI/C-PAC/releases/tag/v1.8.6
[1.8.5]: https://github.com/FCP-INDI/C-PAC/releases/tag/v1.8.5
[1.8.4]: https://github.com/FCP-INDI/C-PAC/releases/tag/v1.8.4
Expand Down
2 changes: 1 addition & 1 deletion CPAC/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
_version_major = 1
_version_minor = 8
_version_micro = 7
_version_extra = 'dev1'
_version_extra = 'post1.dev3'


def get_cpac_gitversion():
Expand Down
3 changes: 2 additions & 1 deletion CPAC/longitudinal_pipeline/longitudinal_preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ def flirt_node(in_img, output_img, output_mat):
return node_list


def template_creation_flirt(input_brain_list, input_skull_list, init_reg=None, avg_method='median', dof=12,
def template_creation_flirt(input_brain_list, input_skull_list, init_reg=None,
avg_method='median', dof=12,
interp='trilinear', cost='corratio', mat_type='matrix',
convergence_threshold=-1, thread_pool=2, unique_id_list=None):
"""
Expand Down
Loading
Loading