Closed cmaumet closed 5 years ago
@cmaumet - could we get the nidmr context creator merged in a separate PR, so that the jsonld documents created do not have to be embed the entire context?
regarding xsd:string
we should see why it's not behaving properly. for the spm case, i can see that the version is a number not a string, but in general we should force that to be a string, since we cannot guarantee appropriate versioning for all software.
@cmaumet - could we get the nidmr context creator merged in a separate PR, so that the jsonld documents created do not have to be embed the entire context?
For testing (and iterating), it was easier to have the entire context in the document. I would suggest that we keep it like this until we have a good first full JSON-LD document and then, yes, let's use a URL.
the version is a number not a string, but in general we should force that to be a string, since we cannot guarantee appropriate versioning for all software.
Yes, but I think this is true of all strings, not just SPM versioning. e.g. here. My guess is that maybe compacting does not work when typing is implicit (i.e. no ^^xsd::string
)?
is there a place you could just write the original jsonld file from conversion from rdflib (for one example), as well just the nidmr context file with @version (just for testing purposes)?
@satra: the context file is saved here: https://github.com/cmaumet/nidm/blob/jsonld_export/nidm/nidm-results/terms/nidmr.json (raw version).
(Also now linked to purl: http://purl.org/nidash/context)
Also pointed out by @mih
Hi everyone! I think that this long-lasting pull request is now ready to merge. Thank you to @natachaperez for providing so many fixes!
No changes have been made to the data model, this PR focuses exclusively on updating our set of examples for NIDM-Results.
More specifically, in this PR we:
create_nidmr_context.py
)create_example_from_templates.py
)To ease the conversion, a couple of changes have been made to the turtle templates (used to generate the examples) and the owl file:
nidm-results.owl
)ContrastMap.txt
).Please let us know if you have any comments/feedback. If not, I'll merge at the end of the week. Thanks!
@cmaumet and @natachaperez - nice work - the one thing i would suggest changing is to first have a PR that generates the context, merge that and then use the purl for that context in the example files. it would be nice to not have really large contexts embedded in the json files.
also to generate the cleanest looking files, you may need to tweak @context
more, which means updating the converter. but first i would recommend simply playing with updating the context manually in the playground/python console to see the impact on the compact output.
@satra: Thanks that's a good point! This is now fixed (cf. 78dd6fd, ae60daf).
I'll update the context purl to redirect to master once this PR is merged.
Hi everyone! Last call: any additional comment on this PR? Or +1's for merge?
I only have a comment on the removal of the prov assignments. Is the assumption that you'll be able to tell whether the item is an entity, agent, or activity by tracing the term's parents up the tree, so it doesn't need to be explicit? (This is what I'm assuming in NIDM-E).
@khelm: yes, that's exactly right :)
I've just updated the context PURL: http://purl.org/nidash/context --now links to--> https://raw.githubusercontent.com/incf-nidash/nidm/master/nidm/nidm-results/terms/nidmr.json.
This PR converts all our turtle examples into JSON-LD using an automatically generated context (from the OWL file) with type-indexing (JSON-LD 1.1 feature) to ease readability of the NIDM documents.