From 604967126fe85977e107bfba5262649b63042861 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 26 Mar 2024 09:24:56 +0100 Subject: [PATCH 1/5] fix person without name breaks conversion --- src/runcrate/convert.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/runcrate/convert.py b/src/runcrate/convert.py index 1be480f..5a09c91 100644 --- a/src/runcrate/convert.py +++ b/src/runcrate/convert.py @@ -472,10 +472,12 @@ def add_agent(self, crate, roc_engine_run, engine): agent_id = a.identifier.uri if not agent_id.startswith("http"): agent_id = "#" + agent_id.rsplit(":", 1)[-1] - ro_a = crate.add(ContextEntity(crate, agent_id, properties={ - "@type": "Person", - "name": a.label - })) + properties = { + "@type": "Person" + } + if isinstance(a.label, str): + properties["name"] = a.label + ro_a = crate.add(ContextEntity(crate, agent_id, properties=properties)) roc_engine_run.append_to("agent", ro_a, compact=True) def add_action(self, crate, activity, parent_instrument=None): From a5fe1d770579c1bb4b5369d9eda8fae3a346107a Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 26 Mar 2024 09:47:26 +0100 Subject: [PATCH 2/5] cli test for agent without name --- .../revsort-no-agent-name-run-1/bag-info.txt | 6 + .../revsort-no-agent-name-run-1/bagit.txt | 2 + .../327fc7aedf4f6b69a42a7c8b808dc5a7aff61376 | 16 + .../97fe1b50b4582cebc7d853796ebd62e3e163aa3f | 16 + .../b9214658cc453331b62c2282b772a5c063dbd284 | 16 + .../manifest-sha1.txt | 3 + ...e.577e0cfe-9f26-4170-872b-94c1b2578771.txt | 49 ++ .../metadata/manifest.json | 254 ++++++ .../metadata/provenance/primary.cwlprov.json | 398 ++++++++++ .../provenance/primary.cwlprov.jsonld | 735 ++++++++++++++++++ .../metadata/provenance/primary.cwlprov.nt | 159 ++++ .../metadata/provenance/primary.cwlprov.provn | 66 ++ .../metadata/provenance/primary.cwlprov.ttl | 174 +++++ .../metadata/provenance/primary.cwlprov.xml | 222 ++++++ .../snapshot/revsort.cwl | 76 ++ .../snapshot/revtool.cwl | 40 + .../snapshot/sorttool.cwl | 36 + .../tagmanifest-sha1.txt | 15 + .../tagmanifest-sha256.txt | 15 + .../tagmanifest-sha512.txt | 15 + .../workflow/packed.cwl | 137 ++++ .../workflow/primary-job.json | 13 + .../workflow/primary-output.json | 13 + tests/test_cli.py | 13 + 24 files changed, 2489 insertions(+) create mode 100644 tests/data/revsort-no-agent-name-run-1/bag-info.txt create mode 100644 tests/data/revsort-no-agent-name-run-1/bagit.txt create mode 100644 tests/data/revsort-no-agent-name-run-1/data/32/327fc7aedf4f6b69a42a7c8b808dc5a7aff61376 create mode 100644 tests/data/revsort-no-agent-name-run-1/data/97/97fe1b50b4582cebc7d853796ebd62e3e163aa3f create mode 100644 tests/data/revsort-no-agent-name-run-1/data/b9/b9214658cc453331b62c2282b772a5c063dbd284 create mode 100644 tests/data/revsort-no-agent-name-run-1/manifest-sha1.txt create mode 100644 tests/data/revsort-no-agent-name-run-1/metadata/logs/engine.577e0cfe-9f26-4170-872b-94c1b2578771.txt create mode 100644 tests/data/revsort-no-agent-name-run-1/metadata/manifest.json create mode 100644 tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.json create mode 100644 tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.jsonld create mode 100644 tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.nt create mode 100644 tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.provn create mode 100644 tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.ttl create mode 100644 tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.xml create mode 100755 tests/data/revsort-no-agent-name-run-1/snapshot/revsort.cwl create mode 100755 tests/data/revsort-no-agent-name-run-1/snapshot/revtool.cwl create mode 100755 tests/data/revsort-no-agent-name-run-1/snapshot/sorttool.cwl create mode 100644 tests/data/revsort-no-agent-name-run-1/tagmanifest-sha1.txt create mode 100644 tests/data/revsort-no-agent-name-run-1/tagmanifest-sha256.txt create mode 100644 tests/data/revsort-no-agent-name-run-1/tagmanifest-sha512.txt create mode 100644 tests/data/revsort-no-agent-name-run-1/workflow/packed.cwl create mode 100644 tests/data/revsort-no-agent-name-run-1/workflow/primary-job.json create mode 100644 tests/data/revsort-no-agent-name-run-1/workflow/primary-output.json diff --git a/tests/data/revsort-no-agent-name-run-1/bag-info.txt b/tests/data/revsort-no-agent-name-run-1/bag-info.txt new file mode 100644 index 0000000..bd01306 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/bag-info.txt @@ -0,0 +1,6 @@ +Bag-Software-Agent: cwltool 3.1.20240112164112 +BagIt-Profile-Identifier: https://w3id.org/ro/bagit/profile +Bagging-Date: 2024-03-26 +External-Description: Research Object of CWL workflow run +External-Identifier: arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/ +Payload-Oxum: 3333.3 diff --git a/tests/data/revsort-no-agent-name-run-1/bagit.txt b/tests/data/revsort-no-agent-name-run-1/bagit.txt new file mode 100644 index 0000000..c4aebb4 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/bagit.txt @@ -0,0 +1,2 @@ +BagIt-Version: 0.97 +Tag-File-Character-Encoding: UTF-8 diff --git a/tests/data/revsort-no-agent-name-run-1/data/32/327fc7aedf4f6b69a42a7c8b808dc5a7aff61376 b/tests/data/revsort-no-agent-name-run-1/data/32/327fc7aedf4f6b69a42a7c8b808dc5a7aff61376 new file mode 100644 index 0000000..425d1ed --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/data/32/327fc7aedf4f6b69a42a7c8b808dc5a7aff61376 @@ -0,0 +1,16 @@ +Call me Ishmael. Some years ago--never mind how long precisely--having +little or no money in my purse, and nothing particular to interest me on +shore, I thought I would sail about a little and see the watery part of +the world. It is a way I have of driving off the spleen and regulating +the circulation. Whenever I find myself growing grim about the mouth; +whenever it is a damp, drizzly November in my soul; whenever I find +myself involuntarily pausing before coffin warehouses, and bringing up +the rear of every funeral I meet; and especially whenever my hypos get +such an upper hand of me, that it requires a strong moral principle to +prevent me from deliberately stepping into the street, and methodically +knocking people's hats off--then, I account it high time to get to sea +as soon as I can. This is my substitute for pistol and ball. With a +philosophical flourish Cato throws himself upon his sword; I quietly +take to the ship. There is nothing surprising in this. If they but knew +it, almost all men in their degree, some time or other, cherish very +nearly the same feelings towards the ocean with me. diff --git a/tests/data/revsort-no-agent-name-run-1/data/97/97fe1b50b4582cebc7d853796ebd62e3e163aa3f b/tests/data/revsort-no-agent-name-run-1/data/97/97fe1b50b4582cebc7d853796ebd62e3e163aa3f new file mode 100644 index 0000000..1001666 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/data/97/97fe1b50b4582cebc7d853796ebd62e3e163aa3f @@ -0,0 +1,16 @@ +gnivah--ylesicerp gnol woh dnim reven--oga sraey emoS .leamhsI em llaC +no em tseretni ot ralucitrap gnihton dna ,esrup ym ni yenom on ro elttil +fo trap yretaw eht ees dna elttil a tuoba lias dluow I thguoht I ,erohs +gnitaluger dna neelps eht ffo gnivird fo evah I yaw a si tI .dlrow eht +;htuom eht tuoba mirg gniworg flesym dnif I revenehW .noitalucric eht +dnif I revenehw ;luos ym ni rebmevoN ylzzird ,pmad a si ti revenehw +pu gnignirb dna ,sesuoheraw niffoc erofeb gnisuap yliratnulovni flesym +teg sopyh ym revenehw yllaicepse dna ;teem I larenuf yreve fo raer eht +ot elpicnirp larom gnorts a seriuqer ti taht ,em fo dnah reppu na hcus +yllacidohtem dna ,teerts eht otni gnippets yletarebiled morf em tneverp +aes ot teg ot emit hgih ti tnuocca I ,neht--ffo stah s'elpoep gnikconk +a htiW .llab dna lotsip rof etutitsbus ym si sihT .nac I sa noos sa +ylteiuq I ;drows sih nopu flesmih sworht otaC hsiruolf lacihposolihp +wenk tub yeht fI .siht ni gnisirprus gnihton si erehT .pihs eht ot ekat +yrev hsirehc ,rehto ro emit emos ,eerged rieht ni nem lla tsomla ,ti +.em htiw naeco eht sdrawot sgnileef emas eht ylraen diff --git a/tests/data/revsort-no-agent-name-run-1/data/b9/b9214658cc453331b62c2282b772a5c063dbd284 b/tests/data/revsort-no-agent-name-run-1/data/b9/b9214658cc453331b62c2282b772a5c063dbd284 new file mode 100644 index 0000000..97b096c --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/data/b9/b9214658cc453331b62c2282b772a5c063dbd284 @@ -0,0 +1,16 @@ +yrev hsirehc ,rehto ro emit emos ,eerged rieht ni nem lla tsomla ,ti +ylteiuq I ;drows sih nopu flesmih sworht otaC hsiruolf lacihposolihp +yllacidohtem dna ,teerts eht otni gnippets yletarebiled morf em tneverp +wenk tub yeht fI .siht ni gnisirprus gnihton si erehT .pihs eht ot ekat +teg sopyh ym revenehw yllaicepse dna ;teem I larenuf yreve fo raer eht +pu gnignirb dna ,sesuoheraw niffoc erofeb gnisuap yliratnulovni flesym +ot elpicnirp larom gnorts a seriuqer ti taht ,em fo dnah reppu na hcus +no em tseretni ot ralucitrap gnihton dna ,esrup ym ni yenom on ro elttil +gnivah--ylesicerp gnol woh dnim reven--oga sraey emoS .leamhsI em llaC +gnitaluger dna neelps eht ffo gnivird fo evah I yaw a si tI .dlrow eht +fo trap yretaw eht ees dna elttil a tuoba lias dluow I thguoht I ,erohs +dnif I revenehw ;luos ym ni rebmevoN ylzzird ,pmad a si ti revenehw +aes ot teg ot emit hgih ti tnuocca I ,neht--ffo stah s'elpoep gnikconk +a htiW .llab dna lotsip rof etutitsbus ym si sihT .nac I sa noos sa +;htuom eht tuoba mirg gniworg flesym dnif I revenehW .noitalucric eht +.em htiw naeco eht sdrawot sgnileef emas eht ylraen diff --git a/tests/data/revsort-no-agent-name-run-1/manifest-sha1.txt b/tests/data/revsort-no-agent-name-run-1/manifest-sha1.txt new file mode 100644 index 0000000..ea9cc62 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/manifest-sha1.txt @@ -0,0 +1,3 @@ +327fc7aedf4f6b69a42a7c8b808dc5a7aff61376 data/32/327fc7aedf4f6b69a42a7c8b808dc5a7aff61376 +97fe1b50b4582cebc7d853796ebd62e3e163aa3f data/97/97fe1b50b4582cebc7d853796ebd62e3e163aa3f +b9214658cc453331b62c2282b772a5c063dbd284 data/b9/b9214658cc453331b62c2282b772a5c063dbd284 diff --git a/tests/data/revsort-no-agent-name-run-1/metadata/logs/engine.577e0cfe-9f26-4170-872b-94c1b2578771.txt b/tests/data/revsort-no-agent-name-run-1/metadata/logs/engine.577e0cfe-9f26-4170-872b-94c1b2578771.txt new file mode 100644 index 0000000..48014d4 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/metadata/logs/engine.577e0cfe-9f26-4170-872b-94c1b2578771.txt @@ -0,0 +1,49 @@ +[2024-03-26T08:34:59,882.000000Z] [cwltool] /home/dbauer/.local/bin/cwltool --provenance testprov revsort.cwl input.yml +[2024-03-26T08:34:59,883.000000Z] Resolved 'revsort.cwl' to 'file:///home/dbauer/projects/runcrate/tests/data/revsort-run-author/snapshot/revsort.cwl' +[2024-03-26T08:35:00,191.000000Z] [provenance] Adding to RO file:///home/dbauer/projects/runcrate/tests/data/revsort-run-author/snapshot/hello.txt +[2024-03-26T08:35:00,192.000000Z] [workflow ] start +[2024-03-26T08:35:00,192.000000Z] [workflow ] starting step rev +[2024-03-26T08:35:00,192.000000Z] [step rev] start +[2024-03-26T08:35:00,204.000000Z] [job rev] /tmp/j235527o$ docker \ + run \ + -i \ + --mount=type=bind,source=/tmp/j235527o,target=/bhhcmi \ + --mount=type=bind,source=/tmp/ikqpjjr8,target=/tmp \ + --mount=type=bind,source=/home/dbauer/projects/runcrate/tests/data/revsort-run-author/snapshot/hello.txt,target=/var/lib/cwl/stgc6fb3435-bf77-40bf-a2d7-2ce7ffbd3469/hello.txt,readonly \ + --workdir=/bhhcmi \ + --read-only=true \ + --log-driver=none \ + --user=1000:1000 \ + --rm \ + --cidfile=/tmp/crhqjdrm/20240326093500-204573.cid \ + --env=TMPDIR=/tmp \ + --env=HOME=/bhhcmi \ + debian:8 \ + rev \ + /var/lib/cwl/stgc6fb3435-bf77-40bf-a2d7-2ce7ffbd3469/hello.txt > /tmp/j235527o/output.txt +[2024-03-26T08:35:01,207.000000Z] [job rev] completed success +[2024-03-26T08:35:01,207.000000Z] [step rev] completed success +[2024-03-26T08:35:01,207.000000Z] [workflow ] starting step sorted +[2024-03-26T08:35:01,207.000000Z] [step sorted] start +[2024-03-26T08:35:01,209.000000Z] [job sorted] /tmp/eo0fu8e3$ docker \ + run \ + -i \ + --mount=type=bind,source=/tmp/eo0fu8e3,target=/bhhcmi \ + --mount=type=bind,source=/tmp/2bhihxc0,target=/tmp \ + --mount=type=bind,source=/tmp/j235527o/output.txt,target=/var/lib/cwl/stg35a7c99e-7809-482d-92a1-712ed8215b58/output.txt,readonly \ + --workdir=/bhhcmi \ + --read-only=true \ + --log-driver=none \ + --user=1000:1000 \ + --rm \ + --cidfile=/tmp/0gcyad43/20240326093501-209419.cid \ + --env=TMPDIR=/tmp \ + --env=HOME=/bhhcmi \ + debian:8 \ + sort \ + --reverse \ + /var/lib/cwl/stg35a7c99e-7809-482d-92a1-712ed8215b58/output.txt > /tmp/eo0fu8e3/output.txt +[2024-03-26T08:35:02,211.000000Z] [job sorted] completed success +[2024-03-26T08:35:02,211.000000Z] [step sorted] completed success +[2024-03-26T08:35:02,212.000000Z] [workflow ] completed success +[2024-03-26T08:35:02,250.000000Z] Final process status is success diff --git a/tests/data/revsort-no-agent-name-run-1/metadata/manifest.json b/tests/data/revsort-no-agent-name-run-1/metadata/manifest.json new file mode 100644 index 0000000..5524619 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/metadata/manifest.json @@ -0,0 +1,254 @@ +{ + "@context": [ + { + "@base": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/metadata/" + }, + "https://w3id.org/bundle/context" + ], + "id": "/", + "conformsTo": "https://w3id.org/cwl/prov/0.6.0", + "manifest": "manifest.json", + "createdOn": "2024-03-26T09:35:02.251503", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + }, + "authoredBy": { + "orcid": "https://orcid.org/0000-0001-9447-460X" + }, + "aggregates": [ + { + "uri": "urn:hash::sha1:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376", + "bundledAs": { + "uri": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/data/32/327fc7aedf4f6b69a42a7c8b808dc5a7aff61376", + "folder": "/data/32/", + "filename": "327fc7aedf4f6b69a42a7c8b808dc5a7aff61376" + } + }, + { + "uri": "urn:hash::sha1:97fe1b50b4582cebc7d853796ebd62e3e163aa3f", + "bundledAs": { + "uri": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/data/97/97fe1b50b4582cebc7d853796ebd62e3e163aa3f", + "folder": "/data/97/", + "filename": "97fe1b50b4582cebc7d853796ebd62e3e163aa3f" + } + }, + { + "uri": "urn:hash::sha1:b9214658cc453331b62c2282b772a5c063dbd284", + "bundledAs": { + "uri": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/data/b9/b9214658cc453331b62c2282b772a5c063dbd284", + "folder": "/data/b9/", + "filename": "b9214658cc453331b62c2282b772a5c063dbd284" + } + }, + { + "uri": "../metadata/provenance/primary.cwlprov.json", + "mediatype": "application/json", + "conformsTo": [ + "http://www.w3.org/Submission/2013/SUBM-prov-json-20130424/", + "https://w3id.org/cwl/prov/0.6.0" + ], + "createdOn": "2024-03-26T09:35:02.251642", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + } + }, + { + "uri": "../metadata/provenance/primary.cwlprov.provn", + "mediatype": "text/provenance-notation; charset=\"UTF-8\"", + "conformsTo": [ + "http://www.w3.org/TR/2013/REC-prov-n-20130430/", + "https://w3id.org/cwl/prov/0.6.0" + ], + "createdOn": "2024-03-26T09:35:02.251657", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + } + }, + { + "uri": "../metadata/provenance/primary.cwlprov.xml", + "mediatype": "application/xml", + "conformsTo": [ + "http://www.w3.org/TR/2013/NOTE-prov-xml-20130430/", + "https://w3id.org/cwl/prov/0.6.0" + ], + "createdOn": "2024-03-26T09:35:02.251670", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + } + }, + { + "uri": "../metadata/provenance/primary.cwlprov.nt", + "mediatype": "application/n-triples", + "conformsTo": [ + "http://www.w3.org/TR/2013/REC-prov-o-20130430/", + "https://w3id.org/cwl/prov/0.6.0" + ], + "createdOn": "2024-03-26T09:35:02.251682", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + } + }, + { + "uri": "../workflow/primary-output.json", + "mediatype": "application/json", + "conformsTo": null, + "createdOn": "2024-03-26T09:35:02.251693", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + } + }, + { + "uri": null, + "mediatype": null, + "conformsTo": null, + "createdOn": "2024-03-26T09:27:15.015616", + "bundledAs": null + }, + { + "uri": "../workflow/packed.cwl", + "mediatype": "text/x+yaml; charset=\"UTF-8\"", + "conformsTo": "https://w3id.org/cwl/", + "createdOn": "2024-03-26T09:35:02.251717", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + } + }, + { + "uri": null, + "mediatype": null, + "conformsTo": null, + "createdOn": "2024-03-26T09:27:15.015616", + "bundledAs": null + }, + { + "uri": "../metadata/provenance/primary.cwlprov.jsonld", + "mediatype": "application/ld+json", + "conformsTo": [ + "http://www.w3.org/TR/2013/REC-prov-o-20130430/", + "https://w3id.org/cwl/prov/0.6.0" + ], + "createdOn": "2024-03-26T09:35:02.251737", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + } + }, + { + "uri": "../metadata/logs/engine.577e0cfe-9f26-4170-872b-94c1b2578771.txt", + "mediatype": "text/plain; charset='UTF-8'", + "conformsTo": null, + "createdOn": "2024-03-26T09:35:02.251748", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + } + }, + { + "uri": "../workflow/primary-job.json", + "mediatype": "application/json", + "conformsTo": null, + "createdOn": "2024-03-26T09:35:02.251758", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + } + }, + { + "uri": null, + "mediatype": null, + "conformsTo": null, + "createdOn": "2024-03-26T09:27:15.015616", + "bundledAs": null + }, + { + "uri": "../metadata/provenance/primary.cwlprov.ttl", + "mediatype": "text/turtle; charset=\"UTF-8\"", + "conformsTo": [ + "http://www.w3.org/TR/2013/REC-prov-o-20130430/", + "https://w3id.org/cwl/prov/0.6.0" + ], + "createdOn": "2024-03-26T09:35:02.251784", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + } + }, + { + "uri": "urn:uuid:b87ba1ac-3fc2-4137-9f2c-06d99cb47275", + "createdOn": "2024-03-26T09:35:00.192446", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + } + }, + { + "uri": "urn:uuid:f7144d14-29c9-4bbf-b6a6-33bcfbf8e229", + "createdOn": "2024-03-26T09:35:01.209602", + "createdBy": { + "uri": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "name": "cwltool 3.1.20240112164112" + } + } + ], + "annotations": [ + { + "uri": "urn:uuid:76f4764f-dd19-4c58-898b-adad72036297", + "about": "urn:uuid:73420c43-a023-4f52-9630-13bcdd9441c2", + "content": "/", + "oa:motivatedBy": { + "@id": "oa:describing" + } + }, + { + "uri": "urn:uuid:db5f255d-563b-411c-89b0-e36367cfaaa8", + "about": "urn:uuid:73420c43-a023-4f52-9630-13bcdd9441c2", + "content": [ + "provenance/primary.cwlprov.json", + "provenance/primary.cwlprov.provn", + "provenance/primary.cwlprov.xml", + "provenance/primary.cwlprov.nt", + "provenance/primary.cwlprov.jsonld", + "provenance/primary.cwlprov.ttl" + ], + "oa:motivatedBy": { + "@id": "http://www.w3.org/ns/prov#has_provenance" + } + }, + { + "uri": "urn:uuid:6f1ef0e3-ad93-43cd-a0e6-8ef04b26837c", + "about": "../workflow/packed.cwl", + "content": null, + "oa:motivatedBy": { + "@id": "oa:highlighting" + } + }, + { + "uri": "urn:uuid:d8f75161-e9df-415e-b504-acea93a09153", + "about": "urn:uuid:73420c43-a023-4f52-9630-13bcdd9441c2", + "content": [ + "../workflow/packed.cwl", + "../workflow/primary-job.json" + ], + "oa:motivatedBy": { + "@id": "oa:linking" + } + }, + { + "uri": "urn:uuid:da545c56-566a-4db9-8041-f85d078bb01d", + "about": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "content": [ + "metadata/logs/engine.577e0cfe-9f26-4170-872b-94c1b2578771.txt" + ], + "oa:motivatedBy": { + "@id": "https://w3id.org/cwl/prov#log" + } + } + ] +} diff --git a/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.json b/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.json new file mode 100644 index 0000000..9677c3d --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.json @@ -0,0 +1,398 @@ +{ + "prefix": { + "wfprov": "http://purl.org/wf4ever/wfprov#", + "wfdesc": "http://purl.org/wf4ever/wfdesc#", + "cwlprov": "https://w3id.org/cwl/prov#", + "foaf": "http://xmlns.com/foaf/0.1/", + "schema": "http://schema.org/", + "orcid": "https://orcid.org/", + "id": "urn:uuid:", + "data": "urn:hash::sha1:", + "sha256": "nih:sha-256;", + "researchobject": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/", + "metadata": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/metadata/", + "provenance": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/metadata/provenance/", + "wf": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#", + "input": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/primary-job.json#", + "wf4ever": "http://purl.org/wf4ever/wf4ever#" + }, + "agent": { + "id:dccc3c5a-089e-4c07-aeab-3e1b80a8bf21": {}, + "orcid:0000-0001-9447-460X": { + "prov:type": [ + { + "$": "prov:Person", + "type": "prov:QUALIFIED_NAME" + }, + { + "$": "schema:Person", + "type": "prov:QUALIFIED_NAME" + } + ] + }, + "id:577e0cfe-9f26-4170-872b-94c1b2578771": { + "prov:type": [ + { + "$": "prov:SoftwareAgent", + "type": "prov:QUALIFIED_NAME" + }, + { + "$": "wfprov:WorkflowEngine", + "type": "prov:QUALIFIED_NAME" + } + ], + "prov:label": "cwltool 3.1.20240112164112" + }, + "id:b1d25847-e010-4f49-b6d7-9cb0fbe612ff": { + "prov:type": { + "$": "prov:SoftwareAgent", + "type": "prov:QUALIFIED_NAME" + }, + "cwlprov:image": "debian:8", + "prov:label": "Container execution of image debian:8" + }, + "id:ed245546-74cf-4573-bcf2-1a1a0fd4641c": { + "prov:type": { + "$": "prov:SoftwareAgent", + "type": "prov:QUALIFIED_NAME" + }, + "cwlprov:image": "debian:8", + "prov:label": "Container execution of image debian:8" + } + }, + "actedOnBehalfOf": { + "_:id1": { + "prov:delegate": "id:dccc3c5a-089e-4c07-aeab-3e1b80a8bf21", + "prov:responsible": "orcid:0000-0001-9447-460X" + } + }, + "wasStartedBy": { + "_:id2": { + "prov:activity": "id:577e0cfe-9f26-4170-872b-94c1b2578771", + "prov:starter": "id:dccc3c5a-089e-4c07-aeab-3e1b80a8bf21", + "prov:time": "2024-03-26T09:35:00.174799" + }, + "_:id4": { + "prov:activity": "id:73420c43-a023-4f52-9630-13bcdd9441c2", + "prov:starter": "id:577e0cfe-9f26-4170-872b-94c1b2578771", + "prov:time": "2024-03-26T09:35:00.174854" + }, + "_:id9": { + "prov:activity": "id:192abf2b-ff1f-4ed9-a48b-11f026eecccb", + "prov:starter": "id:73420c43-a023-4f52-9630-13bcdd9441c2", + "prov:time": "2024-03-26T09:35:00.193352" + }, + "_:id17": { + "prov:activity": "id:6ff53435-de59-46e9-836f-ca8713277d0c", + "prov:starter": "id:73420c43-a023-4f52-9630-13bcdd9441c2", + "prov:time": "2024-03-26T09:35:01.208322" + } + }, + "activity": { + "id:73420c43-a023-4f52-9630-13bcdd9441c2": { + "prov:startTime": "2024-03-26T09:35:00.174824", + "prov:type": { + "$": "wfprov:WorkflowRun", + "type": "prov:QUALIFIED_NAME" + }, + "prov:label": "Run of workflow/packed.cwl#main" + }, + "id:192abf2b-ff1f-4ed9-a48b-11f026eecccb": { + "prov:type": { + "$": "wfprov:ProcessRun", + "type": "prov:QUALIFIED_NAME" + }, + "prov:label": "Run of workflow/packed.cwl#main/rev" + }, + "id:6ff53435-de59-46e9-836f-ca8713277d0c": { + "prov:type": { + "$": "wfprov:ProcessRun", + "type": "prov:QUALIFIED_NAME" + }, + "prov:label": "Run of workflow/packed.cwl#main/sorted" + } + }, + "wasAssociatedWith": { + "_:id3": { + "prov:activity": "id:73420c43-a023-4f52-9630-13bcdd9441c2", + "prov:agent": "id:577e0cfe-9f26-4170-872b-94c1b2578771", + "prov:plan": "wf:main" + }, + "_:id8": { + "prov:activity": "id:192abf2b-ff1f-4ed9-a48b-11f026eecccb", + "prov:agent": "id:577e0cfe-9f26-4170-872b-94c1b2578771", + "prov:plan": "wf:main/rev" + }, + "_:id10": { + "prov:activity": "id:192abf2b-ff1f-4ed9-a48b-11f026eecccb", + "prov:agent": "id:b1d25847-e010-4f49-b6d7-9cb0fbe612ff" + }, + "_:id16": { + "prov:activity": "id:6ff53435-de59-46e9-836f-ca8713277d0c", + "prov:agent": "id:577e0cfe-9f26-4170-872b-94c1b2578771", + "prov:plan": "wf:main/sorted" + }, + "_:id18": { + "prov:activity": "id:6ff53435-de59-46e9-836f-ca8713277d0c", + "prov:agent": "id:ed245546-74cf-4573-bcf2-1a1a0fd4641c" + } + }, + "entity": { + "wf:main": [ + { + "prov:type": [ + { + "$": "wfdesc:Workflow", + "type": "prov:QUALIFIED_NAME" + }, + { + "$": "prov:Plan", + "type": "prov:QUALIFIED_NAME" + } + ], + "prov:label": "Prospective provenance" + }, + { + "wfdesc:hasSubProcess": { + "$": "wf:main/rev", + "type": "prov:QUALIFIED_NAME" + }, + "prov:label": "Prospective provenance" + }, + { + "wfdesc:hasSubProcess": { + "$": "wf:main/sorted", + "type": "prov:QUALIFIED_NAME" + }, + "prov:label": "Prospective provenance" + } + ], + "wf:main/rev": { + "prov:type": [ + { + "$": "wfdesc:Process", + "type": "prov:QUALIFIED_NAME" + }, + { + "$": "prov:Plan", + "type": "prov:QUALIFIED_NAME" + } + ] + }, + "wf:main/sorted": { + "prov:type": [ + { + "$": "wfdesc:Process", + "type": "prov:QUALIFIED_NAME" + }, + { + "$": "prov:Plan", + "type": "prov:QUALIFIED_NAME" + } + ] + }, + "data:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376": [ + { + "prov:type": { + "$": "wfprov:Artifact", + "type": "prov:QUALIFIED_NAME" + } + }, + { + "prov:type": { + "$": "wfprov:Artifact", + "type": "prov:QUALIFIED_NAME" + } + } + ], + "id:c872005a-958a-451f-8d22-662a554676fb": { + "prov:type": [ + { + "$": "wfprov:Artifact", + "type": "prov:QUALIFIED_NAME" + }, + { + "$": "wf4ever:File", + "type": "prov:QUALIFIED_NAME" + } + ], + "cwlprov:basename": "hello.txt", + "cwlprov:nameroot": "hello", + "cwlprov:nameext": ".txt" + }, + "id:b87ba1ac-3fc2-4137-9f2c-06d99cb47275": { + "prov:value": true + }, + "id:bd085031-9a42-48c3-a2e9-7580a456be6f": { + "prov:type": [ + { + "$": "wfprov:Artifact", + "type": "prov:QUALIFIED_NAME" + }, + { + "$": "wf4ever:File", + "type": "prov:QUALIFIED_NAME" + } + ], + "cwlprov:basename": "hello.txt", + "cwlprov:nameroot": "hello", + "cwlprov:nameext": ".txt" + }, + "data:97fe1b50b4582cebc7d853796ebd62e3e163aa3f": { + "prov:type": { + "$": "wfprov:Artifact", + "type": "prov:QUALIFIED_NAME" + } + }, + "id:31dd1208-1a62-4eb0-bd42-f6aa6d6dac24": { + "prov:type": [ + { + "$": "wfprov:Artifact", + "type": "prov:QUALIFIED_NAME" + }, + { + "$": "wf4ever:File", + "type": "prov:QUALIFIED_NAME" + } + ], + "cwlprov:basename": "output.txt", + "cwlprov:nameroot": "output", + "cwlprov:nameext": ".txt" + }, + "id:f7144d14-29c9-4bbf-b6a6-33bcfbf8e229": { + "prov:value": true + }, + "data:b9214658cc453331b62c2282b772a5c063dbd284": { + "prov:type": { + "$": "wfprov:Artifact", + "type": "prov:QUALIFIED_NAME" + } + }, + "id:072eaf95-a2f6-4417-980c-a7b930221dce": { + "prov:type": [ + { + "$": "wfprov:Artifact", + "type": "prov:QUALIFIED_NAME" + }, + { + "$": "wf4ever:File", + "type": "prov:QUALIFIED_NAME" + } + ], + "cwlprov:basename": "output.txt", + "cwlprov:nameroot": "output", + "cwlprov:nameext": ".txt" + } + }, + "specializationOf": { + "_:id5": { + "prov:specificEntity": "id:c872005a-958a-451f-8d22-662a554676fb", + "prov:generalEntity": "data:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376" + }, + "_:id11": { + "prov:specificEntity": "id:bd085031-9a42-48c3-a2e9-7580a456be6f", + "prov:generalEntity": "data:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376" + }, + "_:id13": { + "prov:specificEntity": "id:31dd1208-1a62-4eb0-bd42-f6aa6d6dac24", + "prov:generalEntity": "data:97fe1b50b4582cebc7d853796ebd62e3e163aa3f" + }, + "_:id21": { + "prov:specificEntity": "id:072eaf95-a2f6-4417-980c-a7b930221dce", + "prov:generalEntity": "data:b9214658cc453331b62c2282b772a5c063dbd284" + } + }, + "used": { + "_:id6": { + "prov:activity": "id:73420c43-a023-4f52-9630-13bcdd9441c2", + "prov:entity": "id:c872005a-958a-451f-8d22-662a554676fb", + "prov:time": "2024-03-26T09:35:00.192411", + "prov:role": { + "$": "wf:main/input", + "type": "prov:QUALIFIED_NAME" + } + }, + "_:id7": { + "prov:activity": "id:73420c43-a023-4f52-9630-13bcdd9441c2", + "prov:entity": "id:b87ba1ac-3fc2-4137-9f2c-06d99cb47275", + "prov:time": "2024-03-26T09:35:00.192452", + "prov:role": { + "$": "wf:main/reverse_sort", + "type": "prov:QUALIFIED_NAME" + } + }, + "_:id12": { + "prov:activity": "id:192abf2b-ff1f-4ed9-a48b-11f026eecccb", + "prov:entity": "id:bd085031-9a42-48c3-a2e9-7580a456be6f", + "prov:time": "2024-03-26T09:35:00.205071", + "prov:role": { + "$": "wf:main/rev/input", + "type": "prov:QUALIFIED_NAME" + } + }, + "_:id19": { + "prov:activity": "id:6ff53435-de59-46e9-836f-ca8713277d0c", + "prov:entity": "id:31dd1208-1a62-4eb0-bd42-f6aa6d6dac24", + "prov:time": "2024-03-26T09:35:01.209542", + "prov:role": { + "$": "wf:main/sorted/input", + "type": "prov:QUALIFIED_NAME" + } + }, + "_:id20": { + "prov:activity": "id:6ff53435-de59-46e9-836f-ca8713277d0c", + "prov:entity": "id:f7144d14-29c9-4bbf-b6a6-33bcfbf8e229", + "prov:time": "2024-03-26T09:35:01.209606", + "prov:role": { + "$": "wf:main/sorted/reverse", + "type": "prov:QUALIFIED_NAME" + } + } + }, + "wasGeneratedBy": { + "_:id14": { + "prov:entity": "id:31dd1208-1a62-4eb0-bd42-f6aa6d6dac24", + "prov:activity": "id:192abf2b-ff1f-4ed9-a48b-11f026eecccb", + "prov:time": "2024-03-26T09:35:01.207015", + "prov:role": { + "$": "wf:main/rev/output", + "type": "prov:QUALIFIED_NAME" + } + }, + "_:id22": { + "prov:entity": "id:072eaf95-a2f6-4417-980c-a7b930221dce", + "prov:activity": "id:6ff53435-de59-46e9-836f-ca8713277d0c", + "prov:time": "2024-03-26T09:35:02.211447", + "prov:role": { + "$": "wf:main/sorted/output", + "type": "prov:QUALIFIED_NAME" + } + }, + "_:id24": { + "prov:entity": "id:072eaf95-a2f6-4417-980c-a7b930221dce", + "prov:activity": "id:73420c43-a023-4f52-9630-13bcdd9441c2", + "prov:time": "2024-03-26T09:35:02.212338", + "prov:role": { + "$": "wf:main/primary/output", + "type": "prov:QUALIFIED_NAME" + } + } + }, + "wasEndedBy": { + "_:id15": { + "prov:activity": "id:192abf2b-ff1f-4ed9-a48b-11f026eecccb", + "prov:ender": "id:73420c43-a023-4f52-9630-13bcdd9441c2", + "prov:time": "2024-03-26T09:35:01.207010" + }, + "_:id23": { + "prov:activity": "id:6ff53435-de59-46e9-836f-ca8713277d0c", + "prov:ender": "id:73420c43-a023-4f52-9630-13bcdd9441c2", + "prov:time": "2024-03-26T09:35:02.211442" + }, + "_:id25": { + "prov:activity": "id:73420c43-a023-4f52-9630-13bcdd9441c2", + "prov:ender": "id:577e0cfe-9f26-4170-872b-94c1b2578771", + "prov:time": "2024-03-26T09:35:02.212375" + } + } +} \ No newline at end of file diff --git a/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.jsonld b/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.jsonld new file mode 100644 index 0000000..1993460 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.jsonld @@ -0,0 +1,735 @@ +[ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/rev", + "@type": [ + "http://www.w3.org/ns/prov#Entity", + "http://purl.org/wf4ever/wfdesc#Process", + "http://www.w3.org/ns/prov#Plan" + ] + }, + { + "@id": "urn:uuid:072eaf95-a2f6-4417-980c-a7b930221dce", + "@type": [ + "http://www.w3.org/ns/prov#Entity", + "http://purl.org/wf4ever/wfprov#Artifact", + "http://purl.org/wf4ever/wf4ever#File" + ], + "http://www.w3.org/ns/prov#qualifiedGeneration": [ + { + "@id": "_:Naeb965e8a14d433f9ab1b5c53ab102d5" + }, + { + "@id": "_:Nf63f439e65a94098862641741c8239c9" + } + ], + "http://www.w3.org/ns/prov#specializationOf": [ + { + "@id": "urn:hash::sha1:b9214658cc453331b62c2282b772a5c063dbd284" + } + ], + "https://w3id.org/cwl/prov#basename": [ + { + "@value": "output.txt" + } + ], + "https://w3id.org/cwl/prov#nameext": [ + { + "@value": ".txt" + } + ], + "https://w3id.org/cwl/prov#nameroot": [ + { + "@value": "output" + } + ] + }, + { + "@id": "_:Naeb965e8a14d433f9ab1b5c53ab102d5", + "@type": [ + "http://www.w3.org/ns/prov#Generation" + ], + "http://www.w3.org/ns/prov#activity": [ + { + "@id": "urn:uuid:73420c43-a023-4f52-9630-13bcdd9441c2" + } + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:02.212338" + } + ], + "http://www.w3.org/ns/prov#hadRole": [ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/primary/output" + } + ] + }, + { + "@id": "_:Nf63f439e65a94098862641741c8239c9", + "@type": [ + "http://www.w3.org/ns/prov#Generation" + ], + "http://www.w3.org/ns/prov#activity": [ + { + "@id": "urn:uuid:6ff53435-de59-46e9-836f-ca8713277d0c" + } + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:02.211447" + } + ], + "http://www.w3.org/ns/prov#hadRole": [ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/sorted/output" + } + ] + }, + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/sorted", + "@type": [ + "http://purl.org/wf4ever/wfdesc#Process", + "http://www.w3.org/ns/prov#Entity", + "http://www.w3.org/ns/prov#Plan" + ] + }, + { + "@id": "urn:hash::sha1:b9214658cc453331b62c2282b772a5c063dbd284", + "@type": [ + "http://www.w3.org/ns/prov#Entity", + "http://purl.org/wf4ever/wfprov#Artifact" + ] + }, + { + "@id": "urn:uuid:ed245546-74cf-4573-bcf2-1a1a0fd4641c", + "@type": [ + "http://www.w3.org/ns/prov#SoftwareAgent", + "http://www.w3.org/ns/prov#Agent" + ], + "http://www.w3.org/2000/01/rdf-schema#label": [ + { + "@value": "Container execution of image debian:8" + } + ], + "https://w3id.org/cwl/prov#image": [ + { + "@value": "debian:8" + } + ] + }, + { + "@id": "urn:uuid:c872005a-958a-451f-8d22-662a554676fb", + "@type": [ + "http://purl.org/wf4ever/wfprov#Artifact", + "http://www.w3.org/ns/prov#Entity", + "http://purl.org/wf4ever/wf4ever#File" + ], + "http://www.w3.org/ns/prov#specializationOf": [ + { + "@id": "urn:hash::sha1:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376" + } + ], + "https://w3id.org/cwl/prov#basename": [ + { + "@value": "hello.txt" + } + ], + "https://w3id.org/cwl/prov#nameext": [ + { + "@value": ".txt" + } + ], + "https://w3id.org/cwl/prov#nameroot": [ + { + "@value": "hello" + } + ] + }, + { + "@id": "urn:uuid:6ff53435-de59-46e9-836f-ca8713277d0c", + "@type": [ + "http://www.w3.org/ns/prov#Activity", + "http://purl.org/wf4ever/wfprov#ProcessRun" + ], + "http://www.w3.org/2000/01/rdf-schema#label": [ + { + "@value": "Run of workflow/packed.cwl#main/sorted" + } + ], + "http://www.w3.org/ns/prov#qualifiedAssociation": [ + { + "@id": "_:N07a5ed8674e74665b7adbe922eeead9e" + } + ], + "http://www.w3.org/ns/prov#qualifiedEnd": [ + { + "@id": "_:N15bbaed3b6f14d6e8d176381f3332f6b" + } + ], + "http://www.w3.org/ns/prov#qualifiedStart": [ + { + "@id": "_:N8689553d1da7496a99bb6d8cbb5023ea" + } + ], + "http://www.w3.org/ns/prov#qualifiedUsage": [ + { + "@id": "_:N136a813bf6074ad69f4862ed9b881069" + }, + { + "@id": "_:N12c6f429ed1742d48e29cd51efbf9af3" + } + ], + "http://www.w3.org/ns/prov#wasAssociatedWith": [ + { + "@id": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771" + }, + { + "@id": "urn:uuid:ed245546-74cf-4573-bcf2-1a1a0fd4641c" + } + ] + }, + { + "@id": "_:N15bbaed3b6f14d6e8d176381f3332f6b", + "@type": [ + "http://www.w3.org/ns/prov#End" + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:02.211442" + } + ], + "http://www.w3.org/ns/prov#hadActivity": [ + { + "@id": "urn:uuid:73420c43-a023-4f52-9630-13bcdd9441c2" + } + ] + }, + { + "@id": "_:N136a813bf6074ad69f4862ed9b881069", + "@type": [ + "http://www.w3.org/ns/prov#Usage" + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:01.209606" + } + ], + "http://www.w3.org/ns/prov#entity": [ + { + "@id": "urn:uuid:f7144d14-29c9-4bbf-b6a6-33bcfbf8e229" + } + ], + "http://www.w3.org/ns/prov#hadRole": [ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/sorted/reverse" + } + ] + }, + { + "@id": "_:N12c6f429ed1742d48e29cd51efbf9af3", + "@type": [ + "http://www.w3.org/ns/prov#Usage" + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:01.209542" + } + ], + "http://www.w3.org/ns/prov#entity": [ + { + "@id": "urn:uuid:31dd1208-1a62-4eb0-bd42-f6aa6d6dac24" + } + ], + "http://www.w3.org/ns/prov#hadRole": [ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/sorted/input" + } + ] + }, + { + "@id": "_:N07a5ed8674e74665b7adbe922eeead9e", + "@type": [ + "http://www.w3.org/ns/prov#Association" + ], + "http://www.w3.org/ns/prov#hadPlan": [ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/sorted" + } + ] + }, + { + "@id": "_:N8689553d1da7496a99bb6d8cbb5023ea", + "@type": [ + "http://www.w3.org/ns/prov#Start" + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:01.208322" + } + ], + "http://www.w3.org/ns/prov#hadActivity": [ + { + "@id": "urn:uuid:73420c43-a023-4f52-9630-13bcdd9441c2" + } + ] + }, + { + "@id": "urn:uuid:31dd1208-1a62-4eb0-bd42-f6aa6d6dac24", + "@type": [ + "http://www.w3.org/ns/prov#Entity", + "http://purl.org/wf4ever/wfprov#Artifact", + "http://purl.org/wf4ever/wf4ever#File" + ], + "http://www.w3.org/ns/prov#qualifiedGeneration": [ + { + "@id": "_:N71983266f6454f6ab1f9ceab930784fc" + } + ], + "http://www.w3.org/ns/prov#specializationOf": [ + { + "@id": "urn:hash::sha1:97fe1b50b4582cebc7d853796ebd62e3e163aa3f" + } + ], + "https://w3id.org/cwl/prov#basename": [ + { + "@value": "output.txt" + } + ], + "https://w3id.org/cwl/prov#nameext": [ + { + "@value": ".txt" + } + ], + "https://w3id.org/cwl/prov#nameroot": [ + { + "@value": "output" + } + ] + }, + { + "@id": "_:N71983266f6454f6ab1f9ceab930784fc", + "@type": [ + "http://www.w3.org/ns/prov#Generation" + ], + "http://www.w3.org/ns/prov#activity": [ + { + "@id": "urn:uuid:192abf2b-ff1f-4ed9-a48b-11f026eecccb" + } + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:01.207015" + } + ], + "http://www.w3.org/ns/prov#hadRole": [ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/rev/output" + } + ] + }, + { + "@id": "urn:uuid:b87ba1ac-3fc2-4137-9f2c-06d99cb47275", + "@type": [ + "http://www.w3.org/ns/prov#Entity" + ], + "http://www.w3.org/ns/prov#value": [ + { + "@value": true + } + ] + }, + { + "@id": "urn:uuid:73420c43-a023-4f52-9630-13bcdd9441c2", + "@type": [ + "http://purl.org/wf4ever/wfprov#WorkflowRun", + "http://www.w3.org/ns/prov#Activity" + ], + "http://www.w3.org/2000/01/rdf-schema#label": [ + { + "@value": "Run of workflow/packed.cwl#main" + } + ], + "http://www.w3.org/ns/prov#qualifiedAssociation": [ + { + "@id": "_:Nad61c4497a454a44be3361260bc1e58b" + } + ], + "http://www.w3.org/ns/prov#qualifiedEnd": [ + { + "@id": "_:Na3fdd87f645b433f9d36ef2b076ea92f" + } + ], + "http://www.w3.org/ns/prov#qualifiedStart": [ + { + "@id": "_:N5e4de4b2d0ad4f9a8c1a798afb7e87d1" + } + ], + "http://www.w3.org/ns/prov#qualifiedUsage": [ + { + "@id": "_:N814dea7de65a43e0b6bd43227876701c" + }, + { + "@id": "_:Ne7324d5b49a2422ea4420aa4c426712f" + } + ], + "http://www.w3.org/ns/prov#startedAtTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:00.174824" + } + ], + "http://www.w3.org/ns/prov#wasAssociatedWith": [ + { + "@id": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771" + } + ] + }, + { + "@id": "_:N814dea7de65a43e0b6bd43227876701c", + "@type": [ + "http://www.w3.org/ns/prov#Usage" + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:00.192411" + } + ], + "http://www.w3.org/ns/prov#entity": [ + { + "@id": "urn:uuid:c872005a-958a-451f-8d22-662a554676fb" + } + ], + "http://www.w3.org/ns/prov#hadRole": [ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/input" + } + ] + }, + { + "@id": "_:Ne7324d5b49a2422ea4420aa4c426712f", + "@type": [ + "http://www.w3.org/ns/prov#Usage" + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:00.192452" + } + ], + "http://www.w3.org/ns/prov#entity": [ + { + "@id": "urn:uuid:b87ba1ac-3fc2-4137-9f2c-06d99cb47275" + } + ], + "http://www.w3.org/ns/prov#hadRole": [ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/reverse_sort" + } + ] + }, + { + "@id": "_:N5e4de4b2d0ad4f9a8c1a798afb7e87d1", + "@type": [ + "http://www.w3.org/ns/prov#Start" + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:00.174854" + } + ], + "http://www.w3.org/ns/prov#hadActivity": [ + { + "@id": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771" + } + ] + }, + { + "@id": "_:Na3fdd87f645b433f9d36ef2b076ea92f", + "@type": [ + "http://www.w3.org/ns/prov#End" + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:02.212375" + } + ], + "http://www.w3.org/ns/prov#hadActivity": [ + { + "@id": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771" + } + ] + }, + { + "@id": "_:Nad61c4497a454a44be3361260bc1e58b", + "@type": [ + "http://www.w3.org/ns/prov#Association" + ], + "http://www.w3.org/ns/prov#hadPlan": [ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main" + } + ] + }, + { + "@id": "urn:uuid:bd085031-9a42-48c3-a2e9-7580a456be6f", + "@type": [ + "http://www.w3.org/ns/prov#Entity", + "http://purl.org/wf4ever/wfprov#Artifact", + "http://purl.org/wf4ever/wf4ever#File" + ], + "http://www.w3.org/ns/prov#specializationOf": [ + { + "@id": "urn:hash::sha1:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376" + } + ], + "https://w3id.org/cwl/prov#basename": [ + { + "@value": "hello.txt" + } + ], + "https://w3id.org/cwl/prov#nameext": [ + { + "@value": ".txt" + } + ], + "https://w3id.org/cwl/prov#nameroot": [ + { + "@value": "hello" + } + ] + }, + { + "@id": "urn:hash::sha1:97fe1b50b4582cebc7d853796ebd62e3e163aa3f", + "@type": [ + "http://www.w3.org/ns/prov#Entity", + "http://purl.org/wf4ever/wfprov#Artifact" + ] + }, + { + "@id": "urn:hash::sha1:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376", + "@type": [ + "http://purl.org/wf4ever/wfprov#Artifact", + "http://www.w3.org/ns/prov#Entity" + ] + }, + { + "@id": "urn:uuid:192abf2b-ff1f-4ed9-a48b-11f026eecccb", + "@type": [ + "http://purl.org/wf4ever/wfprov#ProcessRun", + "http://www.w3.org/ns/prov#Activity" + ], + "http://www.w3.org/2000/01/rdf-schema#label": [ + { + "@value": "Run of workflow/packed.cwl#main/rev" + } + ], + "http://www.w3.org/ns/prov#qualifiedAssociation": [ + { + "@id": "_:Nc66fc1ec20be44b5923276205d4e4951" + } + ], + "http://www.w3.org/ns/prov#qualifiedEnd": [ + { + "@id": "_:N5d34bab5e38b4898912ce44b859e5d44" + } + ], + "http://www.w3.org/ns/prov#qualifiedStart": [ + { + "@id": "_:N9da4bb0d95cc42faa07afabd900c899f" + } + ], + "http://www.w3.org/ns/prov#qualifiedUsage": [ + { + "@id": "_:N37f34fcd55e644a498adec9784f0e1f3" + } + ], + "http://www.w3.org/ns/prov#wasAssociatedWith": [ + { + "@id": "urn:uuid:b1d25847-e010-4f49-b6d7-9cb0fbe612ff" + }, + { + "@id": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771" + } + ] + }, + { + "@id": "_:N37f34fcd55e644a498adec9784f0e1f3", + "@type": [ + "http://www.w3.org/ns/prov#Usage" + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:00.205071" + } + ], + "http://www.w3.org/ns/prov#entity": [ + { + "@id": "urn:uuid:bd085031-9a42-48c3-a2e9-7580a456be6f" + } + ], + "http://www.w3.org/ns/prov#hadRole": [ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/rev/input" + } + ] + }, + { + "@id": "_:N9da4bb0d95cc42faa07afabd900c899f", + "@type": [ + "http://www.w3.org/ns/prov#Start" + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:00.193352" + } + ], + "http://www.w3.org/ns/prov#hadActivity": [ + { + "@id": "urn:uuid:73420c43-a023-4f52-9630-13bcdd9441c2" + } + ] + }, + { + "@id": "_:N5d34bab5e38b4898912ce44b859e5d44", + "@type": [ + "http://www.w3.org/ns/prov#End" + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:01.207010" + } + ], + "http://www.w3.org/ns/prov#hadActivity": [ + { + "@id": "urn:uuid:73420c43-a023-4f52-9630-13bcdd9441c2" + } + ] + }, + { + "@id": "_:Nc66fc1ec20be44b5923276205d4e4951", + "@type": [ + "http://www.w3.org/ns/prov#Association" + ], + "http://www.w3.org/ns/prov#hadPlan": [ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/rev" + } + ] + }, + { + "@id": "urn:uuid:b1d25847-e010-4f49-b6d7-9cb0fbe612ff", + "@type": [ + "http://www.w3.org/ns/prov#Agent", + "http://www.w3.org/ns/prov#SoftwareAgent" + ], + "http://www.w3.org/2000/01/rdf-schema#label": [ + { + "@value": "Container execution of image debian:8" + } + ], + "https://w3id.org/cwl/prov#image": [ + { + "@value": "debian:8" + } + ] + }, + { + "@id": "https://orcid.org/0000-0001-9447-460X", + "@type": [ + "http://www.w3.org/ns/prov#Person", + "http://www.w3.org/ns/prov#Agent", + "http://schema.org/Person" + ] + }, + { + "@id": "urn:uuid:f7144d14-29c9-4bbf-b6a6-33bcfbf8e229", + "@type": [ + "http://www.w3.org/ns/prov#Entity" + ], + "http://www.w3.org/ns/prov#value": [ + { + "@value": true + } + ] + }, + { + "@id": "urn:uuid:dccc3c5a-089e-4c07-aeab-3e1b80a8bf21", + "@type": [ + "http://www.w3.org/ns/prov#Agent" + ], + "http://www.w3.org/ns/prov#actedOnBehalfOf": [ + { + "@id": "https://orcid.org/0000-0001-9447-460X" + } + ] + }, + { + "@id": "urn:uuid:577e0cfe-9f26-4170-872b-94c1b2578771", + "@type": [ + "http://www.w3.org/ns/prov#SoftwareAgent", + "http://www.w3.org/ns/prov#Agent", + "http://purl.org/wf4ever/wfprov#WorkflowEngine" + ], + "http://www.w3.org/2000/01/rdf-schema#label": [ + { + "@value": "cwltool 3.1.20240112164112" + } + ], + "http://www.w3.org/ns/prov#qualifiedStart": [ + { + "@id": "_:N3496b4f6feb54056a33bf85b7818f810" + } + ] + }, + { + "@id": "_:N3496b4f6feb54056a33bf85b7818f810", + "@type": [ + "http://www.w3.org/ns/prov#Start" + ], + "http://www.w3.org/ns/prov#atTime": [ + { + "@type": "http://www.w3.org/2001/XMLSchema#dateTime", + "@value": "2024-03-26T09:35:00.174799" + } + ], + "http://www.w3.org/ns/prov#hadActivity": [ + { + "@id": "urn:uuid:dccc3c5a-089e-4c07-aeab-3e1b80a8bf21" + } + ] + }, + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main", + "@type": [ + "http://www.w3.org/ns/prov#Entity", + "http://purl.org/wf4ever/wfdesc#Workflow", + "http://www.w3.org/ns/prov#Plan" + ], + "http://purl.org/wf4ever/wfdesc#hasSubProcess": [ + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/sorted" + }, + { + "@id": "arcp://uuid,73420c43-a023-4f52-9630-13bcdd9441c2/workflow/packed.cwl#main/rev" + } + ], + "http://www.w3.org/2000/01/rdf-schema#label": [ + { + "@value": "Prospective provenance" + } + ] + } +] \ No newline at end of file diff --git a/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.nt b/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.nt new file mode 100644 index 0000000..60f8239 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.nt @@ -0,0 +1,159 @@ +_:Na4f8d39682bb4f30861f1d1601b507f2 . + _:N8e51a237844745cc9cabe5ae5aaec01f . +_:N42728285a1924947ab9a30936c3f9df1 . + . +_:N77e65695a9ab4e3b9effd19b7eece454 . +_:N4eee73e891d54b2995a44bbd11226ef2 "2024-03-26T09:35:02.211442"^^ . + "output.txt"^^ . + ".txt"^^ . +_:N4cebdd72a7b643c3b700ecf7a71185f8 . +_:Ndde4ded519cb4187b5329b2373128781 "2024-03-26T09:35:01.209542"^^ . +_:N77e65695a9ab4e3b9effd19b7eece454 "2024-03-26T09:35:00.174854"^^ . + _:N00d180e987c54aef87a468d620f52b32 . + . + . + . + "Prospective provenance"^^ . + . +_:N3c170d141fd34a158b004084a94318a7 "2024-03-26T09:35:02.212375"^^ . + . + . +_:Nb96912a2f5a446799412a8dd29be5dfd . + . + . + . +_:Na4f8d39682bb4f30861f1d1601b507f2 "2024-03-26T09:35:00.193352"^^ . +_:N8e51a237844745cc9cabe5ae5aaec01f . + . + . + . +_:N4cebdd72a7b643c3b700ecf7a71185f8 . + "output.txt"^^ . + . +_:N9cf9c89524724072ade8de0d11b92468 . + . + _:N3c170d141fd34a158b004084a94318a7 . + "Container execution of image debian:8"^^ . +_:N3c170d141fd34a158b004084a94318a7 . + "hello.txt"^^ . + . + "output"^^ . +_:Nee03173091f24fd286f41e985524f508 . + . +_:Nf3802215a5fd42de88b57193eb249711 . + . + . + "debian:8"^^ . + . + . + "hello"^^ . +_:Nceb6bf8f2ae94ccbbedb6026beddfea3 "2024-03-26T09:35:01.208322"^^ . + . + . +_:N724f3a4612af4582938d0db9a7c0d02d . +_:Ndde4ded519cb4187b5329b2373128781 . +_:Nfb7d0d4e9f704b55a1c1be4886dc6f9e . +_:N724f3a4612af4582938d0db9a7c0d02d . + . + _:Nfb7d0d4e9f704b55a1c1be4886dc6f9e . + "hello"^^ . + . + . +_:Na36197187cc74c389d9be8ff85634499 . + _:N42728285a1924947ab9a30936c3f9df1 . +_:Nf3802215a5fd42de88b57193eb249711 "2024-03-26T09:35:01.207015"^^ . + _:N4eee73e891d54b2995a44bbd11226ef2 . + _:N4cebdd72a7b643c3b700ecf7a71185f8 . +_:N3c170d141fd34a158b004084a94318a7 . + . + . +_:Nb96912a2f5a446799412a8dd29be5dfd . + "true"^^ . +_:Nb96912a2f5a446799412a8dd29be5dfd "2024-03-26T09:35:00.192411"^^ . + _:Nee03173091f24fd286f41e985524f508 . + _:Nceb6bf8f2ae94ccbbedb6026beddfea3 . + _:N77e65695a9ab4e3b9effd19b7eece454 . + "output"^^ . +_:N4cebdd72a7b643c3b700ecf7a71185f8 "2024-03-26T09:35:00.192452"^^ . + "Run of workflow/packed.cwl#main"^^ . + . + . +_:N8e51a237844745cc9cabe5ae5aaec01f . + "debian:8"^^ . + _:Na36197187cc74c389d9be8ff85634499 . + _:Na4f8d39682bb4f30861f1d1601b507f2 . + . +_:N8e51a237844745cc9cabe5ae5aaec01f "2024-03-26T09:35:00.205071"^^ . + _:N724f3a4612af4582938d0db9a7c0d02d . +_:Ndde4ded519cb4187b5329b2373128781 . +_:N9cf9c89524724072ade8de0d11b92468 . + . + ".txt"^^ . + . +_:N00d180e987c54aef87a468d620f52b32 . + . +_:N4eee73e891d54b2995a44bbd11226ef2 . + _:Nf3802215a5fd42de88b57193eb249711 . + . + ".txt"^^ . + _:Ndde4ded519cb4187b5329b2373128781 . +_:N4eee73e891d54b2995a44bbd11226ef2 . + . +_:Nee03173091f24fd286f41e985524f508 "2024-03-26T09:35:02.211447"^^ . + "Run of workflow/packed.cwl#main/sorted"^^ . +_:N1965dd76fa5d47b7897aa65f5b86f623 . + . + . +_:Na36197187cc74c389d9be8ff85634499 . + . + . +_:N42728285a1924947ab9a30936c3f9df1 . + . +_:Nee03173091f24fd286f41e985524f508 . + . +_:N00d180e987c54aef87a468d620f52b32 "2024-03-26T09:35:02.212338"^^ . +_:Nfb7d0d4e9f704b55a1c1be4886dc6f9e . +_:N00d180e987c54aef87a468d620f52b32 . +_:Na4f8d39682bb4f30861f1d1601b507f2 . + . + . +_:Nfb7d0d4e9f704b55a1c1be4886dc6f9e . + . + "Container execution of image debian:8"^^ . + "2024-03-26T09:35:00.174824"^^ . +_:N77e65695a9ab4e3b9effd19b7eece454 . +_:N8e51a237844745cc9cabe5ae5aaec01f . + "cwltool 3.1.20240112164112"^^ . +_:Nfb7d0d4e9f704b55a1c1be4886dc6f9e "2024-03-26T09:35:01.209606"^^ . +_:Nceb6bf8f2ae94ccbbedb6026beddfea3 . +_:Nb96912a2f5a446799412a8dd29be5dfd . +_:Nee03173091f24fd286f41e985524f508 . + "true"^^ . + _:N1965dd76fa5d47b7897aa65f5b86f623 . + . + . + _:Nb96912a2f5a446799412a8dd29be5dfd . + _:N9cf9c89524724072ade8de0d11b92468 . + . +_:Nceb6bf8f2ae94ccbbedb6026beddfea3 . + . + . + ".txt"^^ . + "hello.txt"^^ . + . +_:N4cebdd72a7b643c3b700ecf7a71185f8 . + . +_:N1965dd76fa5d47b7897aa65f5b86f623 . + . + "Run of workflow/packed.cwl#main/rev"^^ . + . +_:N42728285a1924947ab9a30936c3f9df1 "2024-03-26T09:35:01.207010"^^ . +_:Ndde4ded519cb4187b5329b2373128781 . +_:Nf3802215a5fd42de88b57193eb249711 . +_:N724f3a4612af4582938d0db9a7c0d02d "2024-03-26T09:35:00.174799"^^ . + . + . +_:Nf3802215a5fd42de88b57193eb249711 . +_:N00d180e987c54aef87a468d620f52b32 . + . + . diff --git a/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.provn b/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.provn new file mode 100644 index 0000000..bb0b37c --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.provn @@ -0,0 +1,66 @@ +document + prefix wfprov + prefix wfdesc + prefix cwlprov + prefix foaf + prefix schema + prefix orcid + prefix id + prefix data + prefix sha256 + prefix researchobject + prefix metadata + prefix provenance + prefix wf + prefix input + prefix wf4ever + + agent(id:dccc3c5a-089e-4c07-aeab-3e1b80a8bf21) + agent(orcid:0000-0001-9447-460X, [prov:type='prov:Person', prov:type='schema:Person']) + actedOnBehalfOf(id:dccc3c5a-089e-4c07-aeab-3e1b80a8bf21, orcid:0000-0001-9447-460X, -) + agent(id:577e0cfe-9f26-4170-872b-94c1b2578771, [prov:type='prov:SoftwareAgent', prov:type='wfprov:WorkflowEngine', prov:label="cwltool 3.1.20240112164112"]) + wasStartedBy(id:577e0cfe-9f26-4170-872b-94c1b2578771, -, id:dccc3c5a-089e-4c07-aeab-3e1b80a8bf21, 2024-03-26T09:35:00.174799) + activity(id:73420c43-a023-4f52-9630-13bcdd9441c2, 2024-03-26T09:35:00.174824, -, [prov:type='wfprov:WorkflowRun', prov:label="Run of workflow/packed.cwl#main"]) + wasAssociatedWith(id:73420c43-a023-4f52-9630-13bcdd9441c2, id:577e0cfe-9f26-4170-872b-94c1b2578771, wf:main) + wasStartedBy(id:73420c43-a023-4f52-9630-13bcdd9441c2, -, id:577e0cfe-9f26-4170-872b-94c1b2578771, 2024-03-26T09:35:00.174854) + entity(wf:main, [prov:type='wfdesc:Workflow', prov:type='prov:Plan', prov:label="Prospective provenance"]) + entity(wf:main/rev, [prov:type='wfdesc:Process', prov:type='prov:Plan']) + entity(wf:main, [wfdesc:hasSubProcess='wf:main/rev', prov:label="Prospective provenance"]) + entity(wf:main/sorted, [prov:type='wfdesc:Process', prov:type='prov:Plan']) + entity(wf:main, [wfdesc:hasSubProcess='wf:main/sorted', prov:label="Prospective provenance"]) + entity(data:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376, [prov:type='wfprov:Artifact']) + entity(id:c872005a-958a-451f-8d22-662a554676fb, [prov:type='wfprov:Artifact', prov:type='wf4ever:File', cwlprov:basename="hello.txt", cwlprov:nameroot="hello", cwlprov:nameext=".txt"]) + specializationOf(id:c872005a-958a-451f-8d22-662a554676fb, data:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376) + used(id:73420c43-a023-4f52-9630-13bcdd9441c2, id:c872005a-958a-451f-8d22-662a554676fb, 2024-03-26T09:35:00.192411, [prov:role='wf:main/input']) + entity(id:b87ba1ac-3fc2-4137-9f2c-06d99cb47275, [prov:value="1" %% xsd:boolean]) + used(id:73420c43-a023-4f52-9630-13bcdd9441c2, id:b87ba1ac-3fc2-4137-9f2c-06d99cb47275, 2024-03-26T09:35:00.192452, [prov:role='wf:main/reverse_sort']) + activity(id:192abf2b-ff1f-4ed9-a48b-11f026eecccb, -, -, [prov:type='wfprov:ProcessRun', prov:label="Run of workflow/packed.cwl#main/rev"]) + wasAssociatedWith(id:192abf2b-ff1f-4ed9-a48b-11f026eecccb, id:577e0cfe-9f26-4170-872b-94c1b2578771, wf:main/rev) + wasStartedBy(id:192abf2b-ff1f-4ed9-a48b-11f026eecccb, -, id:73420c43-a023-4f52-9630-13bcdd9441c2, 2024-03-26T09:35:00.193352) + agent(id:b1d25847-e010-4f49-b6d7-9cb0fbe612ff, [prov:type='prov:SoftwareAgent', cwlprov:image="debian:8", prov:label="Container execution of image debian:8"]) + wasAssociatedWith(id:192abf2b-ff1f-4ed9-a48b-11f026eecccb, id:b1d25847-e010-4f49-b6d7-9cb0fbe612ff, -) + entity(data:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376, [prov:type='wfprov:Artifact']) + entity(id:bd085031-9a42-48c3-a2e9-7580a456be6f, [prov:type='wfprov:Artifact', prov:type='wf4ever:File', cwlprov:basename="hello.txt", cwlprov:nameroot="hello", cwlprov:nameext=".txt"]) + specializationOf(id:bd085031-9a42-48c3-a2e9-7580a456be6f, data:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376) + used(id:192abf2b-ff1f-4ed9-a48b-11f026eecccb, id:bd085031-9a42-48c3-a2e9-7580a456be6f, 2024-03-26T09:35:00.205071, [prov:role='wf:main/rev/input']) + entity(data:97fe1b50b4582cebc7d853796ebd62e3e163aa3f, [prov:type='wfprov:Artifact']) + entity(id:31dd1208-1a62-4eb0-bd42-f6aa6d6dac24, [prov:type='wfprov:Artifact', prov:type='wf4ever:File', cwlprov:basename="output.txt", cwlprov:nameroot="output", cwlprov:nameext=".txt"]) + specializationOf(id:31dd1208-1a62-4eb0-bd42-f6aa6d6dac24, data:97fe1b50b4582cebc7d853796ebd62e3e163aa3f) + wasGeneratedBy(id:31dd1208-1a62-4eb0-bd42-f6aa6d6dac24, id:192abf2b-ff1f-4ed9-a48b-11f026eecccb, 2024-03-26T09:35:01.207015, [prov:role='wf:main/rev/output']) + wasEndedBy(id:192abf2b-ff1f-4ed9-a48b-11f026eecccb, -, id:73420c43-a023-4f52-9630-13bcdd9441c2, 2024-03-26T09:35:01.207010) + activity(id:6ff53435-de59-46e9-836f-ca8713277d0c, -, -, [prov:type='wfprov:ProcessRun', prov:label="Run of workflow/packed.cwl#main/sorted"]) + wasAssociatedWith(id:6ff53435-de59-46e9-836f-ca8713277d0c, id:577e0cfe-9f26-4170-872b-94c1b2578771, wf:main/sorted) + wasStartedBy(id:6ff53435-de59-46e9-836f-ca8713277d0c, -, id:73420c43-a023-4f52-9630-13bcdd9441c2, 2024-03-26T09:35:01.208322) + agent(id:ed245546-74cf-4573-bcf2-1a1a0fd4641c, [prov:type='prov:SoftwareAgent', cwlprov:image="debian:8", prov:label="Container execution of image debian:8"]) + wasAssociatedWith(id:6ff53435-de59-46e9-836f-ca8713277d0c, id:ed245546-74cf-4573-bcf2-1a1a0fd4641c, -) + used(id:6ff53435-de59-46e9-836f-ca8713277d0c, id:31dd1208-1a62-4eb0-bd42-f6aa6d6dac24, 2024-03-26T09:35:01.209542, [prov:role='wf:main/sorted/input']) + entity(id:f7144d14-29c9-4bbf-b6a6-33bcfbf8e229, [prov:value="1" %% xsd:boolean]) + used(id:6ff53435-de59-46e9-836f-ca8713277d0c, id:f7144d14-29c9-4bbf-b6a6-33bcfbf8e229, 2024-03-26T09:35:01.209606, [prov:role='wf:main/sorted/reverse']) + entity(data:b9214658cc453331b62c2282b772a5c063dbd284, [prov:type='wfprov:Artifact']) + entity(id:072eaf95-a2f6-4417-980c-a7b930221dce, [prov:type='wfprov:Artifact', prov:type='wf4ever:File', cwlprov:basename="output.txt", cwlprov:nameroot="output", cwlprov:nameext=".txt"]) + specializationOf(id:072eaf95-a2f6-4417-980c-a7b930221dce, data:b9214658cc453331b62c2282b772a5c063dbd284) + wasGeneratedBy(id:072eaf95-a2f6-4417-980c-a7b930221dce, id:6ff53435-de59-46e9-836f-ca8713277d0c, 2024-03-26T09:35:02.211447, [prov:role='wf:main/sorted/output']) + wasEndedBy(id:6ff53435-de59-46e9-836f-ca8713277d0c, -, id:73420c43-a023-4f52-9630-13bcdd9441c2, 2024-03-26T09:35:02.211442) + wasGeneratedBy(id:072eaf95-a2f6-4417-980c-a7b930221dce, id:73420c43-a023-4f52-9630-13bcdd9441c2, 2024-03-26T09:35:02.212338, [prov:role='wf:main/primary/output']) + wasEndedBy(id:73420c43-a023-4f52-9630-13bcdd9441c2, -, id:577e0cfe-9f26-4170-872b-94c1b2578771, 2024-03-26T09:35:02.212375) +endDocument \ No newline at end of file diff --git a/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.ttl b/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.ttl new file mode 100644 index 0000000..faaceee --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.ttl @@ -0,0 +1,174 @@ +@prefix cwlprov: . +@prefix data: . +@prefix id: . +@prefix orcid: . +@prefix prov: . +@prefix rdfs: . +@prefix schema1: . +@prefix wf: . +@prefix wf4ever: . +@prefix wfdesc: . +@prefix wfprov: . +@prefix xsd: . + +id:072eaf95-a2f6-4417-980c-a7b930221dce a wf4ever:File, + wfprov:Artifact, + prov:Entity ; + prov:qualifiedGeneration [ a prov:Generation ; + prov:activity id:73420c43-a023-4f52-9630-13bcdd9441c2 ; + prov:atTime "2024-03-26T09:35:02.212338"^^xsd:dateTime ; + prov:hadRole ], + [ a prov:Generation ; + prov:activity id:6ff53435-de59-46e9-836f-ca8713277d0c ; + prov:atTime "2024-03-26T09:35:02.211447"^^xsd:dateTime ; + prov:hadRole ] ; + prov:specializationOf data:b9214658cc453331b62c2282b772a5c063dbd284 ; + cwlprov:basename "output.txt"^^xsd:string ; + cwlprov:nameext ".txt"^^xsd:string ; + cwlprov:nameroot "output"^^xsd:string . + +wf:main a wfdesc:Workflow, + prov:Entity, + prov:Plan ; + rdfs:label "Prospective provenance"^^xsd:string ; + wfdesc:hasSubProcess , + . + +orcid:0000-0001-9447-460X a schema1:Person, + prov:Agent, + prov:Person . + +data:97fe1b50b4582cebc7d853796ebd62e3e163aa3f a wfprov:Artifact, + prov:Entity . + +data:b9214658cc453331b62c2282b772a5c063dbd284 a wfprov:Artifact, + prov:Entity . + +id:192abf2b-ff1f-4ed9-a48b-11f026eecccb a wfprov:ProcessRun, + prov:Activity ; + rdfs:label "Run of workflow/packed.cwl#main/rev"^^xsd:string ; + prov:qualifiedAssociation [ a prov:Association ; + prov:hadPlan ] ; + prov:qualifiedEnd [ a prov:End ; + prov:atTime "2024-03-26T09:35:01.207010"^^xsd:dateTime ; + prov:hadActivity id:73420c43-a023-4f52-9630-13bcdd9441c2 ] ; + prov:qualifiedStart [ a prov:Start ; + prov:atTime "2024-03-26T09:35:00.193352"^^xsd:dateTime ; + prov:hadActivity id:73420c43-a023-4f52-9630-13bcdd9441c2 ] ; + prov:qualifiedUsage [ a prov:Usage ; + prov:atTime "2024-03-26T09:35:00.205071"^^xsd:dateTime ; + prov:entity id:bd085031-9a42-48c3-a2e9-7580a456be6f ; + prov:hadRole ] ; + prov:wasAssociatedWith id:577e0cfe-9f26-4170-872b-94c1b2578771, + id:b1d25847-e010-4f49-b6d7-9cb0fbe612ff . + +id:31dd1208-1a62-4eb0-bd42-f6aa6d6dac24 a wf4ever:File, + wfprov:Artifact, + prov:Entity ; + prov:qualifiedGeneration [ a prov:Generation ; + prov:activity id:192abf2b-ff1f-4ed9-a48b-11f026eecccb ; + prov:atTime "2024-03-26T09:35:01.207015"^^xsd:dateTime ; + prov:hadRole ] ; + prov:specializationOf data:97fe1b50b4582cebc7d853796ebd62e3e163aa3f ; + cwlprov:basename "output.txt"^^xsd:string ; + cwlprov:nameext ".txt"^^xsd:string ; + cwlprov:nameroot "output"^^xsd:string . + +id:6ff53435-de59-46e9-836f-ca8713277d0c a wfprov:ProcessRun, + prov:Activity ; + rdfs:label "Run of workflow/packed.cwl#main/sorted"^^xsd:string ; + prov:qualifiedAssociation [ a prov:Association ; + prov:hadPlan ] ; + prov:qualifiedEnd [ a prov:End ; + prov:atTime "2024-03-26T09:35:02.211442"^^xsd:dateTime ; + prov:hadActivity id:73420c43-a023-4f52-9630-13bcdd9441c2 ] ; + prov:qualifiedStart [ a prov:Start ; + prov:atTime "2024-03-26T09:35:01.208322"^^xsd:dateTime ; + prov:hadActivity id:73420c43-a023-4f52-9630-13bcdd9441c2 ] ; + prov:qualifiedUsage [ a prov:Usage ; + prov:atTime "2024-03-26T09:35:01.209606"^^xsd:dateTime ; + prov:entity id:f7144d14-29c9-4bbf-b6a6-33bcfbf8e229 ; + prov:hadRole ], + [ a prov:Usage ; + prov:atTime "2024-03-26T09:35:01.209542"^^xsd:dateTime ; + prov:entity id:31dd1208-1a62-4eb0-bd42-f6aa6d6dac24 ; + prov:hadRole ] ; + prov:wasAssociatedWith id:577e0cfe-9f26-4170-872b-94c1b2578771, + id:ed245546-74cf-4573-bcf2-1a1a0fd4641c . + +id:b1d25847-e010-4f49-b6d7-9cb0fbe612ff a prov:Agent, + prov:SoftwareAgent ; + rdfs:label "Container execution of image debian:8"^^xsd:string ; + cwlprov:image "debian:8"^^xsd:string . + +id:b87ba1ac-3fc2-4137-9f2c-06d99cb47275 a prov:Entity ; + prov:value true . + +id:bd085031-9a42-48c3-a2e9-7580a456be6f a wf4ever:File, + wfprov:Artifact, + prov:Entity ; + prov:specializationOf data:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376 ; + cwlprov:basename "hello.txt"^^xsd:string ; + cwlprov:nameext ".txt"^^xsd:string ; + cwlprov:nameroot "hello"^^xsd:string . + +id:c872005a-958a-451f-8d22-662a554676fb a wf4ever:File, + wfprov:Artifact, + prov:Entity ; + prov:specializationOf data:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376 ; + cwlprov:basename "hello.txt"^^xsd:string ; + cwlprov:nameext ".txt"^^xsd:string ; + cwlprov:nameroot "hello"^^xsd:string . + +id:dccc3c5a-089e-4c07-aeab-3e1b80a8bf21 a prov:Agent ; + prov:actedOnBehalfOf orcid:0000-0001-9447-460X . + +id:ed245546-74cf-4573-bcf2-1a1a0fd4641c a prov:Agent, + prov:SoftwareAgent ; + rdfs:label "Container execution of image debian:8"^^xsd:string ; + cwlprov:image "debian:8"^^xsd:string . + +id:f7144d14-29c9-4bbf-b6a6-33bcfbf8e229 a prov:Entity ; + prov:value true . + + a wfdesc:Process, + prov:Entity, + prov:Plan . + + a wfdesc:Process, + prov:Entity, + prov:Plan . + +data:327fc7aedf4f6b69a42a7c8b808dc5a7aff61376 a wfprov:Artifact, + prov:Entity . + +id:577e0cfe-9f26-4170-872b-94c1b2578771 a wfprov:WorkflowEngine, + prov:Agent, + prov:SoftwareAgent ; + rdfs:label "cwltool 3.1.20240112164112"^^xsd:string ; + prov:qualifiedStart [ a prov:Start ; + prov:atTime "2024-03-26T09:35:00.174799"^^xsd:dateTime ; + prov:hadActivity id:dccc3c5a-089e-4c07-aeab-3e1b80a8bf21 ] . + +id:73420c43-a023-4f52-9630-13bcdd9441c2 a wfprov:WorkflowRun, + prov:Activity ; + rdfs:label "Run of workflow/packed.cwl#main"^^xsd:string ; + prov:qualifiedAssociation [ a prov:Association ; + prov:hadPlan wf:main ] ; + prov:qualifiedEnd [ a prov:End ; + prov:atTime "2024-03-26T09:35:02.212375"^^xsd:dateTime ; + prov:hadActivity id:577e0cfe-9f26-4170-872b-94c1b2578771 ] ; + prov:qualifiedStart [ a prov:Start ; + prov:atTime "2024-03-26T09:35:00.174854"^^xsd:dateTime ; + prov:hadActivity id:577e0cfe-9f26-4170-872b-94c1b2578771 ] ; + prov:qualifiedUsage [ a prov:Usage ; + prov:atTime "2024-03-26T09:35:00.192411"^^xsd:dateTime ; + prov:entity id:c872005a-958a-451f-8d22-662a554676fb ; + prov:hadRole ], + [ a prov:Usage ; + prov:atTime "2024-03-26T09:35:00.192452"^^xsd:dateTime ; + prov:entity id:b87ba1ac-3fc2-4137-9f2c-06d99cb47275 ; + prov:hadRole ] ; + prov:startedAtTime "2024-03-26T09:35:00.174824"^^xsd:dateTime ; + prov:wasAssociatedWith id:577e0cfe-9f26-4170-872b-94c1b2578771 . + diff --git a/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.xml b/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.xml new file mode 100644 index 0000000..b20738b --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/metadata/provenance/primary.cwlprov.xml @@ -0,0 +1,222 @@ + + + + + schema:Person + + + + + + + cwltool 3.1.20240112164112 + wfprov:WorkflowEngine + + + + + 2024-03-26T09:35:00.174799 + + + 2024-03-26T09:35:00.174824 + Run of workflow/packed.cwl#main + wfprov:WorkflowRun + + + + + + + + + + 2024-03-26T09:35:00.174854 + + + Prospective provenance + wfdesc:Workflow + + + wfdesc:Process + + + Prospective provenance + wf:main/rev + + + wfdesc:Process + + + Prospective provenance + wf:main/sorted + + + wfprov:Artifact + + + wf4ever:File + wfprov:Artifact + hello.txt + .txt + hello + + + + + + + + + 2024-03-26T09:35:00.192411 + wf:main/input + + + true + + + + + 2024-03-26T09:35:00.192452 + wf:main/reverse_sort + + + Run of workflow/packed.cwl#main/rev + wfprov:ProcessRun + + + + + + + + + + 2024-03-26T09:35:00.193352 + + + Container execution of image debian:8 + debian:8 + + + + + + + wfprov:Artifact + + + wf4ever:File + wfprov:Artifact + hello.txt + .txt + hello + + + + + + + + + 2024-03-26T09:35:00.205071 + wf:main/rev/input + + + wfprov:Artifact + + + wf4ever:File + wfprov:Artifact + output.txt + .txt + output + + + + + + + + + 2024-03-26T09:35:01.207015 + wf:main/rev/output + + + + + 2024-03-26T09:35:01.207010 + + + Run of workflow/packed.cwl#main/sorted + wfprov:ProcessRun + + + + + + + + + + 2024-03-26T09:35:01.208322 + + + Container execution of image debian:8 + debian:8 + + + + + + + + + 2024-03-26T09:35:01.209542 + wf:main/sorted/input + + + true + + + + + 2024-03-26T09:35:01.209606 + wf:main/sorted/reverse + + + wfprov:Artifact + + + wf4ever:File + wfprov:Artifact + output.txt + .txt + output + + + + + + + + + 2024-03-26T09:35:02.211447 + wf:main/sorted/output + + + + + 2024-03-26T09:35:02.211442 + + + + + 2024-03-26T09:35:02.212338 + wf:main/primary/output + + + + + 2024-03-26T09:35:02.212375 + + diff --git a/tests/data/revsort-no-agent-name-run-1/snapshot/revsort.cwl b/tests/data/revsort-no-agent-name-run-1/snapshot/revsort.cwl new file mode 100755 index 0000000..fe1194e --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/snapshot/revsort.cwl @@ -0,0 +1,76 @@ +#!/usr/bin/env cwl-runner +# +# This is a two-step workflow which uses "revtool" and "sorttool" defined above. +# +class: Workflow +doc: "Reverse the lines in a document, then sort those lines." +cwlVersion: v1.0 + +# Requirements & hints specify prerequisites and extensions to the workflow. +# In this example, DockerRequirement specifies a default Docker container +# in which the command line tools will execute. +hints: + - class: DockerRequirement + dockerPull: debian:8 + + +# The inputs array defines the structure of the input object that describes +# the inputs to the workflow. +# +# The "reverse_sort" input parameter demonstrates the "default" field. If the +# field "reverse_sort" is not provided in the input object, the default value will +# be used. +inputs: + input: + type: File + doc: "The input file to be processed." + format: iana:text/plain + default: + class: File + location: hello.txt + reverse_sort: + type: boolean + default: true + doc: "If true, reverse (decending) sort" + +# The "outputs" array defines the structure of the output object that describes +# the outputs of the workflow. +# +# Each output field must be connected to the output of one of the workflow +# steps using the "connect" field. Here, the parameter "#output" of the +# workflow comes from the "#sorted" output of the "sort" step. +outputs: + output: + type: File + outputSource: sorted/output + doc: "The output with the lines reversed and sorted." + +# The "steps" array lists the executable steps that make up the workflow. +# The tool to execute each step is listed in the "run" field. +# +# In the first step, the "inputs" field of the step connects the upstream +# parameter "#input" of the workflow to the input parameter of the tool +# "revtool.cwl#input" +# +# In the second step, the "inputs" field of the step connects the output +# parameter "#reversed" from the first step to the input parameter of the +# tool "sorttool.cwl#input". +steps: + rev: + in: + input: input + out: [output] + run: revtool.cwl + + sorted: + in: + input: rev/output + reverse: reverse_sort + out: [output] + run: sorttool.cwl + +$namespaces: + iana: https://www.iana.org/assignments/media-types/ + +$schemas: + - empty2.ttl diff --git a/tests/data/revsort-no-agent-name-run-1/snapshot/revtool.cwl b/tests/data/revsort-no-agent-name-run-1/snapshot/revtool.cwl new file mode 100755 index 0000000..858ccb5 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/snapshot/revtool.cwl @@ -0,0 +1,40 @@ +#!/usr/bin/env cwl-runner +# +# Simplest example command line program wrapper for the Unix tool "rev". +# +class: CommandLineTool +cwlVersion: v1.0 +doc: "Reverse each line using the `rev` command" +$schemas: + - empty.ttl + +# The "inputs" array defines the structure of the input object that describes +# the inputs to the underlying program. Here, there is one input field +# defined that will be called "input" and will contain a "File" object. +# +# The input binding indicates that the input value should be turned into a +# command line argument. In this example inputBinding is an empty object, +# which indicates that the file name should be added to the command line at +# a default location. +inputs: + input: + type: File + inputBinding: {} + +# The "outputs" array defines the structure of the output object that +# describes the outputs of the underlying program. Here, there is one +# output field defined that will be called "output", must be a "File" type, +# and after the program executes, the output value will be the file +# output.txt in the designated output directory. +outputs: + output: + type: File + outputBinding: + glob: output.txt + +# The actual program to execute. +baseCommand: rev + +# Specify that the standard output stream must be redirected to a file called +# output.txt in the designated output directory. +stdout: output.txt diff --git a/tests/data/revsort-no-agent-name-run-1/snapshot/sorttool.cwl b/tests/data/revsort-no-agent-name-run-1/snapshot/sorttool.cwl new file mode 100755 index 0000000..65b130f --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/snapshot/sorttool.cwl @@ -0,0 +1,36 @@ +#!/usr/bin/env cwl-runner +# Example command line program wrapper for the Unix tool "sort" +# demonstrating command line flags. +class: CommandLineTool +doc: "Sort lines using the `sort` command" +cwlVersion: v1.0 + +# This example is similar to the previous one, with an additional input +# parameter called "reverse". It is a boolean parameter, which is +# intepreted as a command line flag. The value of "prefix" is used for +# flag to put on the command line if "reverse" is true, if "reverse" is +# false, no flag is added. +# +# This example also introduced the "position" field. This indicates the +# sorting order of items on the command line. Lower numbers are placed +# before higher numbers. Here, the "--reverse" flag (if present) will be +# added to the command line before the input file path. +inputs: + - id: reverse + type: boolean + inputBinding: + position: 1 + prefix: "--reverse" + - id: input + type: File + inputBinding: + position: 2 + +outputs: + - id: output + type: File + outputBinding: + glob: output.txt + +baseCommand: sort +stdout: output.txt diff --git a/tests/data/revsort-no-agent-name-run-1/tagmanifest-sha1.txt b/tests/data/revsort-no-agent-name-run-1/tagmanifest-sha1.txt new file mode 100644 index 0000000..eb78064 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/tagmanifest-sha1.txt @@ -0,0 +1,15 @@ +2f1ac7c16ea1c59cbb8ed180f673b4f6d4246b3c workflow/packed.cwl +948af6e6d0b3ac746d74d92cc2f4747fafbb7157 workflow/primary-job.json +ef1ea3099565be75d2aac9a5b68ecf710d33ba50 metadata/provenance/primary.cwlprov.xml +646e5684dbf9c72ba64eac5b36ffc857466dcb03 metadata/provenance/primary.cwlprov.provn +88d59e1b123ec9d71b53f05f283a4c5e995831ad metadata/provenance/primary.cwlprov.json +f819114cd144fc19cdb351b3fb2833a48cd6aca7 metadata/provenance/primary.cwlprov.ttl +41153880fd5d30fdf31dcd5fda540250e9f97537 metadata/provenance/primary.cwlprov.nt +cc1ff92cc5b15630198ea155fc4fc6c263282ed4 metadata/provenance/primary.cwlprov.jsonld +80aa1ff6109445df97ab220f74fd3fd53d7ebead workflow/primary-output.json +50569d1582d521acd2d5a6ac60fcc0b6d248e277 snapshot/revsort.cwl +bfb145b280f58c246f6dd6d35abcb83eec5ea4c4 snapshot/revtool.cwl +f948e9b450e62e47dc9e96689c500f2efe708748 snapshot/sorttool.cwl +0219e76a989a88bb5b2d547b159b383cbe313c32 metadata/logs/engine.577e0cfe-9f26-4170-872b-94c1b2578771.txt +a2a312bf918689afee1a2d25b4ed0204199cc602 metadata/manifest.json +a3fae45f5349100333b24abd95435c62868d152c bag-info.txt diff --git a/tests/data/revsort-no-agent-name-run-1/tagmanifest-sha256.txt b/tests/data/revsort-no-agent-name-run-1/tagmanifest-sha256.txt new file mode 100644 index 0000000..0aa1ca3 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/tagmanifest-sha256.txt @@ -0,0 +1,15 @@ +da1753a595447063d696620f2348e3cfc0788386e0ed6c706ba3d78323021af9 workflow/packed.cwl +cc0ae39c4f0fffd10fc8fb33100d0d733cff64fe62ac3c29d64f8f11c24f8d77 workflow/primary-job.json +b1011ade957fee5e8df317916071ee3f208f0910fc0e53b672473f8776805709 metadata/provenance/primary.cwlprov.xml +4b5780a9691246cbf677b93bd5e8c65954c51f8fb6a96a9a051a9d748c950f55 metadata/provenance/primary.cwlprov.provn +50e0b6d41f2b03dfd265891b8a58a34cadf2ae9fcece2987da1768c9c7db279e metadata/provenance/primary.cwlprov.json +71abe92a46b3a079f34263762b250db0a1615b0d0607afc66ba12c9100b0c492 metadata/provenance/primary.cwlprov.ttl +dca321e497290452479e1681b7029a3c3e0cbd3826ccb3e2302c43ca8b4e7049 metadata/provenance/primary.cwlprov.nt +2bbf2d3fb439b5998e2770c255b967097f1d5cd224ce40166da32676a6458096 metadata/provenance/primary.cwlprov.jsonld +967d8d0f67a9d00245f0a8fd59833cb3d75db1fb44bce6b2d0eb704f99dfb6e1 workflow/primary-output.json +912121493779e2ca287ca6e3d7f72627f69b54c483f428559809bf3c9d08026b snapshot/revsort.cwl +1de15be05a9228a75a0df8a0005dc46501a2940e557477de8b856cd8ec9983a5 snapshot/revtool.cwl +122d5784b626114d996bed6ee3fb7c4dc3cb04831511a6b914445e8937249c89 snapshot/sorttool.cwl +241e1b3d9c75a2384ccb4d4db64c295003d000bda79b2db899150838e18bbcd2 metadata/logs/engine.577e0cfe-9f26-4170-872b-94c1b2578771.txt +78d682de7eec0952ade5da0f4aa19aef437e34efe18784bba53eee541259898d metadata/manifest.json +094b6f93caf29907c7ccb18839f73fb7febe05d1a5cd4c74694645b26e14a4ca bag-info.txt diff --git a/tests/data/revsort-no-agent-name-run-1/tagmanifest-sha512.txt b/tests/data/revsort-no-agent-name-run-1/tagmanifest-sha512.txt new file mode 100644 index 0000000..1826164 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/tagmanifest-sha512.txt @@ -0,0 +1,15 @@ +4308f46ca6e4584067f5270a0959008efab8d2b90d594e1fa93427693f9191dc7096ddbacd4c7cb0e08593dc6efacc6e6438fbb02f8eb2e0fadc4319065d4c1b workflow/packed.cwl +6333321ba219a90b3e08185c6b2548aed433aa509bb4148274fbb8d123788177c58583a839e1e724717b0c205c529749dc3953c4f10da6eec198320c72ab0989 workflow/primary-job.json +604ce02c07b6bae2f62e7f0ef2b8e3d3ca5cd6428c60b0d6af11a2fd3251c0357fbd9f9fe553a2ee2c28faa367bd8913ee28a0f9f37e019a0908ee1fbac357f0 metadata/provenance/primary.cwlprov.xml +cad94528e838e635cfed6c492a76088a79be832485924cd03b1be35289d01453a0bccf7e55b606494c4661bcad85464e1e71ed78e90016fe3b9ed96ca0677602 metadata/provenance/primary.cwlprov.provn +127fae61901ea6d36f63b5a0131bd1931e85645b0e11319b224c423f31ac7b2d43eda1bf10c5aa888a99bd53a605bf7d14d9e35160ffef1468c8b7c0525338f6 metadata/provenance/primary.cwlprov.json +bea4f46b713fbc1392f5f12fafbbddcb7e1e776431d8caf888c4bd1502f96f2782f1c0b31dac1f6b4b7fbad60d1c19f38d08d0527cdf27eaf6d664f7f6b5be5b metadata/provenance/primary.cwlprov.ttl +7e950649678d3acb9001e3b3abac38a9064fdcadaed4c5d4d375f2d5c83cb04504f45e215d630ab08c8dedd36a3f836b4534e24f5c3cc89c6a79a59619f99039 metadata/provenance/primary.cwlprov.nt +75db7eaf05df43788747a74ce016def542f15d8cd360613e3a6898accb21c55ff14336b4a3d03d76c327d28c5590735623d1107cb3a432a10d6ad82ec4d0481b metadata/provenance/primary.cwlprov.jsonld +32efbcd381ae5172de6ba6a5bb297871b58161d9af8007d585b93765585a8c051da35f940a622f952b85764e825a7f9f95efba54ccfed7bcd28f2343c22aa232 workflow/primary-output.json +3db0c454aa99e3d7eb1e29e2bc8c6a8c1ea35f1d516467e0d1dc255f1a729093c4d9de3d888083e27b5f97fc6ad3f500c0656115a7dd65928cf2a389aed408c5 snapshot/revsort.cwl +8208580774b7d35ed38160c03bf76455ef5b68dce862caf99cae89d4369b3183cd33f7018b2442f4f6bfa5bc42cee8aece38b58929cc4272a6ec6f57aa8c87d6 snapshot/revtool.cwl +80364679668a3145f85bc593e2f4d56408bafeb7c9bc505c8c5903044fec3b7eed2928902d6c78ca7c76d00c0904825085a4fb06832dc5e19ecfb27a1840935f snapshot/sorttool.cwl +c334d6b4ff5a15665e8d244f482b0336594ae809e492e13a23453d3ba4b740f2f6f61c7e0e2d7f80f319b335df577a788c7109e2ea9099dbb07ca645022d5e33 metadata/logs/engine.577e0cfe-9f26-4170-872b-94c1b2578771.txt +2de8ae30641dd233e43b3932074b5b0511bc6a8ac7f35723a3fc03e639e88a2ac71745ddc6a664dfba2771643e75da8e46b9f0750cd49f0c050eb2e14d12723b metadata/manifest.json +9c5282346333ddd3af1d9a349439c9ae7a3eb934b5eb749ab95f139ffef5ec33bfa37d6a1ab7b6c6c1b1a4a0031ef16a1f6ac0de25ec96de5b1a3527588b1b37 bag-info.txt diff --git a/tests/data/revsort-no-agent-name-run-1/workflow/packed.cwl b/tests/data/revsort-no-agent-name-run-1/workflow/packed.cwl new file mode 100644 index 0000000..7656a4e --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/workflow/packed.cwl @@ -0,0 +1,137 @@ +{ + "$graph": [ + { + "class": "Workflow", + "doc": "Reverse the lines in a document, then sort those lines.", + "hints": [ + { + "class": "DockerRequirement", + "dockerPull": "debian:8" + } + ], + "inputs": [ + { + "type": "File", + "doc": "The input file to be processed.", + "format": "https://www.iana.org/assignments/media-types/text/plain", + "default": { + "class": "File", + "location": "file:///home/dbauer/projects/runcrate/tests/data/revsort-run-author/snapshot/hello.txt" + }, + "id": "#main/input" + }, + { + "type": "boolean", + "default": true, + "doc": "If true, reverse (decending) sort", + "id": "#main/reverse_sort" + } + ], + "steps": [ + { + "in": [ + { + "source": "#main/input", + "id": "#main/rev/input" + } + ], + "out": [ + "#main/rev/output" + ], + "run": "#revtool.cwl", + "id": "#main/rev" + }, + { + "in": [ + { + "source": "#main/rev/output", + "id": "#main/sorted/input" + }, + { + "source": "#main/reverse_sort", + "id": "#main/sorted/reverse" + } + ], + "out": [ + "#main/sorted/output" + ], + "run": "#sorttool.cwl", + "id": "#main/sorted" + } + ], + "id": "#main", + "outputs": [ + { + "type": "File", + "outputSource": "#main/sorted/output", + "doc": "The output with the lines reversed and sorted.", + "id": "#main/output" + } + ] + }, + { + "class": "CommandLineTool", + "doc": "Reverse each line using the `rev` command", + "inputs": [ + { + "type": "File", + "inputBinding": {}, + "id": "#revtool.cwl/input" + } + ], + "outputs": [ + { + "type": "File", + "outputBinding": { + "glob": "output.txt" + }, + "id": "#revtool.cwl/output" + } + ], + "baseCommand": "rev", + "stdout": "output.txt", + "id": "#revtool.cwl" + }, + { + "class": "CommandLineTool", + "doc": "Sort lines using the `sort` command", + "inputs": [ + { + "id": "#sorttool.cwl/reverse", + "type": "boolean", + "inputBinding": { + "position": 1, + "prefix": "--reverse" + } + }, + { + "id": "#sorttool.cwl/input", + "type": "File", + "inputBinding": { + "position": 2 + } + } + ], + "outputs": [ + { + "id": "#sorttool.cwl/output", + "type": "File", + "outputBinding": { + "glob": "output.txt" + } + } + ], + "baseCommand": "sort", + "stdout": "output.txt", + "id": "#sorttool.cwl" + } + ], + "cwlVersion": "v1.0", + "$schemas": [ + "file:///home/dbauer/projects/runcrate/tests/data/revsort-run-author/snapshot/empty2.ttl", + "file:///home/dbauer/projects/runcrate/tests/data/revsort-run-author/snapshot/empty.ttl" + ], + "$namespaces": { + "iana": "https://www.iana.org/assignments/media-types/" + } +} \ No newline at end of file diff --git a/tests/data/revsort-no-agent-name-run-1/workflow/primary-job.json b/tests/data/revsort-no-agent-name-run-1/workflow/primary-job.json new file mode 100644 index 0000000..2576094 --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/workflow/primary-job.json @@ -0,0 +1,13 @@ +{ + "input": { + "class": "File", + "format": "https://www.iana.org/assignments/media-types/text/plain", + "location": "../data/32/327fc7aedf4f6b69a42a7c8b808dc5a7aff61376", + "size": 1111, + "basename": "hello.txt", + "nameroot": "hello", + "nameext": ".txt", + "checksum": "sha1$327fc7aedf4f6b69a42a7c8b808dc5a7aff61376" + }, + "reverse_sort": true +} diff --git a/tests/data/revsort-no-agent-name-run-1/workflow/primary-output.json b/tests/data/revsort-no-agent-name-run-1/workflow/primary-output.json new file mode 100644 index 0000000..329557d --- /dev/null +++ b/tests/data/revsort-no-agent-name-run-1/workflow/primary-output.json @@ -0,0 +1,13 @@ +{ + "output": { + "location": "../data/b9/b9214658cc453331b62c2282b772a5c063dbd284", + "basename": "output.txt", + "nameroot": "output", + "nameext": ".txt", + "class": "File", + "checksum": "sha1$b9214658cc453331b62c2282b772a5c063dbd284", + "size": 1111, + "http://commonwl.org/cwltool#generation": 0, + "@id": "urn:uuid:072eaf95-a2f6-4417-980c-a7b930221dce" + } +} diff --git a/tests/test_cli.py b/tests/test_cli.py index 2b7ac90..f0faaba 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -75,6 +75,19 @@ def test_cli_convert_license(data_dir, tmpdir): assert crate.root_dataset["license"] == license +def test_cli_convert_agent(data_dir, tmpdir, monkeypatch): + monkeypatch.chdir(str(tmpdir)) + root = data_dir / "revsort-no-agent-name-run-1" + runner = CliRunner() + args = ["convert", str(root)] + result = runner.invoke(cli, args) + assert result.exit_code == 0, result.exception + crate_zip = tmpdir / f"{root.name}.crate.zip" + assert crate_zip.is_file() + crate = ROCrate(crate_zip) + assert crate.get("https://orcid.org/0000-0001-9447-460X") + + def test_cli_convert_workflow_name(data_dir, tmpdir): root = data_dir / "revsort-run-1" crate_dir = tmpdir / "revsort-run-1-crate" From 81c4feb46180cd13dc6027f1d833879aca0eda4f Mon Sep 17 00:00:00 2001 From: simleo Date: Tue, 26 Mar 2024 11:38:45 +0100 Subject: [PATCH 3/5] add builder test for agent with no name --- tests/test_cwlprov_crate_builder.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_cwlprov_crate_builder.py b/tests/test_cwlprov_crate_builder.py index 886f241..ddf1b02 100644 --- a/tests/test_cwlprov_crate_builder.py +++ b/tests/test_cwlprov_crate_builder.py @@ -1176,3 +1176,18 @@ def test_revsort_inline(data_dir, tmpdir, cwl_version): (reverse_sort_param.id, reverse_param.id), } assert set(_connected(workflow)) == {(sort_out_param.id, out_file_param.id)} + + +def test_agent_no_name(data_dir, tmpdir): + root = data_dir / "revsort-no-agent-name-run-1" + output = tmpdir / "revsort-no-agent-name-run-1-crate" + builder = ProvCrateBuilder(root) + crate = builder.build() + crate.write(output) + sel = [_ for _ in crate.contextual_entities if "OrganizeAction" in _.type] + assert len(sel) == 1 + engine_action = sel[0] + agent = engine_action["agent"] + assert agent.type == "Person" + assert agent.id == "https://orcid.org/0000-0001-9447-460X" + assert "name" not in agent From 18f26e07f4c3480990ec460740a100c0203f94b7 Mon Sep 17 00:00:00 2001 From: simleo Date: Tue, 26 Mar 2024 11:48:23 +0100 Subject: [PATCH 4/5] update CITATION.cff [no ci] --- CITATION.cff | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CITATION.cff b/CITATION.cff index 22fc9f5..82ddfcf 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -10,6 +10,9 @@ authors: - family-names: Crusoe given-names: Michael R. orcid: https://orcid.org/0000-0002-2961-9670 + - family-names: Bauer + given-names: Daniel + orcid: https://orcid.org/0000-0001-9447-460X title: "runcrate" version: 0.5.0 doi: 10.5281/zenodo.7762627 From cbfd4c0f87019a0c2701882c4ba3fe10ed227365 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 26 Mar 2024 12:08:50 +0100 Subject: [PATCH 5/5] update copyright with SGN --- src/runcrate/convert.py | 1 + tests/test_cli.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/runcrate/convert.py b/src/runcrate/convert.py index 5a09c91..cc20fc6 100644 --- a/src/runcrate/convert.py +++ b/src/runcrate/convert.py @@ -1,5 +1,6 @@ # Copyright 2022-2024 CRS4. # Copyright 2023-2024 Michael R. Crusoe +# Copyright 2024 Senckenberg Society for Nature Research # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/test_cli.py b/tests/test_cli.py index f0faaba..8d8d357 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,4 +1,5 @@ # Copyright 2022-2024 CRS4. +# Copyright 2024 Senckenberg Society for Nature Research # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.