Skip to content

Commit 285eb05

Browse files
committed
Merge remote-tracking branch 'upstream/master' into interface/cat12
2 parents 89d3059 + ea117f2 commit 285eb05

File tree

180 files changed

+2791
-2387
lines changed

Some content is hidden

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

180 files changed

+2791
-2387
lines changed

.git-blame-ignore-revs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Commits with messages like "STY: black" or "run black"
2+
12deb959cccc431fb8222cc5854f1c92a0080021
3+
f64bf338f630a9ee5cbe7a3ec98c68292897e720
4+
83358d7f17aac07cb90d0330f11ea2322e2974d8
5+
faef7d0f93013a700c882f709e98fb3cd36ebb03
6+
d50c1858564c0b3073fb23c54886a0454cb66afa
7+
417b8897a116fcded5000e21e2b6ccbe29452a52
8+
aaf677a87f64c485f3e305799e4a5dc73b69e5fb
9+
f763008442d88d8ce00ec266698268389415f8d6
10+
b1eccafd4edc8503b02d715f5b5f6f783520fdf9
11+
70db90349598cc7f26a4a513779529fba7d0a797
12+
6c1d91d71f6f0db0e985bd2adc34206442b0653d
13+
97bdbd5f48ab242de5288ba4715192a27619a803
14+
78fa360f5b785224349b8b85b07e510d2233bb63
15+
7f85f43a34de8bff8e634232c939b17cee8e8fc5
16+
9c50b5daa797def5672dd057155b0e2c658853e2
17+
47194993ae14aceeec436cfb3769def667196668
18+
75653feadc6667d5313d83e9c62a5d5819771a9c
19+
497b44d680eee0892fa59c6aaaae22a17d70a536

.github/workflows/contrib.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Contribution checks
2+
3+
# This checks validate contributions meet baseline checks
4+
#
5+
# * specs - Ensure make
6+
7+
on:
8+
push:
9+
branches:
10+
- master
11+
- maint/*
12+
pull_request:
13+
branches:
14+
- master
15+
- maint/*
16+
17+
defaults:
18+
run:
19+
shell: bash
20+
21+
jobs:
22+
stable:
23+
# Check each OS, all supported Python, minimum versions and latest releases
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
matrix:
27+
os: ['ubuntu-18.04']
28+
python-version: [3.8]
29+
nipype-extras: ['dev']
30+
check: ['specs', 'style']
31+
env:
32+
DEPENDS: ""
33+
CHECK_TYPE: ${{ matrix.check }}
34+
NIPYPE_EXTRAS: ${{ matrix.nipype-extras }}
35+
EXTRA_PIP_FLAGS: ""
36+
INSTALL_DEB_DEPENDENCIES: false
37+
INSTALL_TYPE: pip
38+
CI_SKIP_TEST: 1
39+
40+
steps:
41+
- uses: actions/checkout@v2
42+
with:
43+
submodules: recursive
44+
fetch-depth: 0
45+
- name: Set up Python ${{ matrix.python-version }}
46+
uses: actions/setup-python@v2
47+
with:
48+
python-version: ${{ matrix.python-version }}
49+
- name: Display Python version
50+
run: python -c "import sys; print(sys.version)"
51+
- name: Create virtual environment
52+
run: tools/ci/create_venv.sh
53+
- name: Build archive
54+
run: |
55+
source tools/ci/build_archive.sh
56+
echo "ARCHIVE=$ARCHIVE" >> $GITHUB_ENV
57+
- name: Install Debian dependencies
58+
run: tools/ci/install_deb_dependencies.sh
59+
if: ${{ matrix.os == 'ubuntu-18.04' }}
60+
- name: Install dependencies
61+
run: tools/ci/install_dependencies.sh
62+
- name: Install Nipype
63+
run: tools/ci/install.sh
64+
- name: Run tests
65+
run: tools/ci/check.sh
66+
if: ${{ matrix.check != 'skiptests' }}
67+
- uses: codecov/codecov-action@v1
68+
with:
69+
file: coverage.xml
70+
if: ${{ always() }}
71+
- name: Upload pytest test results
72+
uses: actions/upload-artifact@v2
73+
with:
74+
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
75+
path: test-results.xml
76+
if: ${{ always() && matrix.check == 'test' }}

.github/workflows/tests.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Stable tests
2+
3+
# This file tests the claimed support range of nipype including
4+
#
5+
# * Operating systems: Linux, OSX
6+
# * Dependencies: minimum requirements, optional requirements
7+
# * Installation methods: setup.py, sdist, wheel, archive
8+
9+
on:
10+
push:
11+
branches:
12+
- master
13+
- maint/*
14+
pull_request:
15+
branches:
16+
- master
17+
- maint/*
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
jobs:
24+
stable:
25+
# Check each OS, all supported Python, minimum versions and latest releases
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
matrix:
29+
os: ['ubuntu-18.04']
30+
python-version: [3.6, 3.7, 3.8, 3.9]
31+
check: ['test']
32+
pip-flags: ['']
33+
depends: ['REQUIREMENTS']
34+
deb-depends: [false]
35+
nipype-extras: ['doc,tests,profiler']
36+
include:
37+
- os: ubuntu-18.04
38+
python-version: 3.8
39+
check: test
40+
pip-flags: ''
41+
depends: REQUIREMENTS
42+
deb-depends: true
43+
nipype-extras: doc,tests,nipy,profiler,duecredit,ssh
44+
env:
45+
DEPENDS: ${{ matrix.depends }}
46+
CHECK_TYPE: ${{ matrix.check }}
47+
EXTRA_PIP_FLAGS: ${{ matrix.pip-flags }}
48+
INSTALL_DEB_DEPENDENCIES: ${{ matrix.deb-depends }}
49+
NIPYPE_EXTRAS: ${{ matrix.nipype-extras }}
50+
INSTALL_TYPE: pip
51+
CI_SKIP_TEST: 1
52+
53+
steps:
54+
- uses: actions/checkout@v2
55+
with:
56+
submodules: recursive
57+
fetch-depth: 0
58+
- name: Set up Python ${{ matrix.python-version }}
59+
uses: actions/setup-python@v2
60+
with:
61+
python-version: ${{ matrix.python-version }}
62+
- name: Display Python version
63+
run: python -c "import sys; print(sys.version)"
64+
- name: Create virtual environment
65+
run: tools/ci/create_venv.sh
66+
- name: Build archive
67+
run: |
68+
source tools/ci/build_archive.sh
69+
echo "ARCHIVE=$ARCHIVE" >> $GITHUB_ENV
70+
- name: Install Debian dependencies
71+
run: tools/ci/install_deb_dependencies.sh
72+
if: ${{ matrix.os == 'ubuntu-18.04' }}
73+
- name: Install dependencies
74+
run: tools/ci/install_dependencies.sh
75+
- name: Install Nipype
76+
run: tools/ci/install.sh
77+
- name: Run tests
78+
run: tools/ci/check.sh
79+
if: ${{ matrix.check != 'skiptests' }}
80+
- uses: codecov/codecov-action@v1
81+
with:
82+
file: coverage.xml
83+
if: ${{ always() }}
84+
- name: Upload pytest test results
85+
uses: actions/upload-artifact@v2
86+
with:
87+
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
88+
path: test-results.xml
89+
if: ${{ always() && matrix.check == 'test' }}

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
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: v2.0.0
5+
rev: v3.4.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: 19.3b0
12+
rev: 20.8b1
1313
hooks:
1414
- id: black

.zenodo.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,9 @@
798798
"name": "Mihai, Paul Glad",
799799
"orcid": "0000-0001-5715-6442"
800800
},
801+
{
802+
"name": "Jalan, Raunak",
803+
},
801804
{
802805
"affiliation": "Department of Psychology, Stanford University",
803806
"name": "Gorgolewski, Krzysztof J.",

doc/users/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ NeuroDocker_.
116116
Installation for developers
117117
---------------------------
118118

119-
Developers should start `here <../devel/testing_nipype.html>`_.
119+
Developers should start `here <../devel/testing_nipype.rst>`_.
120120

121121
Developers can also use this docker container: `docker pull nipype/nipype:master`
122122

nipype/algorithms/confounds.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ class CompCor(SimpleInterface):
577577
]
578578

579579
def __init__(self, *args, **kwargs):
580-
""" exactly the same as compcor except the header """
580+
"""exactly the same as compcor except the header"""
581581
super(CompCor, self).__init__(*args, **kwargs)
582582
self._header = "CompCor"
583583

@@ -774,7 +774,7 @@ class ACompCor(CompCor):
774774
"""
775775

776776
def __init__(self, *args, **kwargs):
777-
""" exactly the same as compcor except the header """
777+
"""exactly the same as compcor except the header"""
778778
super(ACompCor, self).__init__(*args, **kwargs)
779779
self._header = "aCompCor"
780780

@@ -825,7 +825,7 @@ class TCompCor(CompCor):
825825
output_spec = TCompCorOutputSpec
826826

827827
def __init__(self, *args, **kwargs):
828-
""" exactly the same as compcor except the header """
828+
"""exactly the same as compcor except the header"""
829829
super(TCompCor, self).__init__(*args, **kwargs)
830830
self._header = "tCompCor"
831831
self._mask_files = []

nipype/algorithms/mesh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
class TVTKBaseInterface(BaseInterface):
26-
""" A base class for interfaces using VTK """
26+
"""A base class for interfaces using VTK"""
2727

2828
_redirect_x = True
2929

nipype/algorithms/metrics.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ class DistanceOutputSpec(TraitedSpec):
6363

6464

6565
class Distance(BaseInterface):
66-
"""Calculates distance between two volumes.
67-
"""
66+
"""Calculates distance between two volumes."""
6867

6968
input_spec = DistanceInputSpec
7069
output_spec = DistanceOutputSpec
@@ -542,7 +541,7 @@ class ErrorMapOutputSpec(TraitedSpec):
542541

543542

544543
class ErrorMap(BaseInterface):
545-
""" Calculates the error (distance) map between two input volumes.
544+
"""Calculates the error (distance) map between two input volumes.
546545
547546
Example
548547
-------

nipype/algorithms/misc.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ class SimpleThresholdOutputSpec(TraitedSpec):
141141

142142

143143
class SimpleThreshold(BaseInterface):
144-
"""Applies a threshold to input volumes
145-
"""
144+
"""Applies a threshold to input volumes"""
146145

147146
input_spec = SimpleThresholdInputSpec
148147
output_spec = SimpleThresholdOutputSpec
@@ -240,8 +239,7 @@ class CreateNiftiOutputSpec(TraitedSpec):
240239

241240

242241
class CreateNifti(BaseInterface):
243-
"""Creates a nifti volume
244-
"""
242+
"""Creates a nifti volume"""
245243

246244
input_spec = CreateNiftiInputSpec
247245
output_spec = CreateNiftiOutputSpec

nipype/algorithms/modelgen.py

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ def spm_hrf(RT, P=None, fMRI_T=16):
4040
% p - parameters of the response function (two gamma
4141
% functions)
4242
% defaults (seconds)
43-
% p(0) - delay of response (relative to onset) 6
44-
% p(1) - delay of undershoot (relative to onset) 16
45-
% p(2) - dispersion of response 1
46-
% p(3) - dispersion of undershoot 1
47-
% p(4) - ratio of response to undershoot 6
48-
% p(5) - onset (seconds) 0
49-
% p(6) - length of kernel (seconds) 32
43+
% p(0) - delay of response (relative to onset) 6
44+
% p(1) - delay of undershoot (relative to onset) 16
45+
% p(2) - dispersion of response 1
46+
% p(3) - dispersion of undershoot 1
47+
% p(4) - ratio of response to undershoot 6
48+
% p(5) - onset (seconds) 0
49+
% p(6) - length of kernel (seconds) 32
5050
%
5151
% hrf - hemodynamic response function
5252
% p - parameters of the response function
@@ -135,7 +135,7 @@ def scale_timings(timelist, input_units, output_units, time_repetition):
135135

136136

137137
def bids_gen_info(
138-
bids_event_files, condition_column="", amplitude_column=None, time_repetition=False,
138+
bids_event_files, condition_column="", amplitude_column=None, time_repetition=False
139139
):
140140
"""
141141
Generate a subject_info structure from a list of BIDS .tsv event files.
@@ -471,8 +471,7 @@ def _generate_standard_design(
471471
return sessinfo
472472

473473
def _generate_design(self, infolist=None):
474-
"""Generate design specification for a typical fmri paradigm
475-
"""
474+
"""Generate design specification for a typical fmri paradigm"""
476475
realignment_parameters = []
477476
if isdefined(self.inputs.realignment_parameters):
478477
for parfile in self.inputs.realignment_parameters:
@@ -517,8 +516,7 @@ def _generate_design(self, infolist=None):
517516
)
518517

519518
def _run_interface(self, runtime):
520-
"""
521-
"""
519+
""" """
522520
self._sessioninfo = None
523521
self._generate_design()
524522
return runtime
@@ -739,7 +737,7 @@ class SpecifySparseModelOutputSpec(SpecifyModelOutputSpec):
739737

740738

741739
class SpecifySparseModel(SpecifyModel):
742-
""" Specify a sparse model that is compatible with SPM/FSL designers [1]_.
740+
"""Specify a sparse model that is compatible with SPM/FSL designers [1]_.
743741
744742
Examples
745743
--------
@@ -770,8 +768,7 @@ class SpecifySparseModel(SpecifyModel):
770768
output_spec = SpecifySparseModelOutputSpec
771769

772770
def _gen_regress(self, i_onsets, i_durations, i_amplitudes, nscans):
773-
"""Generates a regressor for a sparse/clustered-sparse acquisition
774-
"""
771+
"""Generates a regressor for a sparse/clustered-sparse acquisition"""
775772
bplot = False
776773
if isdefined(self.inputs.save_plot) and self.inputs.save_plot:
777774
bplot = True
@@ -901,8 +898,7 @@ def _gen_regress(self, i_onsets, i_durations, i_amplitudes, nscans):
901898
return reg
902899

903900
def _cond_to_regress(self, info, nscans):
904-
"""Converts condition information to full regressors
905-
"""
901+
"""Converts condition information to full regressors"""
906902
reg = []
907903
regnames = []
908904
for i, cond in enumerate(info.conditions):

nipype/algorithms/rapidart.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,7 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None):
686686
save_json(statsfile, stats)
687687

688688
def _run_interface(self, runtime):
689-
"""Execute this module.
690-
"""
689+
"""Execute this module."""
691690
funcfilelist = ensure_list(self.inputs.realigned_files)
692691
motparamlist = ensure_list(self.inputs.realignment_parameters)
693692
for i, imgf in enumerate(funcfilelist):
@@ -814,8 +813,7 @@ def _get_spm_submatrix(self, spmmat, sessidx, rows=None):
814813
return outmatrix
815814

816815
def _run_interface(self, runtime):
817-
"""Execute this module.
818-
"""
816+
"""Execute this module."""
819817
import scipy.io as sio
820818

821819
motparamlist = self.inputs.realignment_parameters

0 commit comments

Comments
 (0)