Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
sapetnioc committed Apr 26, 2024
1 parent dbb9b07 commit efdae30
Show file tree
Hide file tree
Showing 15 changed files with 224 additions and 87 deletions.
3 changes: 1 addition & 2 deletions capsul/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,8 +1247,7 @@ def path_for_parameters(self, executable, parameters=None):

if parameters is None:
parameters = [
field.name
for field in executable.user_fields() # if field.path_type
field.name for field in executable.user_fields() # if field.path_type
]
if self.debug:
if self._current_iteration is not None:
Expand Down
6 changes: 3 additions & 3 deletions capsul/execution_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,9 +760,9 @@ def find_temporary_to_generate(executable):
else:
field.generate_temporary = True
if isinstance(node, ProcessIteration):
node.process.field(
field.name
).generate_temporary = field.generate_temporary
node.process.field(field.name).generate_temporary = (
field.generate_temporary
)
# print('!temporaries! ', field.name, '=', field.generate_temporary)

stack = [(executable, field) for field in executable.user_fields()]
Expand Down
4 changes: 1 addition & 3 deletions capsul/pipeline/pipeline_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,7 @@ def configure_controller(cls):
def configured_controller(self):
c = self.configure_controller()
c.outputs = [
field.name
for field in self.fields()
if field.is_output() # noqa: F811
field.name for field in self.fields() if field.is_output() # noqa: F811
]
c.inputs = self.get_switch_inputs()
c.output_types = [self.field(p).type_str() for p in self.outputs]
Expand Down
4 changes: 3 additions & 1 deletion capsul/pipeline/test/fake_morphologist/brainorientation.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,9 @@ def pipeline_definition(self):
self.Normalization_NormalizeFSL_allow_retry_initialization = True
self.Normalization_NormalizeFSL_NormalizeFSL_cost_function = "corratio"
self.Normalization_NormalizeFSL_NormalizeFSL_search_cost_function = "corratio"
self.Normalization_NormalizeFSL_ConvertFSLnormalizationToAIMS_standard_template = 0
self.Normalization_NormalizeFSL_ConvertFSLnormalizationToAIMS_standard_template = (
0
)
self.Normalization_NormalizeSPM_allow_retry_initialization = True
self.Normalization_NormalizeSPM_voxel_size = "[1 1 1]"
self.Normalization_NormalizeSPM_cutoff_option = 25
Expand Down
36 changes: 27 additions & 9 deletions capsul/pipeline/test/fake_morphologist/morphologist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1875,18 +1875,30 @@ def pipeline_definition(self):
self.PrepareSubject_Normalization_NormalizeFSL_alignment = (
"Not Aligned but Same Orientation"
)
self.PrepareSubject_Normalization_NormalizeFSL_set_transformation_in_source_volume = True
self.PrepareSubject_Normalization_NormalizeFSL_set_transformation_in_source_volume = (
True
)
self.PrepareSubject_Normalization_NormalizeFSL_NormalizeFSL_cost_function = (
"corratio"
)
self.PrepareSubject_Normalization_NormalizeFSL_NormalizeFSL_search_cost_function = "corratio"
self.PrepareSubject_Normalization_NormalizeFSL_ConvertFSLnormalizationToAIMS_standard_template = 0
self.PrepareSubject_Normalization_NormalizeFSL_NormalizeFSL_search_cost_function = (
"corratio"
)
self.PrepareSubject_Normalization_NormalizeFSL_ConvertFSLnormalizationToAIMS_standard_template = (
0
)
self.PrepareSubject_Normalization_NormalizeSPM_voxel_size = "[1 1 1]"
self.PrepareSubject_Normalization_NormalizeSPM_cutoff_option = 25
self.PrepareSubject_Normalization_NormalizeSPM_nbiteration = 16
self.PrepareSubject_Normalization_NormalizeSPM_ConvertSPMnormalizationToAIMS_target = "MNI template"
self.PrepareSubject_Normalization_NormalizeSPM_ConvertSPMnormalizationToAIMS_removeSource = False
self.PrepareSubject_Normalization_NormalizeBaladin_set_transformation_in_source_volume = True
self.PrepareSubject_Normalization_NormalizeSPM_ConvertSPMnormalizationToAIMS_target = (
"MNI template"
)
self.PrepareSubject_Normalization_NormalizeSPM_ConvertSPMnormalizationToAIMS_removeSource = (
False
)
self.PrepareSubject_Normalization_NormalizeBaladin_set_transformation_in_source_volume = (
True
)
self.PrepareSubject_Normalization_Normalization_AimsMIRegister_anatomical_template = "/casa/host/build/share/brainvisa-share-5.2/anatomical_templates/MNI152_T1_2mm.nii.gz"
self.PrepareSubject_Normalization_Normalization_AimsMIRegister_mni_to_acpc = "/casa/host/build/share/brainvisa-share-5.2/transformation/talairach_TO_spm_template_novoxels.trm"
self.PrepareSubject_Normalization_Normalization_AimsMIRegister_smoothing = 1.0
Expand Down Expand Up @@ -1929,15 +1941,21 @@ def pipeline_definition(self):
self.Renorm_Normalization_NormalizeFSL_NormalizeFSL_search_cost_function = (
"corratio"
)
self.Renorm_Normalization_NormalizeFSL_ConvertFSLnormalizationToAIMS_standard_template = 0
self.Renorm_Normalization_NormalizeFSL_ConvertFSLnormalizationToAIMS_standard_template = (
0
)
self.Renorm_Normalization_NormalizeSPM_voxel_size = "[1 1 1]"
self.Renorm_Normalization_NormalizeSPM_cutoff_option = 25
self.Renorm_Normalization_NormalizeSPM_nbiteration = 16
self.Renorm_Normalization_NormalizeSPM_ConvertSPMnormalizationToAIMS_target = (
"MNI template"
)
self.Renorm_Normalization_NormalizeSPM_ConvertSPMnormalizationToAIMS_removeSource = False
self.Renorm_Normalization_NormalizeBaladin_set_transformation_in_source_volume = True
self.Renorm_Normalization_NormalizeSPM_ConvertSPMnormalizationToAIMS_removeSource = (
False
)
self.Renorm_Normalization_NormalizeBaladin_set_transformation_in_source_volume = (
True
)
self.Renorm_Normalization_Normalization_AimsMIRegister_mni_to_acpc = "/casa/host/build/share/brainvisa-share-5.2/transformation/talairach_TO_spm_template_novoxels.trm"
self.Renorm_Normalization_Normalization_AimsMIRegister_smoothing = 1.0
self.SplitBrain_use_ridges = True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ def pipeline_definition(self):

self.nodes["Normalization"].plugs["reoriented_t1mri"].optional = True

self.nodes[
"Normalization"
].Normalization_AimsMIRegister_anatomical_template = undefined
self.nodes["Normalization"].Normalization_AimsMIRegister_anatomical_template = (
undefined
)
self.nodes["Normalization"].nodes[
"Normalization_AimsMIRegister"
].anatomical_template = undefined
Expand Down Expand Up @@ -345,7 +345,9 @@ def pipeline_definition(self):
self.Normalization_NormalizeFSL_allow_retry_initialization = True
self.Normalization_NormalizeFSL_NormalizeFSL_cost_function = "corratio"
self.Normalization_NormalizeFSL_NormalizeFSL_search_cost_function = "corratio"
self.Normalization_NormalizeFSL_ConvertFSLnormalizationToAIMS_standard_template = 0
self.Normalization_NormalizeFSL_ConvertFSLnormalizationToAIMS_standard_template = (
0
)
self.Normalization_NormalizeSPM_allow_retry_initialization = True
self.Normalization_NormalizeSPM_voxel_size = "[1 1 1]"
self.Normalization_NormalizeSPM_cutoff_option = 25
Expand Down
6 changes: 3 additions & 3 deletions capsul/process/test/test_load_from_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def mask(
pass


def cat(value1: str, value2: str, value3: str) -> field(
type_=str, desc="Concatenation of non empty input values."
):
def cat(
value1: str, value2: str, value3: str
) -> field(type_=str, desc="Concatenation of non empty input values."):
return "_".join(i for i in (value1, value2, value3) if i)


Expand Down
Loading

0 comments on commit efdae30

Please sign in to comment.