Skip to content

Commit

Permalink
Define types for tuple input/output traits
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom committed Apr 9, 2020
1 parent 795e171 commit 7efb189
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lyman/workflows/preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,14 +503,14 @@ def write_time_series_gif(self, runtime, img, fname, title=None):
class SessionInput(LymanInterface):

class input_spec(TraitedSpec):
session = traits.Tuple()
session = traits.Tuple(traits.Str(), traits.Str())
data_dir = traits.Directory(exists=True)
proc_dir = traits.Directory(exists=True)
fm_template = traits.Str()
phase_encoding = traits.Either("ap", "pa")

class output_spec(TraitedSpec):
session_tuple = traits.Tuple()
session_tuple = traits.Tuple(traits.Str(), traits.Str())
subject = traits.Str()
session = traits.Str()
fm_file = traits.File(exists=True)
Expand Down Expand Up @@ -596,7 +596,7 @@ def _run_interface(self, runtime):
class RunInput(LymanInterface, TimeSeriesGIF):

class input_spec(TraitedSpec):
run = traits.Tuple()
run = traits.Tuple(traits.Str(), traits.Str(), traits.Str())
data_dir = traits.Directory(exists=True)
proc_dir = traits.Directory(exists=True)
experiment = traits.Str()
Expand All @@ -605,7 +605,7 @@ class input_spec(TraitedSpec):
crop_frames = traits.Int(0, usedefault=True)

class output_spec(TraitedSpec):
run_tuple = traits.Tuple()
run_tuple = traits.Tuple(traits.Str(), traits.Str(), traits.Str())
subject = traits.Str()
session = traits.Str()
run = traits.Str()
Expand Down Expand Up @@ -725,7 +725,7 @@ class input_spec(TraitedSpec):
warp_files = traits.List(traits.File(exists=True))
jacobian_files = traits.List(traits.File(Exists=True))
phase_encoding = traits.List(traits.Str)
session_tuple = traits.Tuple()
session_tuple = traits.Tuple(traits.Str(), traits.Str())

class output_spec(TraitedSpec):
raw_file = traits.File(exists=True)
Expand Down Expand Up @@ -896,7 +896,7 @@ class FinalizeTimeseries(LymanInterface, TimeSeriesGIF):

class input_spec(TraitedSpec):
experiment = traits.Str()
run_tuple = traits.Tuple()
run_tuple = traits.Tuple(traits.Str(), traits.Str(), traits.Str())
anat_file = traits.File(exists=True)
in_files = traits.List(traits.File(exists=True))
seg_file = traits.File(exists=True)
Expand Down Expand Up @@ -1038,7 +1038,7 @@ class FinalizeTemplate(LymanInterface):

class input_spec(TraitedSpec):
experiment = traits.Str()
session_tuple = traits.Tuple()
session_tuple = traits.Tuple(traits.Str(), traits.Str())
in_files = traits.List(traits.File(exists=True))
seg_file = traits.File(exists=True)
anat_file = traits.File(exists=True)
Expand Down Expand Up @@ -1170,7 +1170,7 @@ class RealignmentReport(LymanInterface):
class input_spec(TraitedSpec):
target_file = traits.File(exists=True)
realign_params = traits.File(exists=True)
run_tuple = traits.Tuple()
run_tuple = traits.Tuple(traits.Str(), traits.Str(), traits.Str())

class output_spec(TraitedSpec):
params_plot = traits.File(exists=True)
Expand Down Expand Up @@ -1237,7 +1237,7 @@ class AnatRegReport(LymanInterface):

class input_spec(TraitedSpec):
subject_id = traits.Str()
session_tuple = traits.Tuple()
session_tuple = traits.Tuple(traits.Str(), traits.Str())
data_dir = traits.Directory(exists=True)
in_file = traits.File(exists=True)
cost_file = traits.File(exists=True)
Expand Down Expand Up @@ -1279,7 +1279,7 @@ def _run_interface(self, runtime):
class CoregGIF(LymanInterface):

class input_spec(TraitedSpec):
run_tuple = traits.Tuple()
run_tuple = traits.Tuple(traits.Str(), traits.Str(), traits.Str())
in_file = traits.File(exists=True)
ref_file = traits.File(exists=True)
out_file = traits.File()
Expand Down

0 comments on commit 7efb189

Please sign in to comment.