diff options
author | Frederick Muriuki Muriithi | 2022-06-28 15:20:54 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-06-28 15:20:54 +0300 |
commit | e68c807e6598a4087d7c83510ba33c81139f5544 (patch) | |
tree | 1c8d52c686e64cf8751f51d85bf8164ff8b9653c /scripts/qc.py | |
parent | 3eef6d582245c80e274c9e135028de90788a712b (diff) | |
download | gn-uploader-e68c807e6598a4087d7c83510ba33c81139f5544.tar.gz |
Check for inconsistent columns
The number columns in each contents line should be equal to the nember
of columns in the header line.
Diffstat (limited to 'scripts/qc.py')
-rw-r--r-- | scripts/qc.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/qc.py b/scripts/qc.py index 9bad55e..de01bb7 100644 --- a/scripts/qc.py +++ b/scripts/qc.py @@ -6,8 +6,8 @@ from typing import Union, Callable import magic -from quality_control.errors import InvalidValue from quality_control.utils import make_progress_calculator +from quality_control.errors import InvalidValue, DuplicateHeading from quality_control.parsing import ( take, FileType, @@ -77,7 +77,9 @@ def print_errors(errors, verbose): for error in errors: cols = ( error.column if isinstance(error, InvalidValue) - else ", ".join(str(col) for col in error.columns)) + else (", ".join(str(col) for col in error.columns) + if isinstance(error, DuplicateHeading) + else "-")) errors_exist = True print(f"{starter}{error.line}\t{cols}\t{error.message}") |