fix updated PROV-JSONLD via specific serializer for JSON-LD - #2349
fmigneault wants to merge 12 commits into
Conversation
Replace the previous manual RDF-graph-patching workaround (vendored
prov-jsonld-context.json + rdflib json-ld compaction) with a direct
call to `ProvDocument.serialize(format="jsonld")`, now that prov>=3.1.0
implements the PROV-JSONLD submission natively and produces a proper
``` {"@context": [...], "@graph": [...]} ``` document.
- Bump the `prov` dependency from 1.5.1 to 3.1.0 (requirements.txt,
setup.py).
- Keep emitting the direct `prov:wasAssociatedWith` shortcut triple in
RDF-based serializations (ttl/nt/jsonld): prov 3.1.0's RDF serializer
only emits it for associations with no extra qualifying attributes,
so add an unqualified association alongside the plan-qualified one.
- Replace `mentionOf`/`Mention` (unsupported by the PROV-JSONLD
submission) with an equivalent `specializationOf` plus a plain
`prov:asInBundle` attribute, valid across all serializations.
- Bump CWLPROV_VERSION to 0.7.0 (breaking change to the emitted
provenance graph shape for associations/directory mentions).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2349 +/- ##
==========================================
+ Coverage 85.27% 85.56% +0.29%
==========================================
Files 46 46
Lines 8629 8640 +11
Branches 2022 2022
==========================================
+ Hits 7358 7393 +35
+ Misses 806 783 -23
+ Partials 465 464 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@fmigneault Can you open a draft PR to https://github.com/common-workflow-language/cwlprov/ for your proposed 0.7.0 version? |
|
@fmigneault Here is a patch to fix the Python 3.15 build; I guess you didn't check the "Allow edits from maintainers" box? From c70987670773866adb7025be1e77ab1a4544710c Mon Sep 17 00:00:00 2001
From: "Michael R. Crusoe" <michael.crusoe@gmail.com>
Date: Sat, 12 Sep 2026 11:43:29 +0200
Subject: [PATCH] adjust requirements to match
https://prov.readthedocs.io/en/latest/upgrading-3.0.html
---
requirements.txt | 4 ++--
setup.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/requirements.txt b/requirements.txt
index b4efc578..e837cabb 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,8 +1,8 @@
requests>=2.32.2
ruamel.yaml>=0.16.0,<0.20
-rdflib>=4.2.2,<7.7
+rdflib>=7,<7.7
schema-salad>=8.10,<9
-prov==3.1.0
+prov[xml,rdf]>=3.1.0,<3.2
mypy-extensions
psutil>=5.6.6
coloredlogs
diff --git a/setup.py b/setup.py
index 58ed3e48..7023ed6d 100644
--- a/setup.py
+++ b/setup.py
@@ -151,9 +151,9 @@ setup(
"requests >= 2.6.1", # >= 2.6.1 to workaround
# https://github.com/ionrock/cachecontrol/issues/137
"ruamel.yaml >= 0.16, < 0.20",
- "rdflib >= 4.2.2, < 7.7.0",
+ "rdflib >= 7, < 7.7.0",
"schema-salad >= 8.10, < 9",
- "prov == 3.1.0",
+ "prov[xml,rdf] >= 3.1.0, < 3.2",
"mypy-extensions",
"psutil >= 5.6.6",
"coloredlogs",
--
2.47.3 |
|
As @CGuichard discovered, that option isn't available when your fork is from an organization. Can you apply the changes from #2349 (comment) and merge/rebase with the latest from |
… Activities, replace by delegation actedOnBehalfOf
|
@mr-c Let me know if anything else needs adjustment. |
|
@mr-c |


Description
Replace the previous manual RDF-graph-patching workaround (vendored prov-jsonld-context.json + rdflib json-ld compaction) with a direct call to
ProvDocument.serialize(format="jsonld"), now that prov>=3.1.0 implements the PROV-JSONLD submission natively and produces a proper{"@context": [...], "@graph": [...]}document.prov==3.1.0prov==3.2.2dependency (requirements.txt, setup.py).castare not needed anymoree5ae375(this PR)prov:value="1" %% xsd:booleanbecomes the more appropriateprov:value="true" %% xsd:booleanprov:wasAssociatedWithshortcut triple in RDF-based serializations (ttl/nt/jsonld): prov 3.1.0's RDF serializer only emits it for associations with no extra qualifying attributes, so add an unqualified association alongside the plan-qualified one.mentionOf/Mention(unsupported by the PROV-JSONLD submission) with an equivalentspecializationOfplus a plainprov:asInBundleattribute, valid across all serializations.References