From 0c8a92e1894f0f891867c88e3daa5bc00d7d8821 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 22 Aug 2024 20:56:58 -0400 Subject: [PATCH 01/11] fix(dep): Renamed function in smriprep --- fmriprep/workflows/bold/resampling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fmriprep/workflows/bold/resampling.py b/fmriprep/workflows/bold/resampling.py index 1074700d..d725da6f 100644 --- a/fmriprep/workflows/bold/resampling.py +++ b/fmriprep/workflows/bold/resampling.py @@ -575,10 +575,10 @@ def init_bold_fsLR_resampling_wf( Path to BOLD series resampled as functional GIFTI files in fsLR space """ + import smriprep.data import templateflow.api as tf from niworkflows.engine.workflows import LiterateWorkflow as Workflow from niworkflows.interfaces.utility import KeySelect - from smriprep import data as smriprep_data from fmriprep.interfaces.workbench import VolumeToSurfaceMapping @@ -652,7 +652,7 @@ def init_bold_fsLR_resampling_wf( extension='.surf.gii', ) ] - atlases = smriprep_data.load_resource('atlases') + atlases = smriprep.data.load('atlases') select_surfaces.inputs.template_roi = [ str(atlases / f'L.atlasroi.{fslr_density}_fs_LR.shape.gii'), str(atlases / f'R.atlasroi.{fslr_density}_fs_LR.shape.gii'), From 66cf21c769971151086898ffefb89ec65394d646 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 22 Aug 2024 21:02:59 -0400 Subject: [PATCH 02/11] mnt: Bump nipreps version pins --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cbace073..e3d139e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,18 +23,18 @@ dependencies = [ "looseversion", "nibabel >= 4.0.1", "nipype >= 1.8.5", - "nireports @ git+https://github.com/nipreps/nireports.git@main", + "nireports >= 23.2.2", "nitime", "nitransforms >= 21.0.0", - "niworkflows @ git+https://github.com/nipreps/niworkflows.git@master", + "niworkflows >= 1.11.0", "numpy >= 1.22", "packaging", "pandas", "psutil >= 5.4", "pybids >= 0.15.2", "requests", - "sdcflows @ git+https://github.com/nipreps/sdcflows.git@master", - "smriprep @ git+https://github.com/nipreps/smriprep.git@master", + "sdcflows >= 2.10.0", + "smriprep >= 0.16.0", "tedana >= 23.0.2", "templateflow >= 24.1.0", "transforms3d", From 2266556131d959ba448529b9b5e47a15d5898f2f Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 22 Aug 2024 21:06:44 -0400 Subject: [PATCH 03/11] chore: Update pins --- env.yml | 6 +-- requirements.txt | 116 +++++++++++++++++++++++++++++++++-------------- 2 files changed, 85 insertions(+), 37 deletions(-) diff --git a/env.yml b/env.yml index 91103e04..14cb4345 100644 --- a/env.yml +++ b/env.yml @@ -15,12 +15,12 @@ dependencies: # Base scientific python stack; required by FSL, so pinned here - numpy=1.26 - scipy=1.13 - - matplotlib=3.8 + - matplotlib=3.9 - pandas=2.2 - h5py=3.11 # Dependencies compiled against numpy, best to stick with conda - - nitime=0.10 - - scikit-image=0.23 + - nitime=0.11 + - scikit-image=0.24 - scikit-learn=1.4 # Utilities - graphviz=9.0 diff --git a/requirements.txt b/requirements.txt index 55a28943..2cf0931c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,10 @@ # This file was autogenerated by uv via the following command: # uv pip compile --extra=container --strip-extras pyproject.toml -o requirements.txt -p 3.11 acres==0.1.0 - # via fmriprep (pyproject.toml) + # via + # fmriprep (pyproject.toml) + # niworkflows + # smriprep annexremote==1.6.5 # via # datalad @@ -13,19 +16,23 @@ arrow==1.3.0 # via codecarbon astor==0.8.1 # via formulaic -attrs==23.2.0 +attrs==24.2.0 # via + # jsonschema # niworkflows + # referencing # sdcflows backports-tarfile==1.2.0 # via jaraco-context -bids-validator==1.14.6 +bids-validator==1.14.7.post0 # via pybids +bidsschematools==0.11.0 + # via bids-validator bokeh==3.4.1 # via tedana -boto3==1.34.149 +boto3==1.35.4 # via datalad -botocore==1.34.149 +botocore==1.35.4 # via # boto3 # s3transfer @@ -33,7 +40,7 @@ certifi==2024.7.4 # via # requests # sentry-sdk -cffi==1.16.0 +cffi==1.17.0 # via cryptography chardet==5.2.0 # via datalad @@ -45,10 +52,12 @@ ci-info==0.3.0 # migas click==8.1.7 # via + # bidsschematools # codecarbon # nipype # pybids -codecarbon==2.5.0 + # typer +codecarbon==2.6.0 # via fmriprep (pyproject.toml) contourpy==1.2.1 # via @@ -58,7 +67,7 @@ cryptography==43.0.0 # via secretstorage cycler==0.12.1 # via matplotlib -datalad==1.1.2 +datalad==1.1.3 # via # fmriprep (pyproject.toml) # datalad-next @@ -93,11 +102,11 @@ humanize==4.10.0 # datalad-next idna==3.7 # via requests -imageio==2.34.2 +imageio==2.35.1 # via scikit-image -importlib-metadata==8.2.0 +importlib-metadata==8.4.0 # via keyring -importlib-resources==6.4.0 +importlib-resources==6.4.4 # via nireports indexed-gzip==1.8.7 # via smriprep @@ -111,11 +120,11 @@ jaraco-classes==3.4.0 # via # keyring # keyrings-alt -jaraco-context==5.3.0 +jaraco-context==6.0.1 # via # keyring # keyrings-alt -jaraco-functools==4.0.1 +jaraco-functools==4.0.2 # via keyring jeepney==0.8.0 # via @@ -133,9 +142,13 @@ joblib==1.4.2 # via # nilearn # scikit-learn -keyring==25.2.1 +jsonschema==4.23.0 + # via bidsschematools +jsonschema-specifications==2023.12.1 + # via jsonschema +keyring==25.3.0 # via datalad -keyrings-alt==5.0.1 +keyrings-alt==5.0.2 # via datalad kiwisolver==1.4.5 # via matplotlib @@ -152,16 +165,18 @@ looseversion==1.3.0 # nipype # niworkflows # smriprep -lxml==5.2.2 +lxml==5.3.0 # via # nilearn # prov # svgutils mapca==0.0.5 # via tedana +markdown-it-py==3.0.0 + # via rich markupsafe==2.1.5 # via jinja2 -matplotlib==3.9.1 +matplotlib==3.9.2 # via # nireports # nitime @@ -169,11 +184,13 @@ matplotlib==3.9.1 # seaborn # smriprep # tedana +mdurl==0.1.2 + # via markdown-it-py migas==0.4.0 # via # fmriprep (pyproject.toml) # sdcflows -more-itertools==10.3.0 +more-itertools==10.4.0 # via # datalad-next # jaraco-classes @@ -211,15 +228,16 @@ nipype==1.8.6 # niworkflows # sdcflows # smriprep -nireports==23.2.1 +nireports==23.2.2 + # via fmriprep (pyproject.toml) nitime==0.11 # via fmriprep (pyproject.toml) -nitransforms==23.0.1 +nitransforms==24.0.0 # via # fmriprep (pyproject.toml) # niworkflows # sdcflows -niworkflows==1.10.2 +niworkflows==1.11.0 # via # fmriprep (pyproject.toml) # sdcflows @@ -282,7 +300,9 @@ pandas==2.2.2 # pybids # seaborn # tedana -patool==2.3.0 +pathlib==1.0.1 + # via nitransforms +patool==2.4.0 # via datalad pillow==10.4.0 # via @@ -294,6 +314,8 @@ platformdirs==4.2.2 # via datalad prometheus-client==0.20.0 # via codecarbon +prompt-toolkit==3.0.36 + # via questionary prov==2.0.1 # via nipype psutil==6.0.0 @@ -318,6 +340,8 @@ pycparser==2.22 # via cffi pydot==3.0.1 # via nipype +pygments==2.18.0 + # via rich pynvml==11.5.3 # via codecarbon pyparsing==3.1.2 @@ -333,25 +357,32 @@ python-dateutil==2.9.0.post0 # nipype # pandas # prov -python-gitlab==4.8.0 +python-gitlab==4.9.0 # via datalad pytz==2024.1 # via # apscheduler # pandas -pyyaml==6.0.1 +pyyaml==6.0.2 # via + # bidsschematools # bokeh # nireports # niworkflows # pybtex # smriprep -rapidfuzz==3.9.5 +questionary==2.0.1 + # via codecarbon +rapidfuzz==3.9.6 # via codecarbon rdflib==6.3.2 # via # nipype # prov +referencing==0.35.1 + # via + # jsonschema + # jsonschema-specifications requests==2.32.3 # via # fmriprep (pyproject.toml) @@ -365,6 +396,14 @@ requests==2.32.3 # templateflow requests-toolbelt==1.0.0 # via python-gitlab +rich==13.7.1 + # via + # codecarbon + # typer +rpds-py==0.20.0 + # via + # jsonschema + # referencing s3transfer==0.10.2 # via boto3 scikit-image==0.24.0 @@ -390,16 +429,19 @@ scipy==1.13.0 # scikit-learn # sdcflows # tedana -sdcflows==2.9.0 +sdcflows==2.10.0 + # via fmriprep (pyproject.toml) seaborn==0.13.2 # via # nireports # niworkflows secretstorage==3.3.3 # via keyring -sentry-sdk==2.11.0 +sentry-sdk==2.13.0 # via fmriprep (pyproject.toml) -simplejson==3.19.2 +shellingham==1.5.4 + # via typer +simplejson==3.19.3 # via nipype six==1.16.0 # via @@ -408,8 +450,9 @@ six==1.16.0 # osfclient # pybtex # python-dateutil -smriprep==0.15.0 -sqlalchemy==2.0.31 +smriprep==0.16.0 + # via fmriprep (pyproject.toml) +sqlalchemy==2.0.32 # via pybids svgutils==0.3.4 # via @@ -428,7 +471,7 @@ threadpoolctl==3.5.0 # via # scikit-learn # tedana -tifffile==2024.7.24 +tifffile==2024.8.10 # via scikit-image toml==0.10.2 # via @@ -436,7 +479,7 @@ toml==0.10.2 # sdcflows tornado==6.4.1 # via bokeh -tqdm==4.66.4 +tqdm==4.66.5 # via # datalad # osfclient @@ -451,12 +494,15 @@ transforms3d==0.4.2 # via # fmriprep (pyproject.toml) # niworkflows -types-python-dateutil==2.9.0.20240316 +typer==0.12.4 + # via codecarbon +types-python-dateutil==2.9.0.20240821 # via arrow typing-extensions==4.12.2 # via # formulaic # sqlalchemy + # typer tzdata==2024.1 # via pandas tzlocal==5.2 @@ -468,9 +514,11 @@ urllib3==2.2.2 # botocore # requests # sentry-sdk +wcwidth==0.2.13 + # via prompt-toolkit wrapt==1.16.0 # via formulaic xyzservices==2024.6.0 # via bokeh -zipp==3.19.2 +zipp==3.20.0 # via importlib-metadata From 80f176959ee0b4cabfb8987c7f4d369835ba9528 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 22 Aug 2024 21:14:08 -0400 Subject: [PATCH 04/11] chore: Bump pre-commit ruff version --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 177fd90f..d4ad3843 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: check-toml - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.3 + rev: v0.6.2 hooks: - id: ruff args: [ --fix ] From 730cf164640e0cf91838ba522f8acc2e3eba492d Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 22 Aug 2024 21:14:23 -0400 Subject: [PATCH 05/11] sty: ruff check --fix --- fmriprep/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmriprep/conftest.py b/fmriprep/conftest.py index d1947364..c72c7cc1 100644 --- a/fmriprep/conftest.py +++ b/fmriprep/conftest.py @@ -32,7 +32,7 @@ def _populate_namespace(doctest_namespace, tmp_path): doctest_namespace['testdir'] = tmp_path -@pytest.fixture() +@pytest.fixture def minimal_bids(tmp_path): bids = tmp_path / 'bids' bids.mkdir() From 72e73fdd5d271283339bed9c608ec8ad9419b4ea Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 22 Aug 2024 21:24:20 -0400 Subject: [PATCH 06/11] chore: Revert nitime, pending feedstock update --- env.yml | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/env.yml b/env.yml index 14cb4345..553eed34 100644 --- a/env.yml +++ b/env.yml @@ -19,7 +19,7 @@ dependencies: - pandas=2.2 - h5py=3.11 # Dependencies compiled against numpy, best to stick with conda - - nitime=0.11 + - nitime=0.10 - scikit-image=0.24 - scikit-learn=1.4 # Utilities diff --git a/requirements.txt b/requirements.txt index 2cf0931c..fff990b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -230,7 +230,7 @@ nipype==1.8.6 # smriprep nireports==23.2.2 # via fmriprep (pyproject.toml) -nitime==0.11 +nitime==0.10.2 # via fmriprep (pyproject.toml) nitransforms==24.0.0 # via From 939c792b26bf3f2c13954299f7f82dd33a45792b Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 22 Aug 2024 21:37:14 -0400 Subject: [PATCH 07/11] chore: Fix docker warning --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3dbe4c16..163c74f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,7 @@ RUN python -m build /src # # Utilities for downloading packages -FROM ${BASE_IMAGE} as downloader +FROM ${BASE_IMAGE} AS downloader # Bump the date to current to refresh curl/certificates/etc RUN echo "2023.07.20" RUN apt-get update && \ @@ -53,13 +53,13 @@ RUN apt-get update && \ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # FreeSurfer 7.3.2 -FROM downloader as freesurfer +FROM downloader AS freesurfer COPY docker/files/freesurfer7.3.2-exclude.txt /usr/local/etc/freesurfer7.3.2-exclude.txt RUN curl -sSL https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.3.2/freesurfer-linux-ubuntu22_amd64-7.3.2.tar.gz \ | tar zxv --no-same-owner -C /opt --exclude-from=/usr/local/etc/freesurfer7.3.2-exclude.txt # AFNI -FROM downloader as afni +FROM downloader AS afni # Bump the date to current to update AFNI RUN echo "2023.07.20" RUN mkdir -p /opt/afni-latest \ @@ -80,7 +80,7 @@ RUN mkdir -p /opt/afni-latest \ -name "3dvolreg" \) -delete # Connectome Workbench 1.5.0 -FROM downloader as workbench +FROM downloader AS workbench RUN mkdir /opt/workbench && \ curl -sSLO https://www.humanconnectome.org/storage/app/media/workbench/workbench-linux64-v1.5.0.zip && \ unzip workbench-linux64-v1.5.0.zip -d /opt && \ @@ -89,13 +89,13 @@ RUN mkdir /opt/workbench && \ strip --remove-section=.note.ABI-tag /opt/workbench/libs_linux64/libQt5Core.so.5 # Convert3d 1.4.0 -FROM downloader as c3d +FROM downloader AS c3d RUN mkdir /opt/convert3d && \ curl -fsSL --retry 5 https://sourceforge.net/projects/c3d/files/c3d/Experimental/c3d-1.4.0-Linux-gcc64.tar.gz/download \ | tar -xz -C /opt/convert3d --strip-components 1 # Micromamba -FROM downloader as micromamba +FROM downloader AS micromamba # Install a C compiler to build extensions when needed. # traits<6.4 wheels are not available for Python 3.11+, but build easily. @@ -125,7 +125,7 @@ RUN npm install -g svgo@^3.2.0 bids-validator@^1.14.0 && \ # # Main stage # -FROM ${BASE_IMAGE} as fmriprep +FROM ${BASE_IMAGE} AS fmriprep # Configure apt ENV DEBIAN_FRONTEND="noninteractive" \ From 7c98ba722269941c693bea984ae68f4b05a6d0b3 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Thu, 22 Aug 2024 22:34:23 -0400 Subject: [PATCH 08/11] doc: 24.1.0 Release notes --- CHANGES.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index e4e26503..0c5d2a7a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,16 @@ +24.1.0 (To be Determined) +========================= +New feature release in the 24.1.x series. + +Handling of gradient echo fieldmaps is improved. + + * FIX: Select volumetric dseg.tsv from recent TemplateFlow releases (#3257) + * RF: Adapt to less T1w-centric smriprep (#3333) + * RF: Use acres over vendored data loader (#3323) + * DOC: Add benchmark page (#3312) + * MAINT: Move to tox to simplify test/CI setup (#3326) + * CI: Fix expected outputs for fieldmaps (#3321) + 24.0.1 (July 16, 2024) ====================== Bug fix release in the 24.0.x series. From 97b7cd8db82a4f05b8796773260621bc644293a8 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Tue, 3 Sep 2024 10:01:28 -0400 Subject: [PATCH 09/11] PIN: Downgrade nitransforms for 24.1.x --- pyproject.toml | 2 +- requirements.txt | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e3d139e0..59434ca0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ dependencies = [ "nipype >= 1.8.5", "nireports >= 23.2.2", "nitime", - "nitransforms >= 21.0.0", + "nitransforms >= 21.0.0, != 24.0.0", "niworkflows >= 1.11.0", "numpy >= 1.22", "packaging", diff --git a/requirements.txt b/requirements.txt index fff990b5..77ca1784 100644 --- a/requirements.txt +++ b/requirements.txt @@ -232,7 +232,7 @@ nireports==23.2.2 # via fmriprep (pyproject.toml) nitime==0.10.2 # via fmriprep (pyproject.toml) -nitransforms==24.0.0 +nitransforms==23.0.1 # via # fmriprep (pyproject.toml) # niworkflows @@ -300,8 +300,6 @@ pandas==2.2.2 # pybids # seaborn # tedana -pathlib==1.0.1 - # via nitransforms patool==2.4.0 # via datalad pillow==10.4.0 From e7aacac8441cd7d30f90b3bde4c785b866511e85 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Tue, 10 Sep 2024 11:30:03 +0200 Subject: [PATCH 10/11] PIN: Working bids-validator --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 163c74f4..375ed903 100644 --- a/Dockerfile +++ b/Dockerfile @@ -119,7 +119,7 @@ RUN micromamba create -y -f /tmp/env.yml && \ # Check if this is still necessary when updating the base image. ENV PATH="/opt/conda/envs/fmriprep/bin:$PATH" \ UV_USE_IO_URING=0 -RUN npm install -g svgo@^3.2.0 bids-validator@^1.14.0 && \ +RUN npm install -g svgo@^3.2.0 bids-validator@1.14.11 && \ rm -r ~/.npm # From 01797fd766c13431e793bc3f74d5fb492ceb3701 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Tue, 10 Sep 2024 21:16:58 +0200 Subject: [PATCH 11/11] Pin bids-validator, try 2 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 375ed903..ad24aded 100644 --- a/Dockerfile +++ b/Dockerfile @@ -119,7 +119,7 @@ RUN micromamba create -y -f /tmp/env.yml && \ # Check if this is still necessary when updating the base image. ENV PATH="/opt/conda/envs/fmriprep/bin:$PATH" \ UV_USE_IO_URING=0 -RUN npm install -g svgo@^3.2.0 bids-validator@1.14.11 && \ +RUN npm install -g svgo@^3.2.0 bids-validator@1.14.10 && \ rm -r ~/.npm #