Skip to content

Commit 5747a6d

Browse files
authored
Merge pull request #1133 from effigies/pin/niworkflows
RF: Resume external nipype dependency
2 parents 5dd7819 + 366904f commit 5747a6d

40 files changed

+131
-135
lines changed

.circleci/config.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@ jobs:
296296
at: /tmp
297297
- restore_cache:
298298
keys:
299-
- ds005-anat-v6-{{ .Branch }}-{{ epoch }}
300-
- ds005-anat-v6-{{ .Branch }}
301-
- ds005-anat-v6-master
302-
- ds005-anat-v6-
299+
- ds005-anat-v7-{{ .Branch }}-{{ epoch }}
300+
- ds005-anat-v7-{{ .Branch }}
301+
- ds005-anat-v7-master
302+
- ds005-anat-v7-
303303
- run:
304304
name: Setting up test
305305
command: |
@@ -333,7 +333,7 @@ jobs:
333333
--debug --write-graph --mem_mb 4096 \
334334
--nthreads 2 --anat-only -vv
335335
- save_cache:
336-
key: ds005-anat-v6-{{ .Branch }}-{{ epoch }}
336+
key: ds005-anat-v7-{{ .Branch }}-{{ epoch }}
337337
paths:
338338
- /tmp/ds005/work
339339
- /tmp/ds005/derivatives/fmriprep
@@ -425,10 +425,10 @@ jobs:
425425
at: /tmp
426426
- restore_cache:
427427
keys:
428-
- ds054-anat-v4-{{ .Branch }}-{{ epoch }}
429-
- ds054-anat-v4-{{ .Branch }}
430-
- ds054-anat-v4-master
431-
- ds054-anat-v4-
428+
- ds054-anat-v5-{{ .Branch }}-{{ epoch }}
429+
- ds054-anat-v5-{{ .Branch }}
430+
- ds054-anat-v5-master
431+
- ds054-anat-v5-
432432
- run:
433433
name: Setting up test
434434
command: |
@@ -462,7 +462,7 @@ jobs:
462462
--fs-no-reconall --debug --write-graph \
463463
--mem_mb 4096 --nthreads 2 --anat-only -vv
464464
- save_cache:
465-
key: ds054-anat-v4-{{ .Branch }}-{{ epoch }}
465+
key: ds054-anat-v5-{{ .Branch }}-{{ epoch }}
466466
paths:
467467
- /tmp/ds054/work
468468
- /tmp/ds054/derivatives
@@ -543,8 +543,8 @@ jobs:
543543
at: /tmp
544544
- restore_cache:
545545
keys:
546-
- ds210-anat-v1-{{ epoch }}
547-
- ds210-anat-v1-
546+
- ds210-anat-v2-{{ epoch }}
547+
- ds210-anat-v2-
548548
- run:
549549
name: Setting up test
550550
command: |
@@ -578,7 +578,7 @@ jobs:
578578
--fs-no-reconall --debug --write-graph \
579579
--mem_mb 4096 --nthreads 2 --anat-only -vv
580580
- save_cache:
581-
key: ds210-anat-v1-{{ epoch }}
581+
key: ds210-anat-v2-{{ epoch }}
582582
paths:
583583
- /tmp/ds210/work
584584
- /tmp/ds210/derivatives

docs/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ dependencies:
2828
- svgutils
2929
- nitime
3030
- nilearn
31-
- niworkflows>=0.3.13
31+
- niworkflows>=0.4.0

fmriprep/cli/fmriprep_bold_mask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# vi: set ft=python sts=4 ts=4 sw=4 et:
44
"""Run the BOLD reference+mask workflow"""
55
import os
6-
from niworkflows.nipype.utils.filemanip import hash_infile
6+
from nipype.utils.filemanip import hash_infile
77

88

99
def get_parser():

fmriprep/cli/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def get_parser():
228228

229229
def main():
230230
"""Entry point"""
231-
from niworkflows.nipype import logging as nlogging
231+
from nipype import logging as nlogging
232232
from multiprocessing import set_start_method, Process, Manager
233233
from ..viz.reports import generate_reports
234234
from ..info import __version__
@@ -335,7 +335,7 @@ def build_workflow(opts, retval):
335335
a hard-limited memory-scope.
336336
337337
"""
338-
from niworkflows.nipype import logging, config as ncfg
338+
from nipype import logging, config as ncfg
339339
from ..info import __version__
340340
from ..workflows.base import init_fmriprep_wf
341341
from ..utils.bids import collect_participants

fmriprep/info.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
'grabbit',
7171
'pybids>=0.5.1',
7272
'nitime',
73-
'niworkflows>=0.3.13',
73+
'nipype>=1.0.4',
74+
'niworkflows>=0.4.0',
7475
'statsmodels',
7576
'nipype',
7677
'seaborn',

fmriprep/interfaces/bids.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
1515
Disable warnings:
1616
17-
>>> import niworkflows.nipype as nn
18-
>>> nn.logging.getLogger('interface').setLevel('ERROR')
17+
>>> from nipype import logging
18+
>>> logging.getLogger('interface').setLevel('ERROR')
1919
2020
"""
2121

@@ -26,13 +26,13 @@
2626
import gzip
2727
from shutil import copytree, rmtree, copyfileobj
2828

29-
from niworkflows.nipype import logging
30-
from niworkflows.nipype.interfaces.base import (
29+
from nipype import logging
30+
from nipype.interfaces.base import (
3131
traits, isdefined, TraitedSpec, BaseInterfaceInputSpec,
3232
File, Directory, InputMultiPath, OutputMultiPath, Str,
3333
SimpleInterface
3434
)
35-
from niworkflows.nipype.utils.filemanip import copyfile
35+
from nipype.utils.filemanip import copyfile
3636

3737
LOGGER = logging.getLogger('interface')
3838
BIDS_NAME = re.compile(

fmriprep/interfaces/cifti.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
import numpy as np
1818
from nilearn.image import resample_to_img
1919

20-
from niworkflows.nipype.interfaces.base import (
20+
from nipype.interfaces.base import (
2121
BaseInterfaceInputSpec, TraitedSpec, File, traits,
2222
SimpleInterface, Directory
2323
)
2424
from niworkflows.data import getters
25-
from niworkflows.nipype.utils.filemanip import split_filename
25+
from nipype.utils.filemanip import split_filename
2626

2727
# CITFI structures with corresponding FS labels
2828
CIFTI_STRUCT_WITH_LABELS = {

fmriprep/interfaces/confounds.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
import shutil
1414
import numpy as np
1515
import pandas as pd
16-
from niworkflows.nipype import logging
17-
from niworkflows.nipype.utils.filemanip import fname_presuffix
18-
from niworkflows.nipype.interfaces.base import (
16+
from nipype import logging
17+
from nipype.utils.filemanip import fname_presuffix
18+
from nipype.interfaces.base import (
1919
traits, TraitedSpec, BaseInterfaceInputSpec, File, Directory, isdefined,
2020
SimpleInterface
2121
)

fmriprep/interfaces/fmap.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
import numpy as np
1919
import nibabel as nb
20-
from niworkflows.nipype import logging
21-
from niworkflows.nipype.utils.filemanip import fname_presuffix
22-
from niworkflows.nipype.interfaces.base import (
20+
from nipype import logging
21+
from nipype.utils.filemanip import fname_presuffix
22+
from nipype.interfaces.base import (
2323
BaseInterfaceInputSpec, TraitedSpec, File, isdefined, traits,
2424
SimpleInterface)
2525

@@ -241,7 +241,7 @@ def _despike2d(data, thres, neigh=None):
241241

242242
def _unwrap(fmap_data, mag_file, mask=None):
243243
from math import pi
244-
from niworkflows.nipype.interfaces.fsl import PRELUDE
244+
from nipype.interfaces.fsl import PRELUDE
245245
magnii = nb.load(mag_file)
246246

247247
if mask is None:
@@ -433,7 +433,7 @@ def _torads(in_file, fmap_range=None, newpath=None):
433433
"""
434434
from math import pi
435435
import nibabel as nb
436-
from niworkflows.nipype.utils.filemanip import fname_presuffix
436+
from nipype.utils.filemanip import fname_presuffix
437437

438438
out_file = fname_presuffix(in_file, suffix='_rad', newpath=newpath)
439439
fmapnii = nb.load(in_file)
@@ -452,7 +452,7 @@ def _tohz(in_file, range_hz, newpath=None):
452452
"""Convert a field map to Hz units"""
453453
from math import pi
454454
import nibabel as nb
455-
from niworkflows.nipype.utils.filemanip import fname_presuffix
455+
from nipype.utils.filemanip import fname_presuffix
456456

457457
out_file = fname_presuffix(in_file, suffix='_hz', newpath=newpath)
458458
fmapnii = nb.load(in_file)
@@ -485,7 +485,7 @@ def phdiff2fmap(in_file, delta_te, newpath=None):
485485
import math
486486
import numpy as np
487487
import nibabel as nb
488-
from niworkflows.nipype.utils.filemanip import fname_presuffix
488+
from nipype.utils.filemanip import fname_presuffix
489489
# GYROMAG_RATIO_H_PROTON_MHZ = 42.576
490490

491491
out_file = fname_presuffix(in_file, suffix='_fmap', newpath=newpath)

fmriprep/interfaces/freesurfer.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
1616
Disable warnings:
1717
18-
>>> import niworkflows.nipype as nn
19-
>>> nn.logging.getLogger('interface').setLevel('ERROR')
18+
>>> from nipype import logging
19+
>>> logging.getLogger('interface').setLevel('ERROR')
2020
2121
"""
2222

@@ -28,13 +28,13 @@
2828
from scipy.ndimage.morphology import binary_fill_holes
2929
from nilearn.image import resample_to_img, new_img_like
3030

31-
from niworkflows.nipype.utils.filemanip import copyfile, filename_to_list, fname_presuffix
32-
from niworkflows.nipype.interfaces.base import (
31+
from nipype.utils.filemanip import copyfile, filename_to_list, fname_presuffix
32+
from nipype.interfaces.base import (
3333
isdefined, InputMultiPath, BaseInterfaceInputSpec, TraitedSpec, File, traits, Directory
3434
)
35-
from niworkflows.nipype.interfaces import freesurfer as fs
36-
from niworkflows.nipype.interfaces.base import SimpleInterface
37-
from niworkflows.nipype.interfaces.freesurfer.preprocess import ConcatenateLTA
35+
from nipype.interfaces import freesurfer as fs
36+
from nipype.interfaces.base import SimpleInterface
37+
from nipype.interfaces.freesurfer.preprocess import ConcatenateLTA
3838

3939

4040
class StructuralReference(fs.RobustTemplate):

0 commit comments

Comments
 (0)