Skip to content

Commit

Permalink
fix rebase mess
Browse files Browse the repository at this point in the history
  • Loading branch information
bpinsard committed May 15, 2024
1 parent 6d3d3e4 commit fb04e5d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 10 additions & 1 deletion niworkflows/interfaces/gradunwarp.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
SimpleInterface
)

has_gradunwarp = False
try:
from gradunwarp.core.gradient_unwarp import GradientUnwarpRunner
has_gradunwarp = True
except ImportError:
pass


class _GradUnwarpInputSpec(TraitedSpec):
infile = File(exists=True, mandatory=True, desc="input image to be corrected")
Expand Down Expand Up @@ -63,7 +70,9 @@ class GradUnwarp(SimpleInterface):

def _run_interface(self, runtime):

from gradunwarp.core.gradient_unwarp import GradientUnwarpRunner
if not has_gradunwarp:
raise RuntimeError('missing gradunwarp dependency')

gur = GradientUnwarpRunner(self.inputs)
gur.run()
gur.write()
Expand Down
4 changes: 0 additions & 4 deletions niworkflows/interfaces/tests/test_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,7 @@ def test_DerivativesDataSink_build_path(
**entities,
)

<<<<<<< HEAD
if isinstance(expectation, type):
=======
if type(expectation) is type(Exception):
>>>>>>> 601d1d1f (fix flake8 tests)
with pytest.raises(expectation):
dds.run()
return
Expand Down

0 comments on commit fb04e5d

Please sign in to comment.