|
4 | 4 | """
|
5 | 5 | from __future__ import absolute_import
|
6 | 6 |
|
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 |
| - |
19 | 7 | import io
|
20 | 8 | from io import open
|
21 | 9 | import json
|
|
77 | 65 |
|
78 | 66 | if six.PY2:
|
79 | 67 | class PermissionError(OSError):
|
| 68 | + "to avoid mypy3 error" |
80 | 69 | 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" |
81 | 81 |
|
82 | 82 | relativised_input_object = {} # type: Dict[str, Any]
|
83 | 83 | #FIXME not module global
|
@@ -813,6 +813,7 @@ def _finalize(self):
|
813 | 813 |
|
814 | 814 | def user_provenance(self, document):
|
815 | 815 | # type: (ProvDocument) -> None
|
| 816 | + "adds the user provenance" |
816 | 817 | (username, fullname) = _whoami()
|
817 | 818 |
|
818 | 819 | if not self.full_name:
|
@@ -1023,7 +1024,7 @@ def _ro_annotations(self):
|
1023 | 1024 | # FIXME: Only primary*
|
1024 | 1025 | prov_files = [posixpath.relpath(p, METADATA) for p in self.tagfiles
|
1025 | 1026 | if p.startswith(_posix_path(PROVENANCE))
|
1026 |
| - and "/primary." in p] |
| 1027 | + and "/primary." in p] |
1027 | 1028 | annotations.append({
|
1028 | 1029 | "uri": uuid.uuid4().urn,
|
1029 | 1030 | "about": self.workflow_run_uri,
|
|
0 commit comments