From caa4cea5f6abb717569497b8b77a616d4dd0fe8a Mon Sep 17 00:00:00 2001 From: mayabrandi Date: Wed, 18 Aug 2021 12:57:01 +0200 Subject: [PATCH] bugfix (#81) --- .../EPPs/udf/calculate/sum_missing_reads_in_pool.py | 4 ++-- tests/EPPs/test_sum_missing_reads_in_pool.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cg_lims/EPPs/udf/calculate/sum_missing_reads_in_pool.py b/cg_lims/EPPs/udf/calculate/sum_missing_reads_in_pool.py index b5bc5379..b5d00aa0 100644 --- a/cg_lims/EPPs/udf/calculate/sum_missing_reads_in_pool.py +++ b/cg_lims/EPPs/udf/calculate/sum_missing_reads_in_pool.py @@ -10,7 +10,7 @@ LOG = logging.getLogger(__name__) -def sum_reads_in_ppol(artifacts: list) -> Tuple[int, int]: +def sum_reads_in_pool(artifacts: list) -> Tuple[int, int]: """Summing the missing reads for all samples in one pool.""" failed_arts = 0 @@ -45,7 +45,7 @@ def missing_reads_in_pool(ctx): try: artifacts = get_artifacts(process=process, input=False) - passed_arts, failed_arts = sum_reads(artifacts=artifacts) + passed_arts, failed_arts = sum_reads_in_pool(artifacts=artifacts) message = f"Updated {passed_arts}. Ignored {failed_arts} due to missing Sample UDFs: 'Reads missing (M)'" if failed_arts: LOG.error(message) diff --git a/tests/EPPs/test_sum_missing_reads_in_pool.py b/tests/EPPs/test_sum_missing_reads_in_pool.py index b5fa3525..3a1ae31d 100644 --- a/tests/EPPs/test_sum_missing_reads_in_pool.py +++ b/tests/EPPs/test_sum_missing_reads_in_pool.py @@ -1,5 +1,5 @@ from genologics.entities import Process -from cg_lims.EPPs.udf.calculate.sum_missing_reads_in_pool import sum_reads_in_ppol +from cg_lims.EPPs.udf.calculate.sum_missing_reads_in_pool import sum_reads_in_pool from cg_lims.get.artifacts import get_artifacts from tests.conftest import server @@ -12,8 +12,8 @@ def test_sum_reads_pool(lims): process = Process(lims, id="24-196210") artifacts = get_artifacts(process=process, input=False) - # WHEN running sum_reads_in_ppol - passed_artifacts, failed_artifacts = sum_reads_in_ppol(artifacts=artifacts) + # WHEN running sum_reads_in_pool + passed_artifacts, failed_artifacts = sum_reads_in_pool(artifacts=artifacts) # THEN all pools passed and each pool udf: 'Missing reads Pool (M)' is the sum of ther sample reads. assert failed_artifacts == 0 @@ -32,8 +32,8 @@ def test_sum_reads_pool_missing_udf(lims): a_sample_in_a_pool.udf["Reads missing (M)"] = None a_sample_in_a_pool.put() - # WHEN running sum_reads_in_ppol, - passed_artifacts, failed_artifacts = sum_reads_in_ppol(artifacts=artifacts) + # WHEN running sum_reads_in_pool, + passed_artifacts, failed_artifacts = sum_reads_in_pool(artifacts=artifacts) # THEN assert one artifact failed assert failed_artifacts == 1