Working on the integration of the analysis to the snakemake workflow.
This commit is contained in:
parent
744b3b0d35
commit
1e5dd77cd8
18
analysis/analysis_wrapper.sh
Executable file
18
analysis/analysis_wrapper.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ANALYSIS_TYPE=$1
|
||||||
|
OUTPUT=$2
|
||||||
|
shift; shift
|
||||||
|
|
||||||
|
ARGS=$@
|
||||||
|
INPUT=("${ARGS[@]/#/-i }")
|
||||||
|
SCRIPT=""
|
||||||
|
OPT=""
|
||||||
|
|
||||||
|
case ANALYSIS_TYPE in
|
||||||
|
"softenv")
|
||||||
|
SCRIPT="softenv_analysis.py"
|
||||||
|
OPT="-t sources-stats"
|
||||||
|
;;
|
||||||
|
|
||||||
|
python3 softenv_analysis.py -t sources-stats $INPUT -o
|
@ -83,21 +83,32 @@ rule update_blacklist:
|
|||||||
# We need to ignore lines where build is successful:
|
# We need to ignore lines where build is successful:
|
||||||
f"cat {{input}} | grep -v ',success' > {{output}} && rm -rf {BLACKLIST} && ln -s {{output}} {BLACKLIST}"
|
f"cat {{input}} | grep -v ',success' > {{output}} && rm -rf {BLACKLIST} && ln -s {{output}} {BLACKLIST}"
|
||||||
|
|
||||||
rule analysis:
|
rule all_analysis:
|
||||||
input:
|
input:
|
||||||
log = f"{PREFIX}/logs/*/*.txt",
|
expand(f"{PREFIX}/{{folder}}/{{artifact}}/{{date}}.csv",\
|
||||||
pkg = f"{PREFIX}/pkgs/*/*.csv",
|
folder=["pkgs", "build_status", "artifact_hash"],\
|
||||||
build_status = f"{PREFIX}/build_status/*/*.csv",
|
artifact=ARTIFACTS,\
|
||||||
artifact_hash = f"{PREFIX}/artifact_hash/*/*.csv",
|
date=DATE
|
||||||
softenv_analysis = "softenv_analysis.py",
|
),
|
||||||
buildstatis_analysis = "buildstatis_analysis.py",
|
|
||||||
artifact_analysis = "artifact_analysis.py",
|
|
||||||
SOFTENV_TYPES = ["sources-stats", "pkgs-changes"]
|
|
||||||
output:
|
output:
|
||||||
expand(f"{ANALYSIS_DIR}/{{folder}}/{{artifact}}/{{date}}.csv",\
|
expand(f"{ANALYSIS_DIR}/{{folder}}/{{artifact}}/{{date}}.csv",\
|
||||||
folder=["sources_stats", "pkgs_changes", "build_status", "artifact"],\
|
folder=["sources_stats", "pkgs_changes", "build_status", "artifact"],\
|
||||||
artifact=ARTIFACTS,\
|
artifact=ARTIFACTS,\
|
||||||
date=DATE
|
date=DATE
|
||||||
),
|
),
|
||||||
|
|
||||||
|
rule softenv_analysis:
|
||||||
|
input:
|
||||||
|
pkg = expand(f"-i {PREFIX}/pkgs/{{artifact}}/{{date}}.csv",
|
||||||
|
artifact=ARTIFACTS,\
|
||||||
|
date=DATE
|
||||||
|
),
|
||||||
|
output:
|
||||||
|
expand(f"{ANALYSIS_DIR}/pkgs_changes/{{artifact}}/{{date}}.csv",\
|
||||||
|
artifact=ARTIFACTS,\
|
||||||
|
date=DATE
|
||||||
|
),
|
||||||
shell:
|
shell:
|
||||||
expand("python3 {{input.softenv_analysis}} -t {{analysis_type}}")
|
expand(f"python3 {ANALYSIS_DIR}/softenv_analysis.py -t {{analysis_type}} {{input.pkg}}",\
|
||||||
|
analysis_type = ["sources-stats", "pkgs-changes"]
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user