Skip to content

Commit

Permalink
Merge pull request #3587 from effigies/fix/test-failures
Browse files Browse the repository at this point in the history
FIX: Test failures
  • Loading branch information
effigies authored Jul 5, 2023
2 parents 4829683 + 5e2fd1c commit 7d4808f
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 116 deletions.
4 changes: 2 additions & 2 deletions .codespellrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ skip = .git,*.pdf,*.svg,external
# whos - smth used in matlab things
# SMAL - Stanford CNI MRS Library
# Suh - name
# noo,crasher - field/var name used
# noo,crasher,afile - field/var name used
# Reson - short journal name
# ALS, FWE - neuroimaging specific abbrevs
# Comision - foreign word used
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
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
11 changes: 9 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/conf.py
Expand All @@ -12,9 +18,10 @@ sphinx:
formats:
- htmlzip

# Optionally set the version of Python and requirements required to build your docs
# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
version: 3.7
install:
- requirements: doc/requirements.txt
- method: pip
Expand Down
4 changes: 2 additions & 2 deletions nipype/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ def get_nipype_gitversion():
"traits>=%s,<%s,!=5.0" % (TRAITS_MIN_VERSION, TRAITS_MAX_VERSION),
"filelock>=3.0.0",
"etelemetry>=0.2.0",
"looseversion",
"looseversion!=1.2",
]

TESTS_REQUIRES = [
"codecov",
"coverage<5",
"coverage",
"pytest",
"pytest-cov",
"pytest-env",
Expand Down
11 changes: 7 additions & 4 deletions nipype/interfaces/dcm2nii.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,11 @@ class Dcm2niixInputSpec(CommandLineInputSpec):
desc="Gzip compress images - [y=pigz, i=internal, n=no, 3=no,3D]",
)
merge_imgs = traits.Enum(
0, 1, 2,
0,
1,
2,
default=0,
usedefault=True,
argstr="-m %d",
desc="merge 2D slices from same series regardless of echo, exposure, etc. - [0=no, 1=yes, 2=auto]",
)
Expand Down Expand Up @@ -393,7 +397,7 @@ class Dcm2niix(CommandLine):
>>> converter.inputs.compression = 5
>>> converter.inputs.output_dir = 'ds005'
>>> converter.cmdline
'dcm2niix -b y -z y -5 -x n -t n -m n -o ds005 -s n -v n dicomdir'
'dcm2niix -b y -z y -5 -x n -t n -m 0 -o ds005 -s n -v n dicomdir'
>>> converter.run() # doctest: +SKIP
In the example below, we note that the current version of dcm2niix
Expand All @@ -406,7 +410,7 @@ class Dcm2niix(CommandLine):
>>> converter.inputs.compression = 5
>>> converter.inputs.output_dir = 'ds005'
>>> converter.cmdline
'dcm2niix -b y -z y -5 -x n -t n -m n -o ds005 -s n -v n .'
'dcm2niix -b y -z y -5 -x n -t n -m 0 -o ds005 -s n -v n .'
>>> converter.run() # doctest: +SKIP
"""

Expand All @@ -421,7 +425,6 @@ def version(self):
def _format_arg(self, opt, spec, val):
bools = [
"bids_format",
"merge_imgs",
"single_file",
"verbose",
"crop",
Expand Down
4 changes: 2 additions & 2 deletions nipype/interfaces/fsl/tests/test_auto_ProbTrackX.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ def test_ProbTrackX_inputs():
argstr="--randfib=%d",
),
random_seed=dict(
argstr="--rseed",
argstr="--rseed=%d",
),
s2tastext=dict(
argstr="--s2tastext",
),
sample_random_points=dict(
argstr="--sampvox",
argstr="--sampvox=%.3f",
),
samples_base_name=dict(
argstr="--samples=%s",
Expand Down
4 changes: 2 additions & 2 deletions nipype/interfaces/fsl/tests/test_auto_ProbTrackX2.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ def test_ProbTrackX2_inputs():
argstr="--randfib=%d",
),
random_seed=dict(
argstr="--rseed",
argstr="--rseed=%d",
),
s2tastext=dict(
argstr="--s2tastext",
),
sample_random_points=dict(
argstr="--sampvox",
argstr="--sampvox=%.3f",
),
samples_base_name=dict(
argstr="--samples=%s",
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/tests/test_auto_Dcm2niix.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_Dcm2niix_inputs():
argstr="-i",
),
merge_imgs=dict(
argstr="-m",
argstr="-m %d",
usedefault=True,
),
out_filename=dict(
Expand Down
3 changes: 0 additions & 3 deletions nipype/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
template = funcfile
transfm = funcfile

from . import decorators
from .utils import package_check, TempFATFS

skipif = decorators.dec.skipif


def example_data(infile="functional.nii"):
"""returns path to empty example data files for doc tests
Expand Down
98 changes: 0 additions & 98 deletions nipype/testing/decorators.py

This file was deleted.

0 comments on commit 7d4808f

Please sign in to comment.