From f6f20cb0d64c1f17d2d868463682fa1c4421a5b7 Mon Sep 17 00:00:00 2001 From: antux18 Date: Mon, 19 Aug 2024 15:21:28 +0200 Subject: [PATCH] Integrated the whole analysis part to the Snakefile, but needs testing (#44). --- workflow/Snakefile | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/workflow/Snakefile b/workflow/Snakefile index 478dc15..3d17bbe 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -82,6 +82,13 @@ rule update_blacklist: # We need to ignore lines where build is successful: f"cat {{input}} | grep -v ',success' > {{output}} && rm -rf {BLACKLIST} && ln -s {{output}} {BLACKLIST}" +ANALYSIS_SCRIPTS = { + "sources_stats": f"python3 {ANALYSIS_DIR}/softenv_analysis.py -t sources-stats", + "pkgs_changes": f"python3 {ANALYSIS_DIR}/softenv_analysis.py -t pkgs-changes", + "build_status": f"python3 {ANALYSIS_DIR}/buildstatus_analysis.py", + "artifact": f"python3 {ANALYSIS_DIR}/artifact_analysis.py" +} + rule all_analysis: input: expand(f"{PREFIX}/{{folder}}/{{artifact}}/{{date}}.csv",\ @@ -95,19 +102,5 @@ rule all_analysis: artifact=ARTIFACTS,\ date=DATE ), - -rule softenv_analysis: - input: - expand(f"{PREFIX}/pkgs/{{artifact}}/{{date}}.csv", - artifact=ARTIFACTS,\ - date=DATE - ), - output: - expand(f"{ANALYSIS_DIR}/pkgs_changes/{{artifact}}/{{date}}.csv",\ - artifact=ARTIFACTS,\ - date=DATE - ), shell: - expand(f"python3 {ANALYSIS_DIR}/softenv_analysis.py -t {{analysis_type}} -i {{{{input}}}} -o {{{{output}}}}",\ - analysis_type = ["sources-stats", "pkgs-changes"] - ) + f"{{{{ANALYSIS_SCRIPTS[wildcards.folder]}}}} -i {{input}} -o {{output}}"