Skip to content

Commit c435791

Browse files
committed
preserve run fields
1 parent f4a20b7 commit c435791

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

cwlupgrader/main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,23 @@ def _draft3_to_v1_0(document):
3030
if document["class"] == "Workflow":
3131
inputOutputClean(document)
3232
for out in document["outputs"]:
33-
out["outputSource"] = out.pop("source").lstrip('#')
33+
out["outputSource"] = \
34+
out.pop("source").lstrip('#').replace(".", "/")
3435
new_steps = {}
3536
for step in document["steps"]:
36-
new_step = {} # type: Dict[Text, Any]
37+
new_step = copy.deepcopy(step) # type: Dict[Text, Any]
38+
del new_step["id"]
3739
new_step["out"] = [ outp["id"][len(step["id"])+1:] for outp in
3840
step["outputs"] ]
41+
del new_step["outputs"]
3942
ins = {}
4043
for inp in step["inputs"]:
4144
ident = inp["id"][len(step["id"])+1:] # remove step id prefix
4245
inp["source"] = inp["source"].lstrip('#')
4346
del inp["id"]
4447
ins[ident] = inp
4548
new_step["in"] = ins
49+
del new_step["inputs"]
4650
if "scatter" in step:
4751
new_step["scatter"] = step["scatter"][ # remove step prefix
4852
len(step["id"])*2+3:]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
README = os.path.join(SETUP_DIR, 'README.rst')
1111

1212
setup(name='cwl-upgrader',
13-
version='0.3.2',
13+
version='0.3.3',
1414
description='Common Workflow Language standalone document upgrader',
1515
long_description=open(README).read(),
1616
author='Common Workflow Language contributors',

0 commit comments

Comments
 (0)