Skip to content

Commit

Permalink
Add new lines
Browse files Browse the repository at this point in the history
  • Loading branch information
seallard committed Dec 14, 2023
1 parent 39894b4 commit 899af79
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cg/meta/workflow/microsalt/quality_controller/result_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ResultLogger:
@staticmethod
def log_results(sample_results: list[QualityResult], case_result: CaseQualityResult):
if case_result.passes_qc:
LOG.info("Quality control passed.")
LOG.info("Quality control passed.\n")
else:
message = get_case_fail_message(case_result)
LOG.warning(message)
Expand All @@ -21,13 +21,13 @@ def get_case_fail_message(case_result: CaseQualityResult) -> str:
fail_reasons = []

if not case_result.control_passes_qc:
fail_reasons.append("The negative control sample failed quality control.")
fail_reasons.append("The negative control sample failed quality control.\n")
if not case_result.urgent_passes_qc:
fail_reasons.append("The urgent samples failed quality control.")
fail_reasons.append("The urgent samples failed quality control.\n")
if not case_result.non_urgent_passes_qc:
fail_reasons.append("The non-urgent samples failed quality control.")
fail_reasons.append("The non-urgent samples failed quality control.\n")

fail_message = "Quality control failed."
fail_message = "Quality control failed.\n"

return fail_message + " ".join(fail_reasons)

Expand All @@ -40,7 +40,7 @@ def sample_result_message(sample_results: list[QualityResult]) -> str:
passed_count: int = len(passed_samples)
total_count = len(sample_results)

return f"Sample results: {failed_count} failed, {passed_count} passed, {total_count} total"
return f"Sample results: {failed_count} failed, {passed_count} passed, {total_count} total.\n"


def get_failed_results(results: list[QualityResult]) -> list[str]:
Expand Down

0 comments on commit 899af79

Please sign in to comment.