Skip to content

Commit 32abf09

Browse files
committed
rename module
1 parent 8ac8aa9 commit 32abf09

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

cwl_utils/cite-extract.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
#!/usr/bin/env python3
22
import sys
3-
import CommonWorkflowLanguage as cwl
3+
import cwl_utils.parser_v1_0 as cwl
4+
45

56
def main():
67
top = cwl.load_document(sys.argv[1])
78
traverse(top)
89

10+
911
def extract_software_packages(process: cwl.Process):
1012
for req in extract_software_reqs(process):
1113
print(process.id)
1214
process_software_requirement(req)
1315

16+
1417
def extract_software_reqs(process: cwl.Process):
1518
if process.requirements:
1619
for req in process.requirements:
@@ -22,22 +25,25 @@ def extract_software_reqs(process: cwl.Process):
2225
yield cwl.load_field(req, cwl.SoftwareRequirementLoader,
2326
process.id, process.loadingOptions)
2427

28+
2529
def process_software_requirement(req: cwl.SoftwarePackage):
2630
for package in req.packages:
2731
print("Package: {}, version: {}, specs: {}".format(
28-
package.package, package.version, package.specs))
32+
package.package, package.version, package.specs))
2933

3034

3135
def traverse(process: cwl.Process):
3236
extract_software_packages(process)
3337
if isinstance(process, cwl.Workflow):
3438
traverse_workflow(process)
3539

40+
3641
def get_process_from_step(step: cwl.WorkflowStep):
3742
if isinstance(step.run, str):
3843
return cwl.load_document(step.run)
3944
return step.run
4045

46+
4147
def traverse_workflow(workflow: cwl.Workflow):
4248
for step in workflow.steps:
4349
extract_software_packages(step)

cwl_utils/docker-extract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
import sys
33
import os
4-
import CommonWorkflowLanguage as cwl
4+
import cwl_utils.parser_v1_0 as cwl
55
import subprocess
66
import argparse
77

cwl_utils/parser/__init__.py

Whitespace-only changes.
File renamed without changes.

0 commit comments

Comments
 (0)