File tree 2 files changed +26
-0
lines changed
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ dependencies = [
63
63
[project .optional-dependencies ]
64
64
# these are needed to run the data production
65
65
runprod = [
66
+ " pygments" ,
66
67
" snakemake>=8.16" ,
67
68
]
68
69
test = [
Original file line number Diff line number Diff line change @@ -129,6 +129,31 @@ onstart:
129
129
130
130
131
131
onsuccess :
132
+ from snakemake .report import auto_report
133
+ from snakemake_interface_report_plugins .settings import ReportSettingsBase
134
+ from snakemake_interface_report_plugins .registry import ReportPluginRegistry
135
+ import asyncio
136
+
137
+ rep_dir = Path (
138
+ f"{ log_path (config )} /report-{ datetime .strftime (datetime .utcnow (), '%Y%m%dT%H%M%SZ' )} "
139
+ )
140
+ rep_dir .mkdir (parents = True , exist_ok = True )
141
+ # auto_report(workflow.persistence.dag, f"{rep_dir}/report.html")
142
+ for form in ["html" ]: # , "pdf", "tex"
143
+ report_plugin = ReportPluginRegistry ().get_plugin (form )
144
+ report_settings = report_plugin .settings_cls
145
+ report_settings .path = rep_dir / f"report.{ form } "
146
+ asyncio .run (
147
+ auto_report (workflow .persistence .dag , report_plugin , report_settings )
148
+ )
149
+
150
+ with (rep_dir / "dag.txt" ).open ("w" ) as f :
151
+ f .writelines (str (workflow .persistence .dag ))
152
+
153
+ with (rep_dir / "rulegraph.txt" ).open ("w" ) as f :
154
+ f .writelines (str (workflow .persistence .dag .rule_dot ()))
155
+
156
+ # remove .gen files
132
157
files = glob .glob ("*.gen" )
133
158
for file in files :
134
159
if os .path .isfile (file ):
You can’t perform that action at this time.
0 commit comments