Skip to content

Commit 245db2f

Browse files
committed
fix tests and plotting config
1 parent 46ed854 commit 245db2f

2 files changed

Lines changed: 38 additions & 24 deletions

File tree

config/plotting.default.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ plotting:
4646
carrier_groups:
4747
electricity:
4848
- AC
49-
- low voltage
49+
##### - low voltage
5050
##### heat:
5151
##### - urban central heat
5252
##### - urban decentral heat
@@ -65,7 +65,7 @@ plotting:
6565
- gas
6666
##### - methanol
6767
##### - oil
68-
- co2 stored
68+
##### - co2 stored
6969
##### - urban central heat
7070
utilisation_rate:
7171
- solar
@@ -96,19 +96,19 @@ plotting:
9696
soc:
9797
- battery
9898
- H2 Store
99-
- co2 stored
99+
##### - co2 stored
100100
- gas
101101
##### - methanol
102-
- oil
102+
##### - oil
103103
##### - urban central water tanks
104104
balance_map:
105105
bus_carriers:
106106
- AC
107-
- co2_stored
107+
##### - co2_stored
108108
- gas
109109
- H2
110110
##### - methanol
111-
- oil
111+
##### - oil
112112
##### - urban central heat
113113
AC:
114114
cmap: Greens
@@ -256,12 +256,12 @@ plotting:
256256
balance_map_interactive:
257257
bus_carriers:
258258
- AC
259-
- co2_stored
259+
##### - co2_stored
260260
- gas
261261
- H2
262-
- methanol
263-
- oil
264-
- urban_central_heat
262+
##### - methanol
263+
##### - oil
264+
##### - urban_central_heat
265265
AC:
266266
cmap: Greens
267267
region_unit: €/MWh

pixi.toml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -139,24 +139,38 @@ tsam = "==2.3.9"
139139

140140
[feature.test.tasks]
141141

142+
##### Comment integration-test from pypsa-eur
143+
#integration-tests = """
144+
# snakemake -call solve_elec_networks --configfile config/test/config.electricity.yaml &&
145+
# snakemake -call --configfile config/test/config.overnight.yaml &&
146+
# snakemake -call --configfile config/test/config.myopic.yaml &&
147+
# snakemake -call resources/test-elec-clusters/networks/base_s_adm.nc --configfile config/test/config.clusters.yaml &&
148+
# snakemake -call --configfile config/test/config.scenarios.yaml -n &&
149+
# snakemake -call plot_power_networks_clustered --configfile config/test/config.tyndp.yaml &&
150+
# echo "All tests completed successfully."
151+
#"""
152+
##### Define integration-test for pypsa-spain
142153
integration-tests = """
143-
snakemake -call solve_elec_networks --configfile config/test/config.electricity.yaml &&
144-
snakemake -call --configfile config/test/config.overnight.yaml &&
145-
snakemake -call --configfile config/test/config.myopic.yaml &&
146-
snakemake -call resources/test-elec-clusters/networks/base_s_adm.nc --configfile config/test/config.clusters.yaml &&
147-
snakemake -call --configfile config/test/config.scenarios.yaml -n &&
148-
snakemake -call plot_power_networks_clustered --configfile config/test/config.tyndp.yaml &&
149-
echo "All tests completed successfully."
154+
snakemake -call all --configfile config/test/config_ES_test.yaml &&
155+
echo "All tests for PyPSA-Spain completed successfully."
150156
"""
157+
158+
##### Comment clean-test from pypsa-eur
159+
#clean-tests = """
160+
# snakemake -call solve_elec_networks --configfile config/test/config.electricity.yaml --delete-all-output ;
161+
# snakemake -call --configfile config/test/config.overnight.yaml --delete-all-output ;
162+
# snakemake -call --configfile config/test/config.myopic.yaml --delete-all-output ;
163+
# snakemake -call resources/test-elec-clusters/networks/base_s_adm.nc --configfile config/test/config.clusters.yaml --delete-all-output ;
164+
# snakemake -call --configfile config/test/config.scenarios.yaml -n --delete-all-output ;
165+
# snakemake -call plot_power_networks_clustered --configfile config/test/config.tyndp.yaml --delete-all-output ;
166+
# echo "All test outputs have been cleaned up."
167+
#"""
168+
##### Define clean-test for pypsa-spain
151169
clean-tests = """
152-
snakemake -call solve_elec_networks --configfile config/test/config.electricity.yaml --delete-all-output ;
153-
snakemake -call --configfile config/test/config.overnight.yaml --delete-all-output ;
154-
snakemake -call --configfile config/test/config.myopic.yaml --delete-all-output ;
155-
snakemake -call resources/test-elec-clusters/networks/base_s_adm.nc --configfile config/test/config.clusters.yaml --delete-all-output ;
156-
snakemake -call --configfile config/test/config.scenarios.yaml -n --delete-all-output ;
157-
snakemake -call plot_power_networks_clustered --configfile config/test/config.tyndp.yaml --delete-all-output ;
158-
echo "All test outputs have been cleaned up."
170+
snakemake -call all --configfile config/test/config_ES_test.yaml --delete-all-output ;
171+
echo "All test outputs for PyPSA-Spain have been cleaned up."
159172
"""
173+
160174
unit-tests = "pytest test"
161175

162176
all-tests = {depends-on = ["integration-tests", "clean-tests", "unit-tests"]}

0 commit comments

Comments
 (0)