[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-02-17 16:39:10 +00:00
parent 89d0fa24b6
commit b8d57a6566
4 changed files with 16 additions and 9 deletions

View File

@ -47,7 +47,6 @@ RESULTS = "results/" + RDIR
# RESOURCES = "resources/" # RESOURCES = "resources/"
localrules: localrules:
purge, purge,

View File

@ -16,9 +16,11 @@ rule add_existing_baseyear:
busmap_s=resources("busmap_elec_s{simpl}.csv"), busmap_s=resources("busmap_elec_s{simpl}.csv"),
busmap=resources("busmap_elec_s{simpl}_{clusters}.csv"), busmap=resources("busmap_elec_s{simpl}_{clusters}.csv"),
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"), clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
costs=lambda w: resources("costs_{}.csv".format( costs=lambda w: resources(
config_provider("scenario", "planning_horizons", 0)(w) "costs_{}.csv".format(
)), config_provider("scenario", "planning_horizons", 0)(w)
)
),
cop_soil_total=resources("cop_soil_total_elec_s{simpl}_{clusters}.nc"), cop_soil_total=resources("cop_soil_total_elec_s{simpl}_{clusters}.nc"),
cop_air_total=resources("cop_air_total_elec_s{simpl}_{clusters}.nc"), cop_air_total=resources("cop_air_total_elec_s{simpl}_{clusters}.nc"),
existing_heating_distribution=resources( existing_heating_distribution=resources(

View File

@ -14,9 +14,9 @@ rule add_existing_baseyear:
busmap_s=resources("busmap_elec_s{simpl}.csv"), busmap_s=resources("busmap_elec_s{simpl}.csv"),
busmap=resources("busmap_elec_s{simpl}_{clusters}.csv"), busmap=resources("busmap_elec_s{simpl}_{clusters}.csv"),
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"), clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
costs=resources("costs_{}.csv".format( costs=resources(
config_provider("scenario", "planning_horizons", 0) "costs_{}.csv".format(config_provider("scenario", "planning_horizons", 0))
)), ),
cop_soil_total=resources("cop_soil_total_elec_s{simpl}_{clusters}.nc"), cop_soil_total=resources("cop_soil_total_elec_s{simpl}_{clusters}.nc"),
cop_air_total=resources("cop_air_total_elec_s{simpl}_{clusters}.nc"), cop_air_total=resources("cop_air_total_elec_s{simpl}_{clusters}.nc"),
existing_heating_distribution=resources( existing_heating_distribution=resources(
@ -65,7 +65,9 @@ rule prepare_perfect_foresight:
RESULTS RESULTS
+ "prenetworks-brownfield/" + "prenetworks-brownfield/"
+ "elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_" + "elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_"
+ "{}.nc".format(str(config_provider("scenario", "planning_horizons", 0)(w))) + "{}.nc".format(
str(config_provider("scenario", "planning_horizons", 0)(w))
)
), ),
output: output:
RESULTS RESULTS

View File

@ -62,7 +62,11 @@ import logging
import numpy as np import numpy as np
import pandas as pd import pandas as pd
import pypsa import pypsa
from _helpers import configure_logging, update_config_from_wildcards, set_scenario_config from _helpers import (
configure_logging,
set_scenario_config,
update_config_from_wildcards,
)
from add_electricity import load_costs, update_transmission_costs from add_electricity import load_costs, update_transmission_costs
from pypsa.descriptors import expand_series from pypsa.descriptors import expand_series