Skip to content

Commit

Permalink
input_file -> module fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brynpickering committed Jul 9, 2024
1 parent 01d6b17 commit 777edf1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ rule model:
"build/models/{resolution}/timeseries/demand/demand-shape-equals-ev.csv",
"build/models/{resolution}/timeseries/demand/plugin-profiles-ev.csv",
),
optional_input_files = lambda wildcards: expand(
f"build/models/{wildcards.resolution}/{{input_file}}",
input_file=[
optional_modules = lambda wildcards: expand(
f"build/models/{wildcards.resolution}/{{module}}",
module=[
"techs/transmission/electricity-linked-neighbours.yaml",
] + ["techs/transmission/electricity-entsoe.yaml" for i in [None] if wildcards.resolution == "national"]
)
Expand Down
6 changes: 3 additions & 3 deletions scripts/template_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from eurocalliopelib.template import parametrise_template


def construct_model(path_to_template, path_to_output, input_files, resolution, year):
input_files = sorted([update_path(file, resolution) for file in input_files])
def construct_model(path_to_template, path_to_output, modules, resolution, year):
input_files = sorted([update_path(file, resolution) for file in modules])

return parametrise_template(
path_to_template,
Expand All @@ -26,7 +26,7 @@ def update_path(path_string, resolution):
if __name__ == "__main__":
construct_model(
path_to_template=snakemake.input.template,
input_files=snakemake.input.input_files,
modules=snakemake.input.modules,
resolution=snakemake.wildcards.resolution,
year=snakemake.params.year,
path_to_output=snakemake.output[0],
Expand Down

0 comments on commit 777edf1

Please sign in to comment.