[med-svn] [cwltool] 01/01: Imported Upstream version 1.0.20160209222805
Michael Crusoe
misterc-guest at moszumanska.debian.org
Tue Feb 23 02:02:40 UTC 2016
This is an automated email from the git hooks/post-receive script.
misterc-guest pushed a commit to annotated tag upstream/1.0.20160209222805
in repository cwltool.
commit c36e784ce19d6eed2192e2bc69d3e807f0b3fb93
Author: Michael R. Crusoe <crusoe at ucdavis.edu>
Date: Mon Feb 22 10:04:24 2016 -0800
Imported Upstream version 1.0.20160209222805
---
PKG-INFO | 2 +-
cwltool.egg-info/PKG-INFO | 2 +-
cwltool/main.py | 41 +++++++++++++++++++++++++++++++++++++++++
setup.cfg | 2 +-
4 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/PKG-INFO b/PKG-INFO
index aaeefe9..cdf478d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: cwltool
-Version: 1.0.20160203221531
+Version: 1.0.20160209222805
Summary: Common workflow language reference implementation
Home-page: https://github.com/common-workflow-language/common-workflow-language
Author: Common workflow language working group
diff --git a/cwltool.egg-info/PKG-INFO b/cwltool.egg-info/PKG-INFO
index aaeefe9..cdf478d 100644
--- a/cwltool.egg-info/PKG-INFO
+++ b/cwltool.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: cwltool
-Version: 1.0.20160203221531
+Version: 1.0.20160209222805
Summary: Common workflow language reference implementation
Home-page: https://github.com/common-workflow-language/common-workflow-language
Author: Common workflow language working group
diff --git a/cwltool/main.py b/cwltool/main.py
index 72d3a45..832002b 100755
--- a/cwltool/main.py
+++ b/cwltool/main.py
@@ -99,6 +99,7 @@ def arg_parser():
help="Print corresponding RDF graph for workflow and exit")
exgroup.add_argument("--print-dot", action="store_true", help="Print workflow visualization in graphviz format and exit")
exgroup.add_argument("--print-pre", action="store_true", help="Print CWL document after preprocessing.")
+ exgroup.add_argument("--print-deps", action="store_true", help="Print CWL document dependencies from $import, $include, $schemas")
exgroup.add_argument("--version", action="store_true", help="Print version and exit")
exgroup.add_argument("--update", action="store_true", help="Update to latest CWL version, print and exit")
@@ -412,6 +413,42 @@ def load_job_order(args, t, parser):
return (job_order_object, input_basedir)
+def scandeps(base, doc):
+ r = []
+ if isinstance(doc, dict):
+ if "$import" in doc:
+ p = os.path.join(base, doc["$import"])
+ with open(p) as f:
+ r.append({
+ "class": "File",
+ "path": p,
+ "secondaryFiles": scandeps(os.path.dirname(p), yaml.load(f))
+ })
+ elif "$include" in doc:
+ p = os.path.join(base, doc["$include"])
+ r.append({
+ "class": "File",
+ "path": p
+ })
+ elif "$schemas" in doc:
+ for s in doc["$schemas"]:
+ p = os.path.join(base, s)
+ r.append({
+ "class": "File",
+ "path": p
+ })
+ else:
+ for d in doc.itervalues():
+ r.extend(scandeps(base, d))
+ elif isinstance(doc, list):
+ for d in doc:
+ r.extend(scandeps(base, d))
+ return r
+
+def print_deps(fn):
+ with open(fn) as f:
+ print json.dumps(scandeps(os.path.dirname(fn), yaml.load(f)), indent=4)
+
def main(args=None,
executor=single_job_executor,
makeTool=workflow.defaultMakeTool,
@@ -451,6 +488,10 @@ def main(args=None,
_logger.error("CWL document required")
return 1
+ if args.print_deps:
+ print_deps(args.workflow)
+ return 0
+
try:
t = load_tool(args.workflow, args.update, args.strict, makeTool, args.debug,
print_pre=args.print_pre,
diff --git a/setup.cfg b/setup.cfg
index 9d8b109..c70c7be 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
[egg_info]
-tag_build = .20160203221531
+tag_build = .20160209222805
tag_date = 0
tag_svn_revision = 0
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/cwltool.git
More information about the debian-med-commit
mailing list