Move provenance_metadata onto NamedThing#3231
Conversation
Declare provenance_metadata once on the abstract NamedThing root and remove the four direct declarations (Study, DataGeneration, Biosample, OrganismSample). All NamedThing subclasses now inherit it (55 classes, up from 6), so any record can carry provenance. The per-class description overrides in slot_usage are kept; they refine the now-inherited slot. provenance_metadata is optional, so this is non-breaking for existing data. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
There was a problem hiding this comment.
Pull request overview
Moves the provenance_metadata slot to the abstract NamedThing root so all NamedThing subclasses inherit it, and removes the per-class direct slot declarations that previously limited reach to a handful of classes. This supports broader, consistent provenance (and companion “badges” work) across the schema without breaking existing data since the slot remains optional.
Changes:
- Declare
provenance_metadataonce onNamedThing(so allNamedThingsubclasses inherit it). - Remove direct
provenance_metadataslot declarations fromStudy,DataGeneration,Biosample, andOrganismSample. - Preserve per-class
slot_usagedescriptions where present (but see comment forOrganismSample).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/schema/basic_classes.yaml | Adds provenance_metadata to NamedThing; removes direct declarations from Study and DataGeneration while keeping their slot_usage overrides. |
| src/schema/core.yaml | Removes direct declarations from Biosample and OrganismSample; Biosample retains a slot_usage override, OrganismSample currently does not. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| slots: | ||
| - associated_studies | ||
| - expected_organism | ||
| - embargoed | ||
| - provenance_metadata | ||
| - external_database_identifiers |
There was a problem hiding this comment.
Verified there is no regression. OrganismSample never had a provenance_metadata slot_usage override (only Study, DataGeneration, and Biosample do). On main it listed the slot but used the generic description, so moving the declaration to NamedThing leaves its description unchanged. If we want a class-specific description for OrganismSample we can add one, but that would be a new override, not preservation of an existing one.
Declares
provenance_metadataonce on the abstract NamedThing root and removesthe four direct declarations (Study, DataGeneration, Biosample, OrganismSample).
All 55 NamedThing subclasses now inherit it (up from 6). Per-class description
overrides are kept.
provenance_metadatais optional, so this is non-breakingfor existing data.
Relationships
Closes #3229