Update workflow context to point to bioschemas and add dct namespace#2482
Update workflow context to point to bioschemas and add dct namespace#2482lasse-cs wants to merge 7 commits intoseek4science:mainfrom
Conversation
| def mini_context | ||
| super.merge(ComputationalWorkflow: WORKFLOW_TYPE) | ||
| end |
There was a problem hiding this comment.
I think remove these methods and just use context for simplicity, so we don't have to maintain the two methods for each decorator.
There was a problem hiding this comment.
I have updated this.
| HOST_INSTITUTION_PROPERTY = 'https://bioschemas.org/properties/hostInstitution'.freeze | ||
| CONTACT_PROPERTY = 'https://bioschemas.org/properties/contact'.freeze | ||
| EVENT_TYPE_PROPERTY = 'https://bioschemas.org/properties/eventType'.freeze |
There was a problem hiding this comment.
I've just spent some of my evening trying to discover what the canonical URIs for Bioschemas' custom properties should be.
Discussion here if you're interested: BioSchemas/specifications#653
If not, the prefix is https://bioschemas.org/terms/, so https://bioschemas.org/terms/contact etc.
(Even though the Bioschemas website and RO-Crate metadata context do not use this yet)
There was a problem hiding this comment.
Thanks - I have added this for the types / properties.
I wasn't super sure about the draft types - so I have left these as before for now?
| pairs.each_value do |collection| | ||
| ctx.merge!(mini_contexts(send(collection))) if respond_to?(collection) | ||
| end | ||
| ctx |
There was a problem hiding this comment.
Instead of doing this, I think set up an instance variable @additional_contexts = {} in the initializer and merge the contexts into that in the define_method(method) do block above.
There was a problem hiding this comment.
Thanks for the suggestion - I have updated this.
fbacall
left a comment
There was a problem hiding this comment.
All good, just needs some thought about how to synchronize with RO-Crate context changes: ResearchObject/ro-crate#529
Partly resolves #781 and #636
Extend the context to add bioschemas terms used in Workflows.
Extend the context to add dct namespace