Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Sample grouping class in order to remove any_of range constraints #2244

Merged
merged 4 commits into from
Dec 4, 2024

Conversation

sierra-moxon
Copy link
Member

First PR towards removing any_of range constraints.
Sample is currently a grouping class for ProcessedSample and Biosample and is abstract.

Copy link

github-actions bot commented Nov 1, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://microbiomedata.github.io/nmdc-schema/pr-preview/pr-2244/
on branch gh-pages at 2024-11-27 20:50 UTC

@turbomam
Copy link
Member

turbomam commented Nov 5, 2024

This is going to be great @sierra-moxon

Is there any connection with

@sierra-moxon sierra-moxon marked this pull request as ready for review November 19, 2024 22:15
Sample:
class_uri: 'nmdc:Sample'
description: A sample is a material entity that can be characterized by an experiment.
is_a: NamedThing
Copy link
Member Author

Choose a reason for hiding this comment

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

@turbomam - would like this to be a MaterialEntity. All classes should be descendent of one of the 3 subclasses of NamedThing - not additional NamedThing subclasses.

@@ -271,7 +277,7 @@ classes:
samp_name_unique_key:
unique_key_slots:
- samp_name # id is already required to be unique because it is the identifier in Biosample's parent class, NamedThing
Copy link
Member Author

Choose a reason for hiding this comment

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

@sierra-moxon - fix this comment - it may be correct, but also should highlight parent vs. ancestor.

@eecavanna eecavanna changed the title add a 'Sample' grouping class in order to remove an_of range constraints add a 'Sample' grouping class in order to remove any_of range constraints Nov 20, 2024
Copy link
Collaborator

@eecavanna eecavanna left a comment

Choose a reason for hiding this comment

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

This looks good to me, @sierra-moxon. Thanks for implementing it (and walking us through it during today's meeting). The only thing I'm hesitant about is that the only is_a field that was modified here is for the Biosample class. Did you mean to do the same thing to the ProcessedSample class?

@sierra-moxon
Copy link
Member Author

This looks good to me, @sierra-moxon. Thanks for implementing it (and walking us through it during today's meeting). The only thing I'm hesitant about is that the only is_a field that was modified here is for the Biosample class. Did you mean to do the same thing to the ProcessedSample class?

Hi @eecavanna! :) can you check the is_a hierarchy here again? -- I appreciate your review.

@sierra-moxon
Copy link
Member Author

@turbomam - just a ping to say this is ready for review.

@eecavanna
Copy link
Collaborator

eecavanna commented Dec 4, 2024

Here's a summary of my takeaways from reading the latest diff:

  1. The DataGeneration class definition's has_input slot used to have an any_of constraint defined (whose members were: - range: Biosample and - range: ProcessedSample). This PR removes that any_of constraint and replaces it with range: Sample. The same is true about the MaterialProcessing, Extraction, SubSamplingProcess, MixingProcess, FiltrationProcess, and ChromatographicSeparationProcess class definitions.
  2. This PR introduces a Sample class definition, which is_a: MaterialEntity.
  3. The Biosample class definition used to have is_a: MaterialEntity on it. This PR replaces that with is_a: Sample. The same is true about the ProcessedSample class definition.

@eecavanna eecavanna changed the title add a 'Sample' grouping class in order to remove any_of range constraints Add a Sample grouping class in order to remove any_of range constraints Dec 4, 2024
@sierra-moxon sierra-moxon merged commit 80c3c02 into main Dec 4, 2024
3 checks passed
@turbomam turbomam deleted the grouping_classes branch December 6, 2024 15:28
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.

3 participants