Skip to content

Commit 82fb436

Browse files
author
Micha
authored
Merge branch 'main' into update-locked-environment
2 parents dd6f1a1 + 6aa3a2f commit 82fb436

Some content is hidden

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

50 files changed

+1351
-313
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ jobs:
5353
5454
- name: Use base env file if it was changed
5555
run: |
56-
git fetch origin master
57-
if git diff --name-only origin/master | grep '${{ env.BASE_ENV }}'; then
56+
git fetch origin ${{ github.event.repository.default_branch }}
57+
if git diff --name-only origin/${{ github.event.repository.default_branch }} | grep '${{ env.BASE_ENV }}'; then
5858
echo "Base env ${{ env.BASE_ENV }} changed. Using it instead of locked envs."
5959
echo "env_file=${{ env.BASE_ENV }}" >> $GITHUB_ENV
6060
else

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

Lines changed: 1 addition & 10 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: |
@@ -80,7 +71,7 @@ jobs:
8071
steps:
8172
- uses: actions/checkout@v4
8273
- name: Download all artifacts
83-
uses: actions/download-artifact@v4
74+
uses: actions/download-artifact@v5
8475
with:
8576
name: lockfiles
8677
path: envs/

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ test:
8282
echo "Build scenarios..."
8383
snakemake -call build_scenarios
8484
echo "Run DACH config..."
85-
snakemake -call ariadne_all --configfile=config/test/config.dach.yaml
85+
snakemake -call ariadne_all --until export_ariadne_variables --configfile=config/test/config.dach.yaml
8686
echo "All tests completed successfully."
8787

8888
unit-test:
@@ -95,6 +95,7 @@ clean-tests:
9595
snakemake -call --configfile config/test/config.myopic.yaml --delete-all-output
9696
snakemake -call make_summary_perfect --configfile config/test/config.perfect.yaml --delete-all-output
9797
snakemake -call --configfile config/test/config.scenarios.yaml -n --delete-all-output
98+
snakemake -call plot_power_networks_clustered --configfile config/test/config.tyndp.yaml --delete-all-output
9899

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ This repository contains the entire scientific project, including data sources a
1515
You need `conda` or `mamba` to run the analysis. Using conda, you can create an environment from within which you can run the analysis:
1616

1717
```
18-
conda env create -f envs/{os}-pinned.yaml
18+
conda env create -f envs/{os}.lock.yaml
1919
```
2020

2121
Where `{os}` should be replaced with your operating system, e.g. for linux the command would be:
2222

2323
```
24-
conda env create -f envs/linux-pinned.yaml
24+
conda env create -f envs/linux-64.lock.yaml
2525
```
2626

2727
## Run the analysis

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 <[email protected]>"
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ if config["foresight"] == "perfect":
8282
rule all:
8383
input:
8484
expand(RESULTS + "graphs/costs.svg", run=config["run"]["name"]),
85+
expand(resources("maps/power-network.pdf"), run=config["run"]["name"]),
8586
expand(
8687
resources("maps/power-network-s-{clusters}.pdf"),
8788
run=config["run"]["name"],
@@ -202,7 +203,7 @@ rule rulegraph:
202203
r"""
203204
# Generate DOT file using nested snakemake with the dumped final config
204205
echo "[Rule rulegraph] Using final config file: {input.config_file}"
205-
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}
206207
207208
# Generate visualizations from the DOT file
208209
if [ -s {output.dot} ]; then

config/config.de.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#run
66
run:
7-
prefix: 20250717_improve_transport_demand
7+
prefix: 20250807_merge_july
88
name:
99
# - ExPol
1010
- KN2045_Mix
@@ -313,6 +313,11 @@ sector:
313313
rural: true
314314
co2_spatial: true
315315
biomass_spatial: true
316+
ammonia: false
317+
methanol:
318+
methanol_to_power:
319+
ocgt: false
320+
biomass_to_methanol: false
316321
#relax so no infeasibility in 2050 with no land transport demand
317322
min_part_load_fischer_tropsch: 0.
318323
regional_oil_demand: true #set to true if regional CO2 constraints needed
@@ -323,6 +328,7 @@ sector:
323328
biogas_upgrading_cc: true
324329
biomass_to_liquid: true
325330
biomass_to_liquid_cc: true
331+
electrobiofuels: false
326332
cluster_heat_buses: true
327333
# calculated based on ariadne "Stock|Space Heating"
328334
# and then 2% of buildings renovated per year to reduce their demand by 80%
@@ -362,7 +368,6 @@ sector:
362368

363369
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#industry
364370
industry:
365-
ammonia: false
366371
steam_biomass_fraction: 0.4
367372
steam_hydrogen_fraction: 0.3
368373
steam_electricity_fraction: 0.3

0 commit comments

Comments
 (0)