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 ] diff --git a/CHANGES.rst b/CHANGES.rst index e4e26503..6bc4c2ee 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,16 @@ +24.1.0 (September 16, 2024) +=========================== +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. diff --git a/Dockerfile b/Dockerfile index 3dbe4c16..ad24aded 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. @@ -119,13 +119,13 @@ 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.10 && \ rm -r ~/.npm # # Main stage # -FROM ${BASE_IMAGE} as fmriprep +FROM ${BASE_IMAGE} AS fmriprep # Configure apt ENV DEBIAN_FRONTEND="noninteractive" \ diff --git a/env.yml b/env.yml index 91103e04..553eed34 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 + - scikit-image=0.24 - scikit-learn=1.4 # Utilities - graphviz=9.0 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'), diff --git a/pyproject.toml b/pyproject.toml index cbace073..59434ca0 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", + "nitransforms >= 21.0.0, != 24.0.0", + "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", diff --git a/requirements.txt b/requirements.txt index 55a28943..77ca1784 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 -nitime==0.11 +nireports==23.2.2 + # via fmriprep (pyproject.toml) +nitime==0.10.2 # via fmriprep (pyproject.toml) nitransforms==23.0.1 # via # fmriprep (pyproject.toml) # niworkflows # sdcflows -niworkflows==1.10.2 +niworkflows==1.11.0 # via # fmriprep (pyproject.toml) # sdcflows @@ -282,7 +300,7 @@ pandas==2.2.2 # pybids # seaborn # tedana -patool==2.3.0 +patool==2.4.0 # via datalad pillow==10.4.0 # via @@ -294,6 +312,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 +338,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 +355,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 +394,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 +427,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 +448,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 +469,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 +477,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 +492,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 +512,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