Skip to content

Commit

Permalink
Merge pull request #660 from microbiomedata/470-missing-attribute-qua…
Browse files Browse the repository at this point in the history
…litycontrolreport-causing-multiple-neon-tests-to-fail

470 missing attribute qualitycontrolreport causing multiple neon tests to fail
  • Loading branch information
aclum authored Aug 29, 2024
2 parents 7955875 + 03726e5 commit ac6cf8a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
4 changes: 1 addition & 3 deletions nmdc_runtime/site/translation/neon_benthic_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ def _translate_extraction_process(
input_mass=_create_quantity_value(
_get_value_or_none(extraction_row, "sampleMass"), "g"
),
quality_control_report=nmdc.QualityControlReport(
status=_get_value_or_none(extraction_row, "qaqcStatus")
),
qc_status=_get_value_or_none(extraction_row, "qaqcStatus"),
processing_institution=processing_institution,
)

Expand Down
4 changes: 1 addition & 3 deletions nmdc_runtime/site/translation/neon_soil_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,7 @@ def _translate_extraction_process(
input_mass=_create_quantity_value(
_get_value_or_none(extraction_row, "sampleMass"), "g"
),
quality_control_report=nmdc.QualityControlReport(
status=_get_value_or_none(extraction_row, "qaqcStatus")
),
qc_status=_get_value_or_none(extraction_row, "qaqcStatus"),
processing_institution=processing_institution,
)

Expand Down
1 change: 0 additions & 1 deletion tests/test_data/test_neon_benthic_data_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ def translator(self, test_minter):
id_minter=test_minter
)

@pytest.mark.xfail(reason="AttributeError: module 'nmdc_schema.nmdc' has no attribute 'QualityControlReport'")
def test_get_database(self, translator):
database = translator.get_database()

Expand Down
1 change: 0 additions & 1 deletion tests/test_data/test_neon_soil_data_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,6 @@ def test_create_timestamp_value_with_valid_args(self):
collect_date = _create_timestamp_value("2020-07-13T14:34Z")
assert collect_date.has_raw_value == "2020-07-13T14:34Z"

@pytest.mark.xfail(reason="AttributeError: module 'nmdc_schema.nmdc' has no attribute 'QualityControlReport'")
def test_get_database(self, translator):
database = translator.get_database()

Expand Down

0 comments on commit ac6cf8a

Please sign in to comment.