From f220f1a79da2fbba5e6f37c8849e6596cc8c3be3 Mon Sep 17 00:00:00 2001 From: aclum Date: Thu, 29 Aug 2024 13:38:38 -0700 Subject: [PATCH 1/6] Update neon_soil_translator.py Update modeling of qc information. --- nmdc_runtime/site/translation/neon_soil_translator.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nmdc_runtime/site/translation/neon_soil_translator.py b/nmdc_runtime/site/translation/neon_soil_translator.py index d371d1c7..47f4485a 100644 --- a/nmdc_runtime/site/translation/neon_soil_translator.py +++ b/nmdc_runtime/site/translation/neon_soil_translator.py @@ -280,8 +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, ) From 28394970adba8aadaad9d8c995a675ff88f8d6db Mon Sep 17 00:00:00 2001 From: aclum Date: Thu, 29 Aug 2024 13:39:29 -0700 Subject: [PATCH 2/6] Update neon_benthic_translator.py Update to current modeling of qc information. --- nmdc_runtime/site/translation/neon_benthic_translator.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nmdc_runtime/site/translation/neon_benthic_translator.py b/nmdc_runtime/site/translation/neon_benthic_translator.py index 797d0433..426eae05 100644 --- a/nmdc_runtime/site/translation/neon_benthic_translator.py +++ b/nmdc_runtime/site/translation/neon_benthic_translator.py @@ -185,8 +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, ) From fb22079bc7ff917bfa864c4afdd2ae5f192aa52d Mon Sep 17 00:00:00 2001 From: aclum Date: Thu, 29 Aug 2024 13:41:02 -0700 Subject: [PATCH 3/6] remove skip test in test_neon_benthic_data_translator.py --- tests/test_data/test_neon_benthic_data_translator.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_data/test_neon_benthic_data_translator.py b/tests/test_data/test_neon_benthic_data_translator.py index fb286da1..6350b79b 100644 --- a/tests/test_data/test_neon_benthic_data_translator.py +++ b/tests/test_data/test_neon_benthic_data_translator.py @@ -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() From 009172f0407c2f0aa016662cdae388d6ec3004d6 Mon Sep 17 00:00:00 2001 From: aclum Date: Thu, 29 Aug 2024 13:41:42 -0700 Subject: [PATCH 4/6] remove xfail test_neon_soil_data_translator.py --- tests/test_data/test_neon_soil_data_translator.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_data/test_neon_soil_data_translator.py b/tests/test_data/test_neon_soil_data_translator.py index 251ab3af..f60144f2 100644 --- a/tests/test_data/test_neon_soil_data_translator.py +++ b/tests/test_data/test_neon_soil_data_translator.py @@ -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() From df7d3da0b7e40570fb2dfd76e83f6a02aff09137 Mon Sep 17 00:00:00 2001 From: aclum Date: Thu, 29 Aug 2024 13:49:05 -0700 Subject: [PATCH 5/6] Update neon_benthic_translator.py fix format --- nmdc_runtime/site/translation/neon_benthic_translator.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nmdc_runtime/site/translation/neon_benthic_translator.py b/nmdc_runtime/site/translation/neon_benthic_translator.py index 426eae05..65c9fdfa 100644 --- a/nmdc_runtime/site/translation/neon_benthic_translator.py +++ b/nmdc_runtime/site/translation/neon_benthic_translator.py @@ -185,8 +185,7 @@ def _translate_extraction_process( input_mass=_create_quantity_value( _get_value_or_none(extraction_row, "sampleMass"), "g" ), - qc_status=_get_value_or_none(extraction_row, "qaqcStatus") - ), + qc_status=_get_value_or_none(extraction_row, "qaqcStatus"), processing_institution=processing_institution, ) From 03726e568510a8c475060a9de2036556d079d67e Mon Sep 17 00:00:00 2001 From: aclum Date: Thu, 29 Aug 2024 13:49:27 -0700 Subject: [PATCH 6/6] Update neon_soil_translator.py fix format --- nmdc_runtime/site/translation/neon_soil_translator.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nmdc_runtime/site/translation/neon_soil_translator.py b/nmdc_runtime/site/translation/neon_soil_translator.py index 47f4485a..a634e2d3 100644 --- a/nmdc_runtime/site/translation/neon_soil_translator.py +++ b/nmdc_runtime/site/translation/neon_soil_translator.py @@ -280,8 +280,7 @@ def _translate_extraction_process( input_mass=_create_quantity_value( _get_value_or_none(extraction_row, "sampleMass"), "g" ), - qc_status=_get_value_or_none(extraction_row, "qaqcStatus") - ), + qc_status=_get_value_or_none(extraction_row, "qaqcStatus"), processing_institution=processing_institution, )