Skip to content

Commit

Permalink
Merge pull request #627 from microbiomedata/add-funding-source
Browse files Browse the repository at this point in the history
Add funding source to `SubmissionPortalTranslator`
  • Loading branch information
JamesTessmer authored Aug 22, 2024
2 parents 8cbd966 + 8f8e92a commit c2a7802
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
2 changes: 0 additions & 2 deletions nmdc_runtime/site/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@ def translate_portal_submission_to_nmdc_schema_database(
study_category: Optional[str],
study_doi_category: Optional[str],
study_doi_provider: Optional[str],
study_funding_sources: Optional[List[str]],
study_pi_image_url: Optional[str],
biosample_extras: Optional[list[dict]],
biosample_extras_slot_mapping: Optional[list[dict]],
Expand All @@ -701,7 +700,6 @@ def id_minter(*args, **kwargs):
study_category=study_category,
study_doi_category=study_doi_category,
study_doi_provider=study_doi_provider,
study_funding_sources=study_funding_sources,
study_pi_image_url=study_pi_image_url,
biosample_extras=biosample_extras,
biosample_extras_slot_mapping=biosample_extras_slot_mapping,
Expand Down
2 changes: 0 additions & 2 deletions nmdc_runtime/site/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,6 @@ def biosample_submission_ingest():
"study_category": None,
"study_doi_category": None,
"study_doi_provider": None,
"study_funding_sources": None,
"study_pi_image_url": None,
}
},
Expand Down Expand Up @@ -578,7 +577,6 @@ def biosample_submission_ingest():
"study_category": None,
"study_doi_category": None,
"study_doi_provider": None,
"study_funding_sources": None,
"study_pi_image_url": None,
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,9 @@ def _translate_study(
description=self._get_from(
metadata_submission, ["studyForm", "description"]
),
funding_sources=self.study_funding_sources,
funding_sources=self._get_from(
metadata_submission, ["studyForm", "fundingSources"]
),
# emsl_proposal_identifier=self._get_from(
# metadata_submission, ["multiOmicsForm", "studyNumber"]
# ),
Expand Down
1 change: 0 additions & 1 deletion tests/test_data/test_submission_portal_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ def now(cls, **kwargs):
id_minter=test_minter,
study_category="research_study",
study_doi_provider="jgi",
study_funding_sources=["Some award ABC", "Another award XYZ"]
)

expected = nmdc.Database(**test_data["output"])
Expand Down
10 changes: 8 additions & 2 deletions tests/test_data/test_submission_portal_translator_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ input:
annotated. Our findings support that leaf-associated bacterial populations are
seasonally dynamic and responsive to host cues.
notes: ''
fundingSources:
- Some award ABC
- Some award XYZ
contributors:
- name: Adina Howe
orcid: 0000-0002-7705-343X
Expand Down Expand Up @@ -806,7 +809,7 @@ output:
doi_category: dataset_doi
funding_sources:
- Some award ABC
- Another award XYZ
- Some award XYZ
study_category: research_study
title: Seasonal activities of the phyllosphere microbiome of perennial crops
websites:
Expand Down Expand Up @@ -867,6 +870,9 @@ input:
roles:
- Principal Investigator
description: This is a test submission
fundingSources:
- Some award ABC
- Some award XYZ
linkOutWebpage:
- http://www.example.com/submission-test
multiOmicsForm:
Expand Down Expand Up @@ -975,7 +981,7 @@ output:
doi_category: dataset_doi
funding_sources:
- Some award ABC
- Another award XYZ
- Some award XYZ
has_credit_associations:
- applies_to_person:
orcid: 0000-0000-0000-0000
Expand Down
4 changes: 0 additions & 4 deletions tests/test_graphs/test_submission_portal_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ def test_translate_metadata_submission_to_nmdc_schema_database():
"study_category": "research_study",
"study_doi_category": "dataset_doi",
"study_doi_provider": "jgi",
"study_funding_sources": [
"funder 1",
"funder 2",
],
"study_pi_image_url": "http://www.example.com/test.png",
}
},
Expand Down

0 comments on commit c2a7802

Please sign in to comment.