Closed dgarijo closed 4 months ago
I guess it is partially mimicking what it is done with RO-Crate . Both for RO-Crate 1.1 and any of the profiles, their permalinks (https://w3id.org/ro/crate/1.1 and for example https://w3id.org/ro/wfrun/provenance/0.4 ) are resolving to the human readable documentation and they have to be used in conformsTo
.
But for JSON-LD context matters RO-Crate 1.1 has https://w3id.org/ro/crate/1.1/context , meanwhile WorkflowRun profiles have a complementary context https://w3id.org/ro/terms/workflow-run (which is only needed for very few terms which do not appear in RO-Crate 1.1 context)
We should make it resolvable with content negotiation. It's not hard to do.
El lun., 6 may. 2024 8:11 p. m., José María Fernández < @.***> escribió:
I guess it is partially mimicking what it is done with RO-Crate . Both for RO-Crate 1.1 and any of the profiles, their permalinks ( https://w3id.org/ro/crate/1.1 and for example https://w3id.org/ro/wfrun/provenance/0.4 ) are resolving to the human readable documentation and they have to be used in conformsTo.
But for JSON-LD context matters RO-Crate 1.1 has https://w3id.org/ro/crate/1.1/context , meanwhile WorkflowRun profiles have a complementary context https://w3id.org/ro/terms/workflow-run (which is only needed for very few terms which do not appear in RO-Crate 1.1 context)
— Reply to this email directly, view it on GitHub https://github.com/ResearchObject/workflow-run-crate/issues/72#issuecomment-2096626786, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALTIGSC6QJDRHUTLWPAOJ3ZA7BTJAVCNFSM6AAAAABHJMABAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJWGYZDMNZYGY . You are receiving this because you authored the thread.Message ID: @.***>
As w3id.org relies on an Apache reverse proxy being set up for each one of the cases, it might be technically feasible to perform it just tweaking https://github.com/perma-id/w3id.org/blob/master/ro/.htaccess inspired in this StackOverflow example https://superuser.com/a/858867
We should make it resolvable with content negotiation. It's not hard to do.
Can you please take care of this, @dgarijo? Then it would be great if you explained what you have done, for the benefit of everyone else.
Are there any machine readable context files associated with the profiles? If so I can do the content negotiation
El mar., 7 may. 2024 9:20 a. m., Simone Leo @.***> escribió:
We should make it resolvable with content negotiation. It's not hard to do.
Can you please take care of this, @dgarijo https://github.com/dgarijo? Then it would be great if you explained what you have done, for the benefit of everyone else.
— Reply to this email directly, view it on GitHub https://github.com/ResearchObject/workflow-run-crate/issues/72#issuecomment-2097618429, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALTIGSTSYDS7OPGZSZWRZDZBB6EHAVCNFSM6AAAAABHJMABAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJXGYYTQNBSHE . You are receiving this because you were mentioned.Message ID: @.***>
The context is the same for all three profiles, it's at https://w3id.org/ro/terms/workflow-run.
$ curl -sH "accept:application/ld+json" -L https://w3id.org/ro/terms/workflow-run
{
"@context": [
"https://w3id.org/ro/crate/1.1/context",
{
"ParameterConnection": "https://w3id.org/ro/terms/workflow-run#ParameterConnection",
"ContainerImage": "https://w3id.org/ro/terms/workflow-run#ContainerImage",
"DockerImage": "https://w3id.org/ro/terms/workflow-run#DockerImage",
"SIFImage": "https://w3id.org/ro/terms/workflow-run#SIFImage",
"connection": "https://w3id.org/ro/terms/workflow-run#connection",
"sourceParameter": "https://w3id.org/ro/terms/workflow-run#sourceParameter",
"targetParameter": "https://w3id.org/ro/terms/workflow-run#targetParameter",
"md5": "https://w3id.org/ro/terms/workflow-run#md5",
"sha1": "https://w3id.org/ro/terms/workflow-run#sha1",
"sha256": "https://w3id.org/ro/terms/workflow-run#sha256",
"sha512": "https://w3id.org/ro/terms/workflow-run#sha512",
"environment": "https://w3id.org/ro/terms/workflow-run#environment",
"registry": "https://w3id.org/ro/terms/workflow-run#registry",
"tag": "https://w3id.org/ro/terms/workflow-run#tag",
"containerImage": "https://w3id.org/ro/terms/workflow-run#containerImage"
}
]
}
(from WRROC meeting) @dgarijo you can work on this now that #73 is merged
All right, I will try to push this ASAP (I am still running late on urgent tasks, sorry)
This is now done
Enabled in the latest version only:
curl -sH "Accept:application/ld+json" -L https://w3id.org/ro/wfrun/provenance/0.5-DRAFT
See also perma-id/w3id.org#4215 adding latest version, e.g.
curl -sH "Accept:application/ld+json" -L https://w3id.org/ro/wfrun/provenance
This now redirects to https://www.researchobject.org/workflow-run-crate/profiles/provenance_run_crate/ro-crate-metadata.jsonld which comes back with content-type: application/ld+json
-- it's a double symlink:
provenance_run_crate
is symlink to 0.5/provenance_run_crate
for the current release -- and equivalent for the other two profilesro-crate-metadata.jsonld
is symlink to the mandated ro-crate-metadata.json
-- this extension gives the more specific JSON-LD content type rather than application/json
on GitHub Pages. (see https://www.researchobject.org/ro-crate/specification/1.2-DRAFT/appendix/jsonld.html#ro-crate-json-ld-media-type )So on a release of 0.6 we only need to update those 3 symlinks (and of course version number etc. within the JSON-LD)
btw,
Within the JSON-LD of the profile crate itself I added to the @context
:
"@base" "https://www.researchobject.org/workflow-run-crate/profiles/0.5/process_run_crate/"
This mean that its hasPart
e.g. about example1/
would resolve to the versioned https://www.researchobject.org/workflow-run-crate/profiles/0.5/process_run_crate/example1/
and perhaps more crucially so that the version-less profile crate is, triple by triple, the same crate as the versioned crate.
Alternatively we could make it into a Detached Crate and use absolute URIs throughout. It would just mean a bigger search-replace on update. (I use sed -i s/0.5-DRAFT/0.5/g
)
All profiles should resolve, at least to their context file:
returns just HTML, which is not ideal