From b8212061fd1d42ae76674b7965620d216eff07d3 Mon Sep 17 00:00:00 2001 From: antux18 Date: Thu, 22 Aug 2024 18:21:00 +0200 Subject: [PATCH] The date of the day is now always added to the output of get_analysis_dates, because we obviously want to generate the analysis of the day, even if there are older analysis in the folder already... --- workflow/utils.smk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/workflow/utils.smk b/workflow/utils.smk index 830910e..052c4c7 100644 --- a/workflow/utils.smk +++ b/workflow/utils.smk @@ -7,8 +7,9 @@ def get_analysis_dates(directory): for file in os.listdir(directory): if not os.path.isdir(os.path.join(directory, file)): outputs.append(os.path.splitext(file)[0]) - if outputs == []: - outputs.append(datetime.datetime.now().strftime("%Y%m%d")) + today = datetime.datetime.now().strftime("%Y%m%d") + if today not in outputs: + outputs.append(today) return outputs # def find_last_blacklist(blacklist_dir_path):