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 mapping for multiple environments #741

Merged
merged 8 commits into from
Dec 6, 2024
Merged

Conversation

marySalvi
Copy link
Contributor

@marySalvi marySalvi commented Oct 29, 2024

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Replace # (issue) below with a reference to the issue that this PR addresses, of the form #\d+. If merging this PR should close the issue, use Fixes or Closes. Then delete this paragraph.

Fixes # 1367

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update I'm not sure

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration, if it is not simply make up-test && make test-run.

  • Adjusted test fakes to represent multiple environments

Configuration Details: none

Definition of Done (DoD) Checklist:

A simple checklist of necessary activities that add verifiable/demonstrable value to the product by asserting the quality of a feature, not the functionality of that feature; the latter should be stated as acceptance criteria in the issue this PR closes. Not all activities in the PR template will be applicable to each feature since the definition of done is intended to be a comprehensive checklist. Consciously decide the applicability of value-added activities on a feature-by-feature basis.

  • My code follows the style guidelines of this project (have you run black nmdc_runtime/?)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (in docs/ and in https://github.com/microbiomedata/NMDC_documentation/?)
  • I have added tests that prove my fix is effective or that my feature works, incl. considering downstream usage (e.g. https://github.com/microbiomedata/notebook_hackathons) if applicable.
  • New and existing unit and functional tests pass locally with my changes (make up-test && make test-run)

@marySalvi marySalvi force-pushed the handle-multiple-envs branch from f400616 to 43bf7cc Compare October 29, 2024 20:41
@mslarae13
Copy link

@marySalvi status update?

@marySalvi
Copy link
Contributor Author

@mslarae13 We are meeting tomorrow to debug and get a working solution. I will post an updated ETA as soon as possible.

@marySalvi marySalvi marked this pull request as draft December 4, 2024 20:26
@marySalvi marySalvi force-pushed the handle-multiple-envs branch from ab46b17 to 16115ca Compare December 5, 2024 19:47
@marySalvi marySalvi marked this pull request as ready for review December 5, 2024 19:47
PLANT_ASSOCIATED = "plant-associated"
SEDIMENT = "sediment"
SOIL = "soil"
WATER = "water"
Copy link
Collaborator

Choose a reason for hiding this comment

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

issue here related to microbiomedata/submission-schema#186

Copy link
Collaborator

@pkalita-lbl pkalita-lbl left a comment

Choose a reason for hiding this comment

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

I think a lot of this is on the right track, but it seems to be missing a few pieces related to how the JGI and EMSL tabs are handled in conjunction with the multiple environments. If you want to go over this in more detail together just let me know.

@marySalvi marySalvi force-pushed the handle-multiple-envs branch from d1409cc to 38a14c5 Compare December 6, 2024 20:05
@marySalvi marySalvi requested a review from pkalita-lbl December 6, 2024 20:11
@pkalita-lbl
Copy link
Collaborator

@marySalvi Sorry I sort of led you astray a bit with my initial feedback. After looking at this again the real key is not adding the analysis templates (the EMSL and JGI ones) into the enum, but rather to skip setting the env_package slot while traversing the keys containing that data. Then while processing an individual sample's data, the logic is to find the first (in reality only) object where env_package is set to identify the environmental data.

As to not have a bunch more back and forth on this I went ahead and expanded the test data to capture this use case and updated the translator logic.

@pkalita-lbl pkalita-lbl merged commit bfeee05 into main Dec 6, 2024
2 checks passed
@pkalita-lbl pkalita-lbl deleted the handle-multiple-envs branch December 6, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants