From cb3291091e0e92ba3f4da437f5dd4e43c3a04734 Mon Sep 17 00:00:00 2001 From: Bousquin Date: Fri, 2 Aug 2024 16:07:42 -0500 Subject: [PATCH] Resolved some E501 --- harmonize_wq/domains.py | 9 ++++++++- harmonize_wq/tests/test_harmonize_WQP.py | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/harmonize_wq/domains.py b/harmonize_wq/domains.py index 72e994d..647d0ad 100644 --- a/harmonize_wq/domains.py +++ b/harmonize_wq/domains.py @@ -257,7 +257,14 @@ def char_tbl_TADA(df, char): Returns ------- new_char_dict : dict - {Target.TADA.CharacteristicName: {Target.TADA.ResultSampleFractionText: [Target.TADA.ResultSampleFractionText]} + Returned dictionary follows general structure: + { + "Target.TADA.CharacteristicName": { + "Target.TADA.ResultSampleFractionText": [ + "Target.TADA.ResultSampleFractionText" + ] + } + } """ cols = [ "Target.TADA.CharacteristicName", diff --git a/harmonize_wq/tests/test_harmonize_WQP.py b/harmonize_wq/tests/test_harmonize_WQP.py index 059dbd1..f5e1a9c 100644 --- a/harmonize_wq/tests/test_harmonize_WQP.py +++ b/harmonize_wq/tests/test_harmonize_WQP.py @@ -1133,7 +1133,8 @@ def test_harmonize_fecal_coliform(): # Inspect specific result - where value missing assert str(actual.iloc[1][orig_val_col]) == "*Non-detect" # Confirm missing # Confirm expected flag - for missing value - expected_flag = 'ResultMeasureValue: "*Non-detect" result cannot be used; ResultMeasure/MeasureUnitCode: MISSING UNITS, CFU/(100ml) assumed' + expected_flag = 'ResultMeasureValue: "*Non-detect" result cannot be used; ' + expected_flag += "ResultMeasure/MeasureUnitCode: MISSING UNITS, CFU/(100ml) assumed" assert actual.iloc[1]["QA_flag"] == expected_flag # Inspect specific result - un-usable non-numeric values assert actual.iloc[75305][orig_val_col] == "Not Reported"