@@ -20,8 +20,7 @@ import logging
20
20
21
21
from dbetto import AttrsDict
22
22
from legendmeta import LegendMetadata
23
- from legenddataflow import CalGrouping
24
- from legenddataflow import utils
23
+ from legenddataflow import CalGrouping , execenv , utils
25
24
26
25
utils .subst_vars_in_snakemake_config (workflow , config )
27
26
config = AttrsDict (config )
@@ -38,6 +37,8 @@ time = datetime.now().strftime("%Y%m%dT%H%M%SZ")
38
37
if not Path (meta ).exists ():
39
38
LegendMetadata (meta ).checkout (config .legend_metadata_version )
40
39
40
+ metadata = LegendMetadata (meta , lazy = True )
41
+
41
42
part = CalGrouping (config , Path (det_status ) / "cal_groupings.yaml" )
42
43
43
44
@@ -80,7 +81,7 @@ onstart:
80
81
81
82
# Make sure some packages are initialized before we begin to avoid race conditions
82
83
for pkg in ["dspeed" , "lgdo" , "matplotlib" ]:
83
- shell (execenv .execenv_pyexe (config , "python" ) + f" -c 'import { pkg } '" )
84
+ shell (execenv .execenv_pyexe (config , "python" ) + " -c 'import " + pkg + " '" )
84
85
85
86
# Log parameter catalogs in validity.jsonl files
86
87
hit_par_cat_file = Path (utils .pars_path (config )) / "hit" / "validity.yaml"
@@ -123,9 +124,11 @@ onstart:
123
124
onsuccess :
124
125
from snakemake .report import auto_report
125
126
127
+
126
128
rep_dir = f"{ log_path (config )} /report-{ datetime .strftime (datetime .utcnow (), '%Y%m%dT%H%M%SZ' )} "
127
129
Path (rep_dir ).mkdir (parents = True , exist_ok = True )
128
130
# auto_report(workflow.persistence.dag, f"{rep_dir}/report.html")
131
+ auto_report (workflow .persistence .dag , report_plugin , report_settings )
129
132
130
133
with open (os .path .join (rep_dir , "dag.txt" ), "w" ) as f :
131
134
f .writelines (str (workflow .persistence .dag ))
0 commit comments