Skip to content

Commit

Permalink
Fix checksum message check, improve checksum message, update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
RachelDuffin committed Jul 9, 2024
1 parent a52209d commit 297d638
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/ad_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
AD_LOGDIR = os.path.join(RUNFOLDERS, "automate_demultiplexing_logfiles")
MAIL_SETTINGS = MAIL_SETTINGS | { # Add test mail recipients
"pipeline_started_subj": f"{SCRIPT_MODE}. ALERT: Started pipeline for %s",
"binfx_recipient": MAIL_SETTINGS["binfx_email"],
"binfx_recipient": "[email protected]",
# Oncology email address for email alerts
"oncology_ops_email": "[email protected]",
"wes_samplename_emaillist": ["[email protected]"],
Expand Down Expand Up @@ -361,7 +361,7 @@ class DemultiplexConfig(PanelConfig):
"lane_metrics_suffix": LANE_METRICS_SUFFIX,
"cd_success": "picard.illumina.CollectIlluminaLaneMetrics done",
"demultiplex_success": DEMULTIPLEX_SUCCESS,
"checksums_already_assessed": "Checksums already assessed by AS: %s", # Written to file by AS
"checksums_assessed": "Checksums assessed by AS: %s", # Written to file by AS
"checksums_match": "Checksums match", # Success message written to md5checksum file by integrity check scripts
"checksums_do_not_match": "Checksums do not match", # Failure message written to md5sum file by integrity check scripts
"samplesheet_success": "Samplesheet check successful with no errors identified: %s",
Expand Down
Binary file modified data/demultiplex_test_files.tar.gz
100755 → 100644
Binary file not shown.
4 changes: 2 additions & 2 deletions demultiplex/demultiplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def prior_ic(self, checksums: list) -> Optional[bool]:
:return (Optional[bool]): Returns true if the checksum file has previously
been checked for the success message by the script
"""
if DemultiplexConfig.STRINGS["checksums_already_assessed"] in checksums[-1]:
if DemultiplexConfig.STRINGS["checksums_assessed"].split(':')[0] in checksums[-1]:
self.demux_rf_logger.info(
self.demux_rf_logger.log_msgs["checksumfile_checked"]
)
Expand Down Expand Up @@ -577,7 +577,7 @@ def write_checksums_assessed(self) -> None:
write_lines(
self.rf_obj.checksumfile_path,
"a",
DemultiplexConfig.STRINGS['checksums_already_assessed'] % datetime.datetime.now(),
DemultiplexConfig.STRINGS['checksums_assessed'] % datetime.datetime.now(),
)

def checksums_do_not_match_message(self, checksums: list) -> Optional[bool]:
Expand Down
2 changes: 1 addition & 1 deletion test/test_demultiplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def checksums_checked(self):
"""
return [
"Checksums match after 1 hours",
"Checksums already assessed by AS",
"Checksums assessed by AS",
]

@pytest.fixture(scope="function")
Expand Down

0 comments on commit 297d638

Please sign in to comment.