From c203822c99fa9f08446aa238a93b0ae14e102d74 Mon Sep 17 00:00:00 2001 From: "Brandon M. Wilk" Date: Mon, 8 Jul 2024 19:40:07 -0500 Subject: [PATCH 1/2] adding testing detection function fix --- workflow/rules/common.smk | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index 3a53064..b7d7f64 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -40,16 +40,23 @@ def is_testing_mode(): "checks if testing dataset is used as input for the pipeline" query = ".test" + isTesting = False for sample in SAMPLES_CONFIG.values(): - for fpath in sample.values(): - if query in PurePath(fpath).parts: - logger.info(f"// WARNING: '{query}' present in at least one of the filepaths supplied via --sample_config. So testing mode is used.") - return True + for fvalue in sample.values(): + if isinstance(fvalue, str) and query in PurePath(fvalue).parts: + isTesting = True + else: + for fpath in fvalue: + if query in PurePath(fpath).parts: + isTesting = True + + if isTesting: + logger.info(f"// WARNING: '{query}' present in at least one of the filepaths supplied via --sample_config. So testing mode is used.") + return True return None - def get_priorQC_filepaths(sample, samples_dict): """ Returns filepaths relevant to priorQC From d685e0e4b3539c20064d2af0e9c44f738affff21 Mon Sep 17 00:00:00 2001 From: "Brandon M. Wilk" Date: Mon, 8 Jul 2024 19:47:28 -0500 Subject: [PATCH 2/2] updated changelog --- docs/Changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/Changelog.md b/docs/Changelog.md index edf8fd3..ebe8697 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -12,6 +12,10 @@ YYYY-MM-DD John Doe ``` --- +2024-07-08 Brandon Wilk + +* Makes minor bug fix for issue #95 found in the test run detection logging function + 2023-10-09 Manavalan Gajapathy - Makes minor documentation updates - updating citation info, adding JOSS badge and updating zenodo badge to use generic