Skip to content

Update workflow context to point to bioschemas and add dct namespace#2482

Open
lasse-cs wants to merge 7 commits intoseek4science:mainfrom
lasse-cs:636-compact-computational-workflow
Open

Update workflow context to point to bioschemas and add dct namespace#2482
lasse-cs wants to merge 7 commits intoseek4science:mainfrom
lasse-cs:636-compact-computational-workflow

Conversation

@lasse-cs
Copy link
Contributor

Partly resolves #781 and #636

Extend the context to add bioschemas terms used in Workflows.
Extend the context to add dct namespace

Comment on lines +26 to +28
def mini_context
super.merge(ComputationalWorkflow: WORKFLOW_TYPE)
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think remove these methods and just use context for simplicity, so we don't have to maintain the two methods for each decorator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated this.

Comment on lines +7 to +9
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion - I have updated this.

@lasse-cs lasse-cs marked this pull request as ready for review February 12, 2026 20:11
@lasse-cs lasse-cs requested a review from fbacall February 13, 2026 15:30
Copy link
Contributor

@fbacall fbacall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, just needs some thought about how to synchronize with RO-Crate context changes: ResearchObject/ro-crate#529

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workflow validation against bioschemas profile - description of errors

2 participants