Skip to content

Commit bff1028

Browse files
authored
Merge branch 'master' into added_mrtrix3_functions
2 parents bc595b8 + f1a8909 commit bff1028

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+207
-93
lines changed

.codespellrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ skip = .git,*.pdf,*.svg,external
99
# Reson - short journal name
1010
# ALS, FWE - neuroimaging specific abbrevs
1111
# Comision - foreign word used
12-
ignore-words-list = te,inport,objekt,jist,nd,hel,inout,fith,whos,fot,ue,shs,smal,nam,filetest,suh,noo,reson,als,fwe,crasher,comision,afile
12+
# expad - AFNI flag
13+
ignore-words-list = te,inport,objekt,jist,nd,hel,inout,fith,whos,fot,ue,shs,smal,nam,filetest,suh,noo,reson,als,fwe,crasher,comision,afile,expad

.git-blame-ignore-revs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Tue Feb 27 14:28:18 2024 -0500 - effigies@gmail.com - STY: black 2024.2 [ignore-rev]
2+
f1cbc1c941f8d02659f8ef245aac0862efb80ccf
3+
# Mon Sep 11 13:36:40 2023 +0200 - 37933899+servoz@users.noreply.github.com - run black for nipype/interfaces/spm/preprocess.py
4+
b9cac5e993143febb01ade42e56b41009427a4b6
5+
# Wed Jul 5 16:31:45 2023 -0400 - effigies@gmail.com - STY: Run black and fix typo
6+
34a4ac6eeff8d4924b40875c45df5d84a97da90b
7+
# Wed Jul 5 11:30:42 2023 -0400 - effigies@gmail.com - STY: black
8+
3b89ca85faf2428ecf7844de9c0db4aa7c329c93
9+
# Wed Jul 5 09:49:31 2023 -0400 - effigies@gmail.com - STY: black
10+
4a6a7d9d25d5d1e1f0eb55828dede58f8b9c9f80
111
# Wed Apr 5 14:01:05 2023 -0400 - effigies@gmail.com - STY: black [ignore-rev]
212
a9ce9b78a402ebacf7726ad6454bb75b1447f52f
313
# Wed Sep 14 14:12:07 2022 -0400 - mathiasg@stanford.edu - STY: Black

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "weekly"
8+
groups:
9+
actions-infrastructure:
10+
patterns:
11+
- "actions/*"

.github/workflows/contrib.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
submodules: recursive
5151
fetch-depth: 0
5252
- name: Set up Python ${{ matrix.python-version }}
53-
uses: actions/setup-python@v4
53+
uses: actions/setup-python@v5
5454
with:
5555
python-version: ${{ matrix.python-version }}
5656
- name: Display Python version
@@ -71,12 +71,13 @@ jobs:
7171
- name: Run tests
7272
run: tools/ci/check.sh
7373
if: ${{ matrix.check != 'skiptests' }}
74-
- uses: codecov/codecov-action@v3
74+
- uses: codecov/codecov-action@v4
7575
with:
7676
file: coverage.xml
77+
token: ${{ secrets.CODECOV_TOKEN }}
7778
if: ${{ always() }}
7879
- name: Upload pytest test results
79-
uses: actions/upload-artifact@v3
80+
uses: actions/upload-artifact@v4
8081
with:
8182
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
8283
path: test-results.xml

.github/workflows/tests.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ jobs:
4040
- uses: actions/checkout@v4
4141
with:
4242
fetch-depth: 0
43-
- uses: actions/setup-python@v4
43+
- uses: actions/setup-python@v5
4444
with:
4545
python-version: 3
4646
- run: pip install --upgrade build twine
4747
- name: Build sdist and wheel
4848
run: python -m build
4949
- run: twine check dist/*
50-
- uses: actions/upload-artifact@v3
50+
- uses: actions/upload-artifact@v4
5151
with:
5252
name: dist
5353
path: dist/
@@ -59,11 +59,11 @@ jobs:
5959
matrix:
6060
package: ['wheel', 'sdist']
6161
steps:
62-
- uses: actions/download-artifact@v3
62+
- uses: actions/download-artifact@v4
6363
with:
6464
name: dist
6565
path: dist/
66-
- uses: actions/setup-python@v4
66+
- uses: actions/setup-python@v5
6767
with:
6868
python-version: 3
6969
- name: Display Python version
@@ -124,7 +124,7 @@ jobs:
124124
steps:
125125
- uses: actions/checkout@v4
126126
- name: Set up Python ${{ matrix.python-version }}
127-
uses: actions/setup-python@v4
127+
uses: actions/setup-python@v5
128128
with:
129129
python-version: ${{ matrix.python-version }}
130130
- name: Display Python version
@@ -145,14 +145,15 @@ jobs:
145145
- name: Run tests
146146
run: tools/ci/check.sh
147147
if: ${{ matrix.check != 'skiptests' }}
148-
- uses: codecov/codecov-action@v3
148+
- uses: codecov/codecov-action@v4
149149
with:
150150
file: coverage.xml
151+
token: ${{ secrets.CODECOV_TOKEN }}
151152
if: ${{ always() }}
152153
- name: Upload pytest test results
153-
uses: actions/upload-artifact@v3
154+
uses: actions/upload-artifact@v4
154155
with:
155-
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
156+
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.deb-depends }}
156157
path: test-results.xml
157158
if: ${{ always() && matrix.check == 'test' }}
158159

@@ -162,7 +163,7 @@ jobs:
162163
needs: [stable, test-package]
163164
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
164165
steps:
165-
- uses: actions/download-artifact@v3
166+
- uses: actions/download-artifact@v4
166167
with:
167168
name: dist
168169
path: dist/

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.4.0
5+
rev: v4.5.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- id: check-yaml
1010
- id: check-added-large-files
1111
- repo: https://github.com/psf/black
12-
rev: 23.3.0
12+
rev: 24.2.0
1313
hooks:
1414
- id: black
1515
- repo: https://github.com/codespell-project/codespell
16-
rev: v2.2.5
16+
rev: v2.2.6
1717
hooks:
1818
- id: codespell

.zenodo.json

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -891,16 +891,6 @@
891891
"name": "Mihai, Paul Glad",
892892
"orcid": "0000-0001-5715-6442"
893893
},
894-
{
895-
"affiliation": "Department of Psychology, Stanford University",
896-
"name": "Gorgolewski, Krzysztof J.",
897-
"orcid": "0000-0003-3321-7583"
898-
},
899-
{
900-
"affiliation": "MIT, HMS",
901-
"name": "Ghosh, Satrajit",
902-
"orcid": "0000-0002-5312-6729"
903-
},
904894
{
905895
"affiliation": "University of Tübingen and MPI for Biological Cybernertics",
906896
"name": "Bannert, Michael M.",
@@ -909,12 +899,27 @@
909899
{
910900
"affiliation": "Research Centre Juelich",
911901
"name": "Wu, Jianxiao",
912-
"orcid": "0000-0002-4866-272X",
902+
"orcid": "0000-0002-4866-272X"
913903
},
914904
{
915905
"affiliation": "Department of Neurology, BG-University Hospital Bergmannsheil Bochum, Germany",
916906
"name": "Butry, Lionel"
917907
},
908+
{
909+
"affiliation": "Lund University",
910+
"name": "Anijärv, Toomas Erik",
911+
"orcid": "0000-0002-3650-4230"
912+
},
913+
{
914+
"affiliation": "Department of Psychology, Stanford University",
915+
"name": "Gorgolewski, Krzysztof J.",
916+
"orcid": "0000-0003-3321-7583"
917+
},
918+
{
919+
"affiliation": "MIT, HMS",
920+
"name": "Ghosh, Satrajit",
921+
"orcid": "0000-0002-5312-6729"
922+
}
918923
],
919924
"keywords": [
920925
"neuroimaging",

nipype/algorithms/modelgen.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,9 @@ def _generate_standard_design(
417417
sessinfo[i]["cond"][cid]["pmod"][j]["poly"] = info.pmod[
418418
cid
419419
].poly[j]
420-
sessinfo[i]["cond"][cid]["pmod"][j][
421-
"param"
422-
] = info.pmod[cid].param[j]
420+
sessinfo[i]["cond"][cid]["pmod"][j]["param"] = (
421+
info.pmod[cid].param[j]
422+
)
423423

424424
sessinfo[i]["regress"] = []
425425
if hasattr(info, "regressors") and info.regressors is not None:

nipype/algorithms/rapidart.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,9 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None):
584584
if displacement is not None:
585585
dmap = np.zeros((x, y, z, timepoints), dtype=np.float64)
586586
for i in range(timepoints):
587-
dmap[
588-
voxel_coords[0], voxel_coords[1], voxel_coords[2], i
589-
] = displacement[i, :]
587+
dmap[voxel_coords[0], voxel_coords[1], voxel_coords[2], i] = (
588+
displacement[i, :]
589+
)
590590
dimg = Nifti1Image(dmap, affine)
591591
dimg.to_filename(displacementfile)
592592
else:

nipype/caching/memory.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Using nipype with persistence and lazy recomputation but without explicit
33
name-steps pipeline: getting back scope in command-line based programming.
44
"""
5+
56
import os
67
import hashlib
78
import pickle

nipype/interfaces/afni/preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class AlignEpiAnatPy(AFNIPythonCommand):
180180
>>> al_ea.cmdline # doctest: +ELLIPSIS
181181
'python2 ...align_epi_anat.py -anat structural.nii -epi_base 0 -epi_strip 3dAutomask -epi \
182182
functional.nii -save_skullstrip -suffix _al -tshift off -volreg off'
183-
>>> res = allineate.run() # doctest: +SKIP
183+
>>> res = al_ea.run() # doctest: +SKIP
184184
185185
See Also
186186
--------

nipype/interfaces/ants/legacy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
are preserved for backwards compatibility.
55
"""
66

7-
87
import os
98
from glob import glob
109

nipype/interfaces/ants/registration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""The ants module provides basic functions for interfacing with ants
22
functions.
33
"""
4+
45
import os
56

67
from ...utils.filemanip import ensure_list

nipype/interfaces/ants/resampling.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""ANTS Apply Transforms interface
22
"""
3+
34
import os
45

56
from .base import ANTSCommand, ANTSCommandInputSpec
@@ -349,6 +350,7 @@ class ApplyTransformsInputSpec(ANTSCommandInputSpec):
349350
"MultiLabel",
350351
"Gaussian",
351352
"BSpline",
353+
"GenericLabel",
352354
argstr="%s",
353355
usedefault=True,
354356
)
@@ -357,6 +359,7 @@ class ApplyTransformsInputSpec(ANTSCommandInputSpec):
357359
traits.Tuple(
358360
traits.Float(), traits.Float() # Gaussian/MultiLabel (sigma, alpha)
359361
),
362+
traits.Tuple(traits.Str()), # GenericLabel
360363
)
361364
transforms = InputMultiObject(
362365
traits.Either(File(exists=True), "identity"),
@@ -497,6 +500,7 @@ def _format_arg(self, opt, spec, val):
497500
"BSpline",
498501
"MultiLabel",
499502
"Gaussian",
503+
"GenericLabel",
500504
] and isdefined(self.inputs.interpolation_parameters):
501505
return "--interpolation {}[ {} ]".format(
502506
self.inputs.interpolation,

nipype/interfaces/ants/segmentation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Wrappers for segmentation utilities within ANTs."""
2+
23
import os
34
from glob import glob
45
from ...external.due import BibTeX

nipype/interfaces/ants/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""ANTs' utilities."""
2+
23
import os
34
from warnings import warn
45
from ..base import traits, isdefined, TraitedSpec, File, Str, InputMultiObject

nipype/interfaces/base/core.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,11 @@ def run(self, cwd=None, ignore_exception=None, **inputs):
380380
"""
381381
rtc = RuntimeContext(
382382
resource_monitor=config.resource_monitor and self.resource_monitor,
383-
ignore_exception=ignore_exception
384-
if ignore_exception is not None
385-
else self.ignore_exception,
383+
ignore_exception=(
384+
ignore_exception
385+
if ignore_exception is not None
386+
else self.ignore_exception
387+
),
386388
)
387389

388390
with indirectory(cwd or os.getcwd()):

nipype/interfaces/c3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Convert3D is a command-line tool for converting 3D images between common file formats."""
2+
23
import os
34
from glob import glob
45

nipype/interfaces/cmtk/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""CMP implements a full processing pipeline for creating connectomes with dMRI data."""
2+
23
from .cmtk import ROIGen, CreateMatrix, CreateNodes
34
from .nx import NetworkXMetrics, AverageNetworks
45
from .parcellation import Parcellate

nipype/interfaces/dcm2nii.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""dcm2nii converts images from the proprietary scanner DICOM format to NIfTI."""
2+
23
import os
34
import re
45
from copy import deepcopy

nipype/interfaces/diffusion_toolkit/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Diffusion Toolkit performs data reconstruction and fiber tracking on diffusion MR images."""
2+
23
from .base import Info
34
from .postproc import SplineFilter, TrackMerge
45
from .dti import DTIRecon, DTITracker

nipype/interfaces/dipy/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""DIPY is a computational neuroimaging tool for diffusion MRI."""
2+
23
from .tracks import StreamlineTractography, TrackDensityMap
34
from .tensors import TensorMode, DTI
45
from .preprocess import Resample, Denoise

nipype/interfaces/dipy/reconstruction.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Interfaces to the reconstruction algorithms in dipy
33
44
"""
5+
56
import os.path as op
67

78
import numpy as np

nipype/interfaces/dtitk/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<http://dti-tk.sourceforge.net/pmwiki/pmwiki.php>`_ command line tools.
66
77
"""
8+
89
from .registration import (
910
Rigid,
1011
Affine,

nipype/interfaces/fsl/epi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,9 +1059,9 @@ def _list_outputs(self):
10591059
if os.path.exists(out_shell_alignment_parameters):
10601060
outputs["out_shell_alignment_parameters"] = out_shell_alignment_parameters
10611061
if os.path.exists(out_shell_pe_translation_parameters):
1062-
outputs[
1063-
"out_shell_pe_translation_parameters"
1064-
] = out_shell_pe_translation_parameters
1062+
outputs["out_shell_pe_translation_parameters"] = (
1063+
out_shell_pe_translation_parameters
1064+
)
10651065
if os.path.exists(out_outlier_map):
10661066
outputs["out_outlier_map"] = out_outlier_map
10671067
if os.path.exists(out_outlier_n_stdev_map):

nipype/interfaces/fsl/tests/test_preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def func():
7070
"center": ("-c 54 75 80", [54, 75, 80]),
7171
"threshold": ("-t", True),
7272
"mesh": ("-e", True),
73-
"surfaces": ("-A", True)
73+
"surfaces": ("-A", True),
7474
# 'verbose': ('-v', True),
7575
# 'flags': ('--i-made-this-up', '--i-made-this-up'),
7676
}

nipype/interfaces/mipav/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""MIPAV enables quantitative analysis and visualization of multimodal medical images."""
2+
23
from .developer import (
34
JistLaminarVolumetricLayering,
45
JistBrainMgdmSegmentation,

nipype/interfaces/mne/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
"""MNE is a software for exploring, visualizing, and analyzing human neurophysiological data."""
2+
23
from .base import WatershedBEM

0 commit comments

Comments
 (0)