comparison env/lib/python3.9/site-packages/cwltool/provenance_constants.py @ 0:4f3585e2f14b draft default tip

"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author shellac
date Mon, 22 Mar 2021 18:12:50 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4f3585e2f14b
1 import hashlib
2 import os
3 import uuid
4
5 from prov.identifier import Namespace
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 major number if removing/"breaking" resources or PROV statements
14 # 2. Bump minor number if adding 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.6.0"
18
19 # Research Object folders
20 METADATA = "metadata"
21 DATA = "data"
22 WORKFLOW = "workflow"
23 SNAPSHOT = "snapshot"
24 # sub-folders
25 MAIN = os.path.join(WORKFLOW, "main")
26 PROVENANCE = os.path.join(METADATA, "provenance")
27 LOGS = os.path.join(METADATA, "logs")
28 WFDESC = Namespace("wfdesc", "http://purl.org/wf4ever/wfdesc#")
29 WFPROV = Namespace("wfprov", "http://purl.org/wf4ever/wfprov#")
30 WF4EVER = Namespace("wf4ever", "http://purl.org/wf4ever/wf4ever#")
31 RO = Namespace("ro", "http://purl.org/wf4ever/ro#")
32 ORE = Namespace("ore", "http://www.openarchives.org/ore/terms/")
33 FOAF = Namespace("foaf", "http://xmlns.com/foaf/0.1/")
34 SCHEMA = Namespace("schema", "http://schema.org/")
35 CWLPROV = Namespace("cwlprov", "https://w3id.org/cwl/prov#")
36 ORCID = Namespace("orcid", "https://orcid.org/")
37 UUID = Namespace("id", "urn:uuid:")
38
39 # BagIt and YAML always use UTF-8
40 ENCODING = "UTF-8"
41 TEXT_PLAIN = 'text/plain; charset="%s"' % ENCODING
42
43 # sha1, compatible with the File type's "checksum" field
44 # e.g. "checksum" = "sha1$47a013e660d408619d894b20806b1d5086aab03b"
45 # See ./cwltool/schemas/v1.0/Process.yml
46 Hasher = hashlib.sha1
47 SHA1 = "sha1"
48 SHA256 = "sha256"
49 SHA512 = "sha512"
50
51 # TODO: Better identifiers for user, at least
52 # these should be preserved in ~/.config/cwl for every execution
53 # on this host
54 USER_UUID = uuid.uuid4().urn
55 ACCOUNT_UUID = uuid.uuid4().urn