Skip to content

Commit 31b54bc

Browse files
authored
Merge pull request #44 from open-energy-transition/merge-upstream-15-07
Merge changes from upstream
2 parents 627a58a + 8e8ec2c commit 31b54bc

52 files changed

Lines changed: 1567 additions & 547 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/update-pinned-env.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,6 @@ jobs:
4343
for file in envs/*.lock.yml; do
4444
mv "$file" "${file%.yml}.yaml"
4545
done
46-
- name: Add SPDX headers to lock files
47-
run: |
48-
SPDX_HEADER="# SPDX-FileCopyrightText: Contributors to PyPSA-Eur <https://github.com/pypsa/pypsa-eur>\n# SPDX-License-Identifier: CC0-1.0\n"
49-
50-
# Add header to all generated lock files
51-
for file in envs/*.lock.yaml; do
52-
echo "Adding header to $file"
53-
echo -e "$SPDX_HEADER" | cat - "$file" > temp && mv temp "$file"
54-
done
5546
5647
- name: Insert environment name in lock files
5748
run: |

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
# Run ruff to lint and format
1818
- repo: https://github.com/astral-sh/ruff-pre-commit
1919
# Ruff version.
20-
rev: v0.11.8
20+
rev: v0.12.2
2121
hooks:
2222
# Run the linter.
2323
- id: ruff
@@ -44,7 +44,7 @@ repos:
4444

4545
# YAML formatting
4646
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
47-
rev: v2.14.0
47+
rev: v2.15.0
4848
hooks:
4949
- id: pretty-format-yaml
5050
exclude: (pinned\.yaml|\.lock\.yaml)$

.reuse/dep5

Lines changed: 0 additions & 40 deletions
This file was deleted.

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cff-version: 1.1.0
66
message: "If you use this package, please cite it in the following way."
77
title: "PyPSA-Eur: An open sector-coupled optimisation model of the European energy system"
88
repository: https://github.com/pypsa/pypsa-eur
9-
version: v2025.04.0
9+
version: v2025.07.0
1010
license: MIT
1111
authors:
1212
- family-names: Brown

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ test:
8484
snakemake -call make_summary_perfect --configfile config/test/config.perfect.yaml
8585
snakemake -call resources/test-elec-clusters/networks/base_s_adm.nc --configfile config/test/config.clusters.yaml
8686
snakemake -call --configfile config/test/config.scenarios.yaml -n
87+
snakemake -call plot_power_networks_clustered --configfile config/test/config.tyndp.yaml
8788
echo "All tests completed successfully."
8889

8990
unit-test:
@@ -97,6 +98,7 @@ clean-tests:
9798
snakemake -call make_summary_perfect --configfile config/test/config.perfect.yaml --delete-all-output
9899
snakemake -call resources/test-elec-clusters/networks/base_s_adm.nc --configfile config/test/config.clusters.yaml --delete-all-output
99100
snakemake -call --configfile config/test/config.scenarios.yaml -n --delete-all-output
101+
snakemake -call plot_power_networks_clustered --configfile config/test/config.tyndp.yaml --delete-all-output
100102

101103
# Removes all created files except for large cutout files (similar to fresh clone)
102104
reset:

REUSE.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version = 1
2+
SPDX-PackageName = "PyPSA-Eur"
3+
SPDX-PackageSupplier = "Tom Brown <t.brown@tu-berlin.de>"
4+
SPDX-PackageDownloadLocation = "https://github.com/pypsa/pypsa-eur"
5+
6+
[[annotations]]
7+
path = [
8+
"data/**",
9+
"doc/configtables/*",
10+
"doc/data.csv",
11+
"doc/img/*",
12+
"test/test_data/*",
13+
]
14+
SPDX-FileCopyrightText = "The PyPSA-Eur Authors"
15+
SPDX-License-Identifier = "CC-BY-4.0"
16+
17+
[[annotations]]
18+
path = [
19+
".github/**",
20+
"borg-it",
21+
"envs/*.lock.yaml",
22+
"matplotlibrc",
23+
]
24+
SPDX-FileCopyrightText = "The PyPSA-Eur Authors"
25+
SPDX-License-Identifier = "CC0-1.0"

Snakefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ from scripts._helpers import (
2020

2121
configfile: "config/config.default.yaml"
2222
configfile: "config/plotting.default.yaml"
23-
configfile: "config/config.yaml"
23+
24+
25+
if Path("config/config.yaml").exists():
26+
27+
configfile: "config/config.yaml"
2428

2529

2630
run = config["run"]
@@ -199,7 +203,7 @@ rule rulegraph:
199203
r"""
200204
# Generate DOT file using nested snakemake with the dumped final config
201205
echo "[Rule rulegraph] Using final config file: {input.config_file}"
202-
snakemake --rulegraph all --configfile {input.config_file} --quiet | sed -n "/digraph/,\$p" > {output.dot}
206+
snakemake --rulegraph --configfile {input.config_file} --quiet | sed -n "/digraph/,\$p" > {output.dot}
203207
204208
# Generate visualizations from the DOT file
205209
if [ -s {output.dot} ]; then

0 commit comments

Comments
 (0)