Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tcezard committed Sep 4, 2024
1 parent 1a3bd55 commit 7402876
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 44 deletions.
14 changes: 6 additions & 8 deletions eva_submission/submission_qc_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,13 @@ def check_if_accessioning_completed_successfully(self):
failed_files[file] = f"Accessioning Error : No accessioning file found for {file}"

result = "PASS" if not failed_files else "FAIL"
report = f"""
Success: {result}"""
report = f"""Success: {result}"""
if failed_files:
report += f"""
failed_files:"""
failed_files:"""
for file, value in failed_files.items():
report += f"""
{file} - {value}"""
{file} - {value}"""

return result, report

Expand Down Expand Up @@ -453,14 +452,13 @@ def check_if_variants_were_skipped_while_accessioning(self):
failed_files[file] = f"Accessioning Error : No accessioning file found for {file}"

result = "PASS" if not failed_files else "PASS with Warning (Manual Check Required)"
report = f"""
Success: {result}"""
report = f"""Success: {result}"""
if failed_files:
report += f"""
Failures:"""
Failures:"""
for file, value in failed_files.items():
report += f"""
{file} - {value}"""
{file} - {value}"""

return result, report

Expand Down
64 changes: 28 additions & 36 deletions tests/test_submission_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,16 @@ def expected_report_of_eload_101(self):
Missing files: {'test2.vcf.gz'}
---------------------------------
Accessioning job check:
pass: FAIL
failed_files:
test1.vcf.gz - Accessioning Error : No accessioning file found for test1.vcf.gz
test2.vcf.gz - Accessioning Error : No accessioning file found for test2.vcf.gz
Success: FAIL
failed_files:
test1.vcf.gz - Accessioning Error : No accessioning file found for test1.vcf.gz
test2.vcf.gz - Accessioning Error : No accessioning file found for test2.vcf.gz
----------------------------------
Variants skipped check:
Success: PASS with Warning (Manual Check Required)
Failures:
test1.vcf.gz - Accessioning Error : No accessioning file found for test1.vcf.gz
test2.vcf.gz - Accessioning Error : No accessioning file found for test2.vcf.gz
Success: PASS with Warning (Manual Check Required)
Failures:
test1.vcf.gz - Accessioning Error : No accessioning file found for test1.vcf.gz
test2.vcf.gz - Accessioning Error : No accessioning file found for test2.vcf.gz
----------------------------------
Variant load check:
Success: FAIL
Expand All @@ -191,8 +189,8 @@ def expected_report_of_eload_101(self):
Accession Import check:
Success: FAIL
Errors:
test1.vcf.gz - load_vcf error : No load_vcf log file found for test1.vcf.gz
test2.vcf.gz - load_vcf error : No load_vcf log file found for test2.vcf.gz
test1.vcf.gz - acc_import error : No acc_import log file found for test1.vcf.gz
test2.vcf.gz - acc_import error : No acc_import log file found for test2.vcf.gz
----------------------------------
Remapping Check:
N/A
Expand Down Expand Up @@ -244,17 +242,15 @@ def expected_report_of_eload_102(self):
Missing files: None
---------------------------------
Accessioning job check:
pass: FAIL
failed_files:
test1.vcf.gz - failed job/step : CREATE_SUBSNP_ACCESSION_STEP
test2.vcf.gz - Accessioning Error : No accessioning file found for test2.vcf.gz
Success: FAIL
failed_files:
test1.vcf.gz - failed job/step : CREATE_SUBSNP_ACCESSION_STEP
test2.vcf.gz - Accessioning Error : No accessioning file found for test2.vcf.gz
----------------------------------
Variants skipped check:
Success: PASS with Warning (Manual Check Required)
Failures:
test2.vcf.gz - Accessioning Error : No accessioning file found for test2.vcf.gz
Success: PASS with Warning (Manual Check Required)
Failures:
test2.vcf.gz - Accessioning Error : No accessioning file found for test2.vcf.gz
----------------------------------
Variant load check:
Success: FAIL
Expand All @@ -280,8 +276,8 @@ def expected_report_of_eload_102(self):
Accession Import check:
Success: FAIL
Errors:
test1.vcf.gz - load_vcf error : No load_vcf log file found for test1.vcf.gz
test2.vcf.gz - load_vcf error : No load_vcf log file found for test2.vcf.gz
test1.vcf.gz - acc_import failed job/step : accession-import-step
test2.vcf.gz - acc_import error : No acc_import log file found for test2.vcf.gz
----------------------------------
Remapping Check:
N/A
Expand Down Expand Up @@ -334,12 +330,10 @@ def expected_report_of_eload_103(self):
Missing files: None
---------------------------------
Accessioning job check:
pass: PASS
Success: PASS
----------------------------------
Variants skipped check:
Success: PASS
Success: PASS
----------------------------------
Variant load check:
Success: PASS
Expand Down Expand Up @@ -414,16 +408,14 @@ def expected_report_of_eload_104(self):
Missing files: None
---------------------------------
Accessioning job check:
pass: FAIL
failed_files:
test1.vcf.gz - Accessioning Error : No accessioning file found for test1.vcf.gz
Success: FAIL
failed_files:
test1.vcf.gz - Accessioning Error : No accessioning file found for test1.vcf.gz
----------------------------------
Variants skipped check:
Success: PASS with Warning (Manual Check Required)
Failures:
test1.vcf.gz - Accessioning Error : No accessioning file found for test1.vcf.gz
Success: PASS with Warning (Manual Check Required)
Failures:
test1.vcf.gz - Accessioning Error : No accessioning file found for test1.vcf.gz
----------------------------------
Variant load check:
Success: FAIL
Expand All @@ -448,7 +440,7 @@ def expected_report_of_eload_104(self):
Accession Import check:
Success: FAIL
Errors:
test1.vcf.gz - load_vcf error : No load_vcf log file found for test1.vcf.gz
test1.vcf.gz - acc_import error : No acc_import log file found for test1.vcf.gz
----------------------------------
Remapping Check:
Source assembly GCA_000003205.6:
Expand Down

0 comments on commit 7402876

Please sign in to comment.