Skip to content

Move provenance_metadata onto NamedThing#3231

Open
turbomam wants to merge 2 commits into
mainfrom
pr2-provenance-on-namedthing
Open

Move provenance_metadata onto NamedThing#3231
turbomam wants to merge 2 commits into
mainfrom
pr2-provenance-on-namedthing

Conversation

@turbomam

@turbomam turbomam commented Jun 26, 2026

Copy link
Copy Markdown
Member

Declares provenance_metadata once on the abstract NamedThing root and removes
the four direct declarations (Study, DataGeneration, Biosample, OrganismSample).
All 55 NamedThing subclasses now inherit it (up from 6). Per-class description
overrides are kept. provenance_metadata is optional, so this is non-breaking
for existing data.

Relationships

Closes #3229

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>
Copilot AI review requested due to automatic review settings June 26, 2026 17:18
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://microbiomedata.github.io/nmdc-schema/pr-preview/pr-3231/

Built to branch gh-pages at 2026-07-01 19:32 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_metadata once on NamedThing (so all NamedThing subclasses inherit it).
  • Remove direct provenance_metadata slot declarations from Study, DataGeneration, Biosample, and OrganismSample.
  • Preserve per-class slot_usage descriptions where present (but see comment for OrganismSample).

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.

Comment thread src/schema/core.yaml
Comment on lines 1297 to 1301
slots:
- associated_studies
- expected_organism
- embargoed
- provenance_metadata
- external_database_identifiers

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

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.

Move provenance_metadata onto NamedThing so all records can carry provenance

2 participants