Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 20, 2024
1 parent 6b0c433 commit 8381ff3
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,15 @@ rule prepare_res_potentials:
),
output:
**{
f"{tech}_{year}_{discountrate}_potential_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_potential_s{{simpl}}_{{clusters}}.csv"
f"{tech}_{year}_{discountrate}_potential_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_potential_s{simpl}_{clusters}.csv"
for tech in config["custom_data"]["renewables"]
for year in config["scenario"]["planning_horizons"]
for discountrate in config["costs"]["discountrate"]
for simpl in config["scenario"]["simpl"]
for clusters in config["scenario"]["clusters"]
},
**{
f"{tech}_{year}_{discountrate}_installable_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_installable_s{{simpl}}_{{clusters}}.csv"
f"{tech}_{year}_{discountrate}_installable_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_installable_s{simpl}_{clusters}.csv"
for tech in config["custom_data"]["renewables"]
for year in config["scenario"]["planning_horizons"]
for discountrate in config["costs"]["discountrate"]
Expand All @@ -310,15 +310,15 @@ rule override_respot:
countries=config["countries"],
input:
**{
f"custom_res_pot_{tech}_{year}_{discountrate}_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_potential_s{{simpl}}_{{clusters}}.csv"
f"custom_res_pot_{tech}_{year}_{discountrate}_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_potential_s{simpl}_{clusters}.csv"
for tech in config["custom_data"]["renewables"]
for year in config["scenario"]["planning_horizons"]
for discountrate in config["costs"]["discountrate"]
for simpl in config["scenario"]["simpl"]
for clusters in config["scenario"]["clusters"]
},
**{
f"custom_res_ins_{tech}_{year}_{discountrate}_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_installable_s{{simpl}}_{{clusters}}.csv"
f"custom_res_ins_{tech}_{year}_{discountrate}_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_installable_s{simpl}_{clusters}.csv"
for tech in config["custom_data"]["renewables"]
for year in config["scenario"]["planning_horizons"]
for discountrate in config["costs"]["discountrate"]
Expand Down Expand Up @@ -848,6 +848,7 @@ rule build_industrial_distribution_key: #default data
script:
"scripts/build_industrial_distribution_key.py"


if config["custom_data"]["industry_demand"]:

rule copy_industry_demand:
Expand All @@ -857,7 +858,9 @@ if config["custom_data"]["industry_demand"]:
destination="resources/demand/industry_demand_{demand}_{planning_horizons}.csv",
shell:
"cp {input.source} {output.destination}"

else:

rule build_base_industry_totals: #default data
params:
base_year=config["demand_data"]["base_year"],
Expand Down Expand Up @@ -890,7 +893,9 @@ rule build_industry_demand: #default data
industrial_distribution_key="resources/demand/industrial_distribution_key_elec_s{simpl}_{clusters}_{planning_horizons}.csv",
#industrial_production_per_country_tomorrow="resources/demand/industrial_production_per_country_tomorrow_{planning_horizons}_{demand}.csv",
#industrial_production_per_country="data/industrial_production_per_country.csv",
base_industry_totals=lambda wildcards: "resources/demand/base_industry_totals_{planning_horizons}_{demand}.csv" if not config["custom_data"]["industry_demand"] else [],
base_industry_totals=lambda wildcards: "resources/demand/base_industry_totals_{planning_horizons}_{demand}.csv"
if not config["custom_data"]["industry_demand"]
else [],
industrial_database="data/industrial_database.csv",
costs=CDIR + "costs_{planning_horizons}.csv",
industry_growth_cagr="data/demand/industry_growth_cagr.csv",
Expand Down

0 comments on commit 8381ff3

Please sign in to comment.