diff options
author | Frederick Muriuki Muriithi | 2023-11-24 14:44:50 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-11-24 14:44:50 +0300 |
commit | c213b0010c3ddc8d3215adab65bd489a9b884e30 (patch) | |
tree | dd8de4cf1e28dd5ed88d17f25f52c79c3d56237e /quality_control | |
parent | 2bf17b88bca366f9ced851a6152e034f8e94f7ac (diff) | |
download | gn-uploader-c213b0010c3ddc8d3215adab65bd489a9b884e30.tar.gz |
QC: Check for only one decimal place.
Diffstat (limited to 'quality_control')
-rw-r--r-- | quality_control/average.py | 6 | ||||
-rw-r--r-- | quality_control/standard_error.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/quality_control/average.py b/quality_control/average.py index ad732d0..95b6c4a 100644 --- a/quality_control/average.py +++ b/quality_control/average.py @@ -9,8 +9,8 @@ def invalid_value(line_number: int, column_number: int, val: str) -> Union[ """Return an `InvalidValue` object if `val` is not a valid "averages" value.""" return cell_error( - r"^([0-9]+\.[0-9]{3}|[0-9]+\.?0*)$", val, line=line_number, + r"^[0-9]+\.[0-9]{1,}$", val, line=line_number, column=column_number, value=val, message=( f"Invalid value '{val}'. " - "Expected string representing a number with exactly three " - "decimal places.")) + "Expected string representing a number with at least one decimal " + "place.")) diff --git a/quality_control/standard_error.py b/quality_control/standard_error.py index 90beb8a..a1646bc 100644 --- a/quality_control/standard_error.py +++ b/quality_control/standard_error.py @@ -13,8 +13,8 @@ def invalid_value( `None`. """ return cell_error( - r"^([0-9]+\.[0-9]{6,}|[0-9]+\.?0*)$", val, line=line_number, + r"^[0-9]+\.[0-9]{1,}$", val, line=line_number, column=column_number, value=val, message=( f"Invalid value '{val}'. " - "Expected string representing a number with at least six " - "decimal places.")) + "Expected string representing a number with at least one " + "decimal place.")) |