Skip to content

Commit

Permalink
bugfix (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayabrandi authored Aug 18, 2021
1 parent 869e9e3 commit caa4cea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cg_lims/EPPs/udf/calculate/sum_missing_reads_in_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions tests/EPPs/test_sum_missing_reads_in_pool.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand All @@ -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

0 comments on commit caa4cea

Please sign in to comment.