-
Notifications
You must be signed in to change notification settings - Fork 8
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
Move has_calibration
from workflow_execution_set
to data_generation_set
#2235
Conversation
|
@eecavanna @kheal I went ahead and just set up a partial migrator. Not sure if you want to do it this way @eecavanna, but let us know. Since @kheal has two PRs with migrations lined up (I know of this one: #2203 (comment)). After hers get merged in, I can merge main into this branch and move her migrators to the partial here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny small change.
I pulled the branch and tested the migrator, looks great.
nmdc_schema/migrators/partials/migrator_from_11_0_3_to_11_1_0/__init__.py
Outdated
Show resolved
Hide resolved
...a/migrators/partials/migrator_from_11_0_3_to_11_1_0/migrator_from_11_0_3_to_11_1_0_part_1.py
Outdated
Show resolved
Hide resolved
...a/migrators/partials/migrator_from_11_0_3_to_11_1_0/migrator_from_11_0_3_to_11_1_0_part_1.py
Outdated
Show resolved
Hide resolved
You can run the I recommend doing that for the migrator as I noticed different closing parentheses and function arguments were indented by different relative amounts. Example (closing parentheses): data_gen_doc = self.adapter.get_document_having_value_in_field(
collection_name="data_generation_set", field_name="id", value=workflow_execution_doc["was_informed_by"]
)
calibration_doc = self.adapter.get_document_having_value_in_field(
collection_name="calibration_set", field_name="calibration_object", value=has_calibration_data_obj
) |
Doing this as a partial migrator works for me — thanks for taking the lead on making that! For the partial migrator here in this PR, I'd recommend putting something more granular/specific in the _from_version = "11.0.3"
- _to_version = "11.1.0"
+ _to_version = "11.1.0.part_1" |
Woohoo! This will help resolve microbiomedata/refscan#26 |
…__init__.py Co-authored-by: eecavanna <[email protected]>
…migrator_from_11_0_3_to_11_1_0_part_1.py Thanks!! Co-authored-by: eecavanna <[email protected]>
Thanks @eecavanna I did your suggestions. The black.vercel does not work for me. I just reformatted, but I don't use a formatter because it was making a whole bunch of changes to existing code and showing in the git diffs. So I stopped using those. But I can try to activate them when I write from scratch and then deactivate moving forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The migration-related parts of this look good to me. I particularly like the thorough doctests. Thanks for addressing all my comments. I'm comfortable with this being merged in. I will run the code through black
some time in the future.
Thanks, @brynnz22 ! How did you make you decisions about moving schema elements from nmdc.yaml to workflow_execution_activity.yaml? I don't see anything wrong about it, but I would like to hear your thought process (or similar thoughts from others). Deciding how many modules we should have and what should go in each (from a thematic and technical perspective) is unfinished work in my perspective. |
This PR addresses issue https://github.com/microbiomedata/nmdc-schema/issues/2139#issuecomment-2445511119.
It moves the
has_calibration
slot from anyworkflow_exectuion
doc that has it and moves it to its correspondingdata_generation_doc
A lot of thehas_calibration
s in the workflow exectuion docs have justfalse
orFalse
. This migrator removes those entirely since the calibration does not exist.It also fixes the schema so the range of
has_calibration
is onlyCalibraitonInformation
(removesany_of
andstring
range)It also moves the
CalibrationInformation
class and slots to the nmdc.yaml file instead of the workflow_execution.yaml file.tagging @mslarae13 for FYI
PR Information
What type of PR is this? (check all applicable)
class
,slot
, orenum
slot
ismultivalued
slot
is assigned to aclass
permissible_values
of anenum
class
,slot
, orenum
mappings
of aclass
,slot
, orenum
to an ontologyenum
for future use (it is not in therange
of anyslot
)Could this schema change make it so any valid data becomes invalid?
If you answered "Yes", does this PR branch include that migrator?
Does this PR have any downstream implications?