Skip to content

Commit 32376ff

Browse files
authored
Merge pull request #837 from common-workflow-language/CWLProv
Research Object: don't copy input files into snapshot
2 parents da1f322 + 9dcd896 commit 32376ff

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed

cwltool/main.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -662,12 +662,6 @@ def loc_to_path(obj):
662662
prov_dep = prov_dependencies[1]
663663
assert prov_dep
664664
runtimeContext.research_obj.generate_snapshot(prov_dep)
665-
#for input file dependencies
666-
if input_for_prov:
667-
runtimeContext.research_obj.generate_snapshot(input_for_prov)
668-
#NOTE: keep these commented out lines to evaluate tests later
669-
#if job_order_object:
670-
#runtimeContext.research_obj.generate_snapshot(job_order_object)
671665

672666
runtimeContext.research_obj.close(args.provenance)
673667

cwltool/provenance.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@
44
"""
55
from __future__ import absolute_import
66

7-
__citation__ = "https://doi.org/10.5281/zenodo.1208477"
8-
9-
# NOTE: Semantic versioning of the CWLProv Research Object
10-
# **and** the cwlprov files
11-
#
12-
# Rough guide (major.minor.patch):
13-
# 1. Bump minor number if adding resources or PROV statements
14-
# 2. Bump major number if removing/"breaking" resources or PROV statements
15-
# 3. Bump patch number for non-breaking non-adding changes,
16-
# e.g. fixing broken relative paths
17-
CWLPROV_VERSION = "https://w3id.org/cwl/prov/0.3.0"
18-
197
import io
208
from io import open
219
import json
@@ -77,7 +65,19 @@
7765

7866
if six.PY2:
7967
class PermissionError(OSError):
68+
"to avoid mypy3 error"
8069
pass
70+
__citation__ = "https://doi.org/10.5281/zenodo.1208477"
71+
72+
# NOTE: Semantic versioning of the CWLProv Research Object
73+
# **and** the cwlprov files
74+
#
75+
# Rough guide (major.minor.patch):
76+
# 1. Bump minor number if adding resources or PROV statements
77+
# 2. Bump major number if removing/"breaking" resources or PROV statements
78+
# 3. Bump patch number for non-breaking non-adding changes,
79+
# e.g. fixing broken relative paths
80+
CWLPROV_VERSION = "https://w3id.org/cwl/prov/0.3.0"
8181

8282
relativised_input_object = {} # type: Dict[str, Any]
8383
#FIXME not module global
@@ -813,6 +813,7 @@ def _finalize(self):
813813

814814
def user_provenance(self, document):
815815
# type: (ProvDocument) -> None
816+
"adds the user provenance"
816817
(username, fullname) = _whoami()
817818

818819
if not self.full_name:
@@ -1023,7 +1024,7 @@ def _ro_annotations(self):
10231024
# FIXME: Only primary*
10241025
prov_files = [posixpath.relpath(p, METADATA) for p in self.tagfiles
10251026
if p.startswith(_posix_path(PROVENANCE))
1026-
and "/primary." in p]
1027+
and "/primary." in p]
10271028
annotations.append({
10281029
"uri": uuid.uuid4().urn,
10291030
"about": self.workflow_run_uri,

0 commit comments

Comments
 (0)