Skip to content

Commit d6bd589

Browse files
committed
adding specs dir to the python path in the converter
1 parent 975cd4f commit d6bd589

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/converter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
from nipype.interfaces.base import traits_extension
33
from pydra.engine import specs
44

5-
import os, yaml, black, imp
5+
import os, sys, yaml, black, imp
66
import traits
77
from pathlib import Path
88
import typing as ty
99
import inspect
1010
import click
1111
import warnings
1212

13+
sys.path.append(str(Path(__file__).resolve().parent.parent / 'specs'))
14+
import callables
1315

1416
class FSLConverter:
1517

@@ -344,7 +346,6 @@ def function_callables(self):
344346
python_functions_spec = Path(os.path.dirname(__file__)) / "../specs/callables.py"
345347
if not python_functions_spec.exists():
346348
raise Exception("specs/callables.py file is needed if output_callables in the spec files")
347-
from specs import callables
348349
fun_str = ""
349350
fun_names = list(set(self.interface_spec["output_callables"].values()))
350351
fun_names.sort()

0 commit comments

Comments
 (0)