Skip to content

Make some slots on MassSpectrometryConfiguration and ChromatographyConfiguration required and create a migrator #2465

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

Conversation

hesspnnl
Copy link
Contributor

@hesspnnl hesspnnl commented May 27, 2025

MERGE AFTER #2461

  • On MassSpectrometryConfiguration type, made slots mass_spectrometry_acquisition_strategy, resolution_categories, mass_analyzers, ionization_source, mass_spectrum_collection_modes, and polarity_mode required
  • On ChromatographyConfiguration type, made slots chromatographic_category and stationary_phase required
  • Created a migrator to validate the data
  • Tested the migrators locally against mongo db data

Closes #2457
Closes #2456

@hesspnnl hesspnnl self-assigned this May 27, 2025
@hesspnnl hesspnnl linked an issue May 27, 2025 that may be closed by this pull request
@hesspnnl hesspnnl marked this pull request as draft May 27, 2025 16:58
Copy link

github-actions bot commented May 27, 2025

PR Preview Action v1.6.1

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

Built to branch gh-pages at 2025-05-28 20:58 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@hesspnnl hesspnnl marked this pull request as ready for review May 27, 2025 18:55
@hesspnnl hesspnnl requested review from kheal, turbomam and eecavanna and removed request for kheal May 27, 2025 18:55
@kheal
Copy link
Contributor

kheal commented May 27, 2025

There are a lot of new invalid tests, I'll let @turbomam decide if we want to keep them all or cull to a couple examples.

@eecavanna
Copy link
Collaborator

I'll review this migrator later today. Thanks for implementing this!

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.

I left feedback about the part_3 migrator in PR #2461.

I left feedback about the part_4 migrator here in this PR. The migrator looks good to me. I think it is already functionally done; i.e. that it will do what it was designed to do. I left feedback about formatting (consistency of newline inclusion), changing some "AND"s to "OR"s, and a missing word (i.e. "have") in a docstring. I also left a comment about calling dict.get(key) once up front and then referencing the result as needed.

hesspnnl and others added 4 commits May 28, 2025 09:22
…migrator_from_11_7_0_to_11_8_0_part_4.py

Co-authored-by: eecavanna <[email protected]>
…migrator_from_11_7_0_to_11_8_0_part_4.py

Co-authored-by: eecavanna <[email protected]>
…migrator_from_11_7_0_to_11_8_0_part_4.py

Co-authored-by: eecavanna <[email protected]>
Copy link
Member

@turbomam turbomam left a comment

Choose a reason for hiding this comment

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

Thanks, this is good.

I see that some kinds of configurations were added to example files that were supposed to be invalid because they were lacking a configuration

If the RP actions passed (including the examples runner in the makefile) then I guess everything is technically OK, but I am a little confused.

Does my poorly worded concern make sense? I can flesh it out if necessary. The goal is for the example data files to be invalid for one and only one reason... maybe that's what you were working towards?

hesspnnl and others added 3 commits May 28, 2025 16:50
…migrator_from_11_7_0_to_11_8_0_part_3.py

Co-authored-by: eecavanna <[email protected]>
…migrator_from_11_7_0_to_11_8_0_part_3.py

Co-authored-by: eecavanna <[email protected]>
…into 2456-massspectrometryconfigurations-chromatographyconfigurationslots-required
@hesspnnl hesspnnl merged commit b901e92 into main May 29, 2025
3 checks passed
@hesspnnl hesspnnl deleted the 2456-massspectrometryconfigurations-chromatographyconfigurationslots-required branch May 29, 2025 13:25
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.

Make some slots on ChromatographyConfiguration required Make some MassSpectrometryConfiguration's slots required
4 participants