Skip to content

Commit

Permalink
Fix gxformat2 to .ga conversion if hide: true specified on output
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Nov 28, 2024
1 parent ee25b57 commit e62cbd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gxformat2/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
'hide': {
'action_class': "HideDatasetAction",
'default': False,
'arguments': lambda x: x,
'arguments': lambda x: {},
},
'rename': {
'action_class': 'RenameDatasetAction',
Expand All @@ -46,7 +46,7 @@
'delete_intermediate_datasets': {
'action_class': 'DeleteIntermediatesAction',
'default': False,
'arguments': lambda x: x,
'arguments': lambda x: {},
},
'change_datatype': {
'action_class': 'ChangeDatatypeAction',
Expand Down
4 changes: 2 additions & 2 deletions tests/test_post_job_action_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ def test_post_job_action_to_native(wf_template):
expected_value = {'tags': 'tag'}
elif isinstance(default_value, bool):
action_value = 'true'
expected_value = True
expected_value = {}
workflow_yaml = wf_template.format(action=action_key, action_value=action_value)
native = to_native(workflow_yaml)
pja_class = POST_JOB_ACTIONS[action_key]['action_class']
expected_pja = {pja_class + 'out_file1': OrderedDict([
("output_name", "out_file1"),
("action_type", pja_class),
("action_arguments", expected_value or action_value),
("action_arguments", expected_value if expected_value is not None else action_value),
])}
expected_pja = json.dumps(expected_pja, sort_keys=True)
converted_pjas = json.dumps(native['steps']['1']['post_job_actions'], sort_keys=True)
Expand Down

0 comments on commit e62cbd0

Please sign in to comment.