Skip to content

Commit caa10eb

Browse files
committed
Merge branch 'merge-upstream-26-01-05' into improvements-from-2030-study
2 parents a71ee0a + 5ba3203 commit caa10eb

25 files changed

Lines changed: 3003 additions & 758 deletions

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
# Run ruff to lint and format
1919
- repo: https://github.com/astral-sh/ruff-pre-commit
2020
# Ruff version.
21-
rev: v0.13.3
21+
rev: v0.14.10
2222
hooks:
2323
# Run the linter.
2424
- id: ruff

envs/default_linux-64.pin.txt

Lines changed: 132 additions & 130 deletions
Large diffs are not rendered by default.

envs/default_osx-64.pin.txt

Lines changed: 182 additions & 180 deletions
Large diffs are not rendered by default.

envs/default_osx-arm64.pin.txt

Lines changed: 182 additions & 180 deletions
Large diffs are not rendered by default.

envs/default_win-64.pin.txt

Lines changed: 178 additions & 176 deletions
Large diffs are not rendered by default.

envs/environment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ dependencies:
4949
- pre-commit >=4.3.0
5050
- proj >=9.6.2
5151
- pylint >=4.0.2
52+
- pydeck >0.6
5253
- pypsa >=0.35.2
5354
- pyscipopt >=5.6.0
5455
- pytables >=3.10.2

pixi.lock

Lines changed: 2231 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ powerplantmatching = ">=0.5.15"
7878
pre-commit = ">=4.3.0"
7979
proj = ">=9.6.2"
8080
pylint = ">=4.0.2"
81+
pydeck = ">0.6" # pypsa fails to import with pydeck <0.6, lower bound was only added from pypsa 1.0.6
8182
pypsa = ">=0.35.2"
8283
pyscipopt = ">=5.6.0"
8384
pytables = ">=3.10.2"

rules/build_electricity.smk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ rule determine_availability_matrix:
268268
renewable=config_provider("renewable"),
269269
input:
270270
unpack(input_ua_md_availability_matrix),
271-
corine=ancient(f"{rules.retrieve_corine.output['tif_file']}"),
271+
corine=ancient(rules.retrieve_corine.output["tif_file"]),
272272
natura=lambda w: (
273273
f"{NATURA_DATASET["folder"]}/natura.tiff"
274274
if config_provider("renewable", w.technology, "natura")(w)

rules/common.smk

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ def config_provider(*keys, default=None):
8383
@lru_cache
8484
def load_data_versions(file_path):
8585
data_versions = pd.read_csv(
86-
file_path, dtype=str, na_filter=False, delimiter=",", comment="#"
86+
file_path,
87+
dtype=str,
88+
na_filter=False,
89+
delimiter=",",
90+
comment="#",
8791
)
8892

8993
# Turn 'tags' column from string representation of list to individual columns
@@ -119,7 +123,11 @@ def dataset_version(
119123
dataset_config = config["data"][
120124
name
121125
] # TODO as is right now, it is not compatible with config_provider
122-
data_versions = load_data_versions("data/versions.csv")
126+
127+
# To use PyPSA-Eur as a snakemake module, the path to the versions.csv file needs to be
128+
# registered relative to the current file with Snakemake:
129+
fp = workflow.source_path("../data/versions.csv")
130+
data_versions = load_data_versions(fp)
123131

124132
dataset = data_versions.loc[
125133
(data_versions["dataset"] == name)

0 commit comments

Comments
 (0)