Skip to content

Commit 8375356

Browse files
authored
Merge branch 'master' into mrtrix
2 parents fd470a5 + 1342d62 commit 8375356

37 files changed

+402
-146
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,3 @@ Fixes # .
1717

1818
## List of changes proposed in this PR (pull-request)
1919
<!-- We suggest using bullets (indicated by * or -) and filled checkboxes [x] here -->
20-
21-
## Acknowledgment
22-
23-
- [ ] \(Mandatory\) I acknowledge that this contribution will be available under the Apache 2 license.

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
runs-on: ${{ matrix.os }}
2727
strategy:
2828
matrix:
29-
os: ['ubuntu-18.04']
30-
python-version: [3.6, 3.7, 3.8, 3.9]
29+
os: ['ubuntu-latest']
30+
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
3131
check: ['test']
3232
pip-flags: ['']
3333
depends: ['REQUIREMENTS']

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ Kshitij Chawla <[email protected]>
121121
Leonie Lampe <[email protected]>
122122
Lukas Snoek <[email protected]>
123123
124+
Maria de Fatima Dias <[email protected]> <[email protected]>
124125
Martin Perez-Guevara <[email protected]>
125126
126127

.zenodo.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
},
264264
{
265265
"affiliation": "CIBIT, UC",
266-
"name": "Machado, F\u00e1tima",
266+
"name": "Dias, Maria de Fatima",
267267
"orcid": "0000-0001-8878-1750"
268268
},
269269
{
@@ -439,7 +439,8 @@
439439
},
440440
{
441441
"affiliation": "Sagol School of Neuroscience, Tel Aviv University",
442-
"name": "Baratz, Zvi"
442+
"name": "Baratz, Zvi",
443+
"orcid": "0000-0001-7159-1387"
443444
},
444445
{
445446
"affiliation": "University of Iowa",
@@ -863,7 +864,13 @@
863864
},
864865
{
865866
"name": "Hui Qian, Tan"
866-
}
867+
},
868+
{
869+
"affiliation": "Insitiute and Polyclinc for Diagnostic and Interventional Neuroradiology, University Hospital Carl Gustav Carus, Dresden, Germany",
870+
"name": "Kuntke, Paul",
871+
"orcid": "0000-0003-1838-2230"
872+
}
873+
867874
],
868875
"keywords": [
869876
"neuroimaging",

nipype/algorithms/confounds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,7 @@ def compute_noise_components(
14351435
else:
14361436
u = np.full((M.shape[0], 1), np.nan, dtype=np.float32)
14371437

1438-
variance_explained = (s ** 2) / np.sum(s ** 2)
1438+
variance_explained = (s**2) / np.sum(s**2)
14391439
cumulative_variance_explained = np.cumsum(variance_explained)
14401440

14411441
num_components = int(components_criterion)

nipype/algorithms/icc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def ICC_rep_anova(Y):
116116
# Sum Square Error
117117
predicted_Y = dot(dot(dot(X, pinv(dot(X.T, X))), X.T), Y.flatten("F"))
118118
residuals = Y.flatten("F") - predicted_Y
119-
SSE = (residuals ** 2).sum()
119+
SSE = (residuals**2).sum()
120120

121121
residuals.shape = Y.shape
122122

nipype/algorithms/metrics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def _run_interface(self, runtime):
337337
if self.inputs.weighting != "none":
338338
weights = weights / np.array(volumes1)
339339
if self.inputs.weighting == "squared_vol":
340-
weights = weights ** 2
340+
weights = weights**2
341341
weights = weights / np.sum(weights)
342342

343343
both_data = np.zeros(data1.shape)
@@ -500,7 +500,7 @@ def _run_interface(self, runtime):
500500
volumes = np.sum((refdata + tstdata) > 0, axis=1).reshape((-1, ncomp))
501501
weights = 1.0 / volumes
502502
if self.inputs.weighting == "squared_vol":
503-
weights = weights ** 2
503+
weights = weights**2
504504

505505
weights = weights / np.sum(weights)
506506
dices = 2.0 * jaccards / (jaccards + 1.0)
@@ -591,7 +591,7 @@ def _run_interface(self, runtime):
591591

592592
# Scale the difference
593593
if self.inputs.metric == "sqeuclidean":
594-
errvector = diffvector ** 2
594+
errvector = diffvector**2
595595
if comps > 1:
596596
errvector = np.sum(errvector, axis=1)
597597
else:

nipype/algorithms/tests/test_ErrorMap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ def test_errormap(tmpdir):
7575

7676
errmap.inputs.metric = "euclidean"
7777
result = errmap.run()
78-
assert result.outputs.distance == np.float32(1.25 * (2 ** 0.5))
78+
assert result.outputs.distance == np.float32(1.25 * (2**0.5))

nipype/info.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def get_nipype_gitversion():
5757
"Programming Language :: Python :: 3.6",
5858
"Programming Language :: Python :: 3.7",
5959
"Programming Language :: Python :: 3.8",
60+
"Programming Language :: Python :: 3.9",
61+
"Programming Language :: Python :: 3.10",
6062
"Topic :: Scientific/Engineering",
6163
]
6264
PYTHON_REQUIRES = ">= 3.6"
@@ -169,7 +171,6 @@ def get_nipype_gitversion():
169171
"sphinx-argparse",
170172
"sphinx>=2.1.2",
171173
"sphinxcontrib-apidoc",
172-
"sphinxcontrib-napoleon",
173174
],
174175
"duecredit": ["duecredit"],
175176
"nipy": ["nitime", "nilearn", "dipy", "nipy", "matplotlib"],

nipype/interfaces/ants/base.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
# vi: set ft=python sts=4 ts=4 sw=4 et:
44
"""The ants module provides basic functions for interfacing with ANTS tools."""
55
import os
6+
from packaging.version import Version, parse
67

78
# Local imports
8-
from ... import logging, LooseVersion
9+
from ... import logging
910
from ..base import CommandLine, CommandLineInputSpec, traits, isdefined, PackageInfo
1011

1112
iflogger = logging.getLogger("nipype.interface")
@@ -43,13 +44,16 @@ def parse_version(raw_info):
4344
# -githash may or may not be appended
4445
v_string = v_string.split("-")[0]
4546

46-
# 2.2.0-equivalent version string
47-
if "post" in v_string and LooseVersion(v_string) >= LooseVersion(
48-
"2.1.0.post789"
49-
):
50-
return "2.2.0"
51-
else:
52-
return ".".join(v_string.split(".")[:3])
47+
version = parse(v_string)
48+
49+
# Known mislabeled versions
50+
if version.is_postrelease:
51+
if version.base_version == "2.1.0" and version.post >= 789:
52+
return "2.2.0"
53+
54+
# Unless we know of a specific reason to re-version, we will
55+
# treat the base version (before pre/post/dev) as authoritative
56+
return version.base_version
5357

5458

5559
class ANTSCommandInputSpec(CommandLineInputSpec):

0 commit comments

Comments
 (0)