File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 3
3
# SPDX-License-Identifier: GPL-3.0-only
4
4
5
5
import pathlib
6
+ from shutil import rmtree
6
7
7
8
8
9
configfile : "config.yaml"
@@ -88,3 +89,24 @@ rule convert_EWG:
88
89
"environment.yaml"
89
90
script :
90
91
"scripts/convert_pdf_EWG_to_dataframe.py"
92
+
93
+
94
+ rule all :
95
+ input :
96
+ rules .compile_cost_assumptions .output ,
97
+ rules .compile_cost_assumptions_usa .output ,
98
+ default_target :True
99
+
100
+
101
+ rule purge :
102
+ run :
103
+ import builtins
104
+
105
+ do_purge = builtins .input (
106
+ "Do you really want to delete all generated outputs? [y/N] "
107
+ )
108
+ if do_purge == "y" :
109
+ rmtree ("outputs/" , ignore_errors = True )
110
+ print ("Purging generated outputs." )
111
+ else :
112
+ raise Exception (f"Input { do_purge } . Aborting purge." )
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ Upcoming Release
28
28
29
29
* Updates the documentation with compile_cost_assumptions_usa.py (https://github.com/PyPSA/technology-data/pull/186)
30
30
31
+ * Add `purge ` and `all ` rules to clean all generated outputs and regenerate them (https://github.com/PyPSA/technology-data/pull/187)
32
+
31
33
`v0.11.0 <https://github.com/PyPSA/technology-data/releases/tag/v0.11.0 >`__ (24th January 2025)
32
34
=======================================================================================
33
35
You can’t perform that action at this time.
0 commit comments