Skip to content

Commit 0bbfbad

Browse files
committed
merge master
2 parents 55542c1 + 34a0b3e commit 0bbfbad

24 files changed

Lines changed: 14426 additions & 14422 deletions

.github/workflows/ci.yaml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ jobs:
2424
shell: bash -l {0}
2525

2626
steps:
27-
- uses: actions/checkout@v4
27+
- name: Checkout code
28+
uses: actions/checkout@v4
2829

2930
- name: Setup micromamba
3031
uses: mamba-org/setup-micromamba@v2
@@ -38,18 +39,26 @@ jobs:
3839

3940
- name: Run unit tests
4041
run: |
41-
python -m pytest test
42+
make unit-test
4243
43-
- name: Test snakemake workflow for compile_cost_assumptions
44+
- name: Test snakemake workflows
4445
run: |
45-
snakemake --cores all -f compile_cost_assumptions
46-
47-
- name: Test snakemake workflow for compile_cost_assumptions_usa
48-
run: |
49-
snakemake --cores all -f compile_cost_assumptions_usa
46+
make test
5047
5148
- name: Upload artifacts
5249
uses: actions/upload-artifact@v4
5350
with:
5451
name: technology-data
5552
path: outputs/
53+
54+
- name: Check for differences in generated outputs
55+
run: |-
56+
git config --global --add safe.directory $GITHUB_WORKSPACE
57+
git add outputs/
58+
if ! git diff --cached --quiet; then
59+
echo "Generated outputs differ from the branch. Please commit rerun `snakemake` and commit the changes to the `outputs/*.csv` files."
60+
git diff --cached
61+
exit 1
62+
else
63+
echo "No differences found in generated outputs."
64+
fi

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# SPDX-License-Identifier: GPL-3.0-only
44
exclude: "^LICENSES"
55

6+
ci:
7+
autoupdate_schedule: monthly
8+
69
repos:
710
- repo: https://github.com/pre-commit/pre-commit-hooks
811
rev: v5.0.0
@@ -14,7 +17,7 @@ repos:
1417
# Run ruff to lint and format
1518
- repo: https://github.com/astral-sh/ruff-pre-commit
1619
# Ruff version.
17-
rev: v0.11.2
20+
rev: v0.11.7
1821
hooks:
1922
# Run the linter.
2023
- id: ruff

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-FileCopyrightText: Contributors to technology-data <https://github.com/pypsa/technology-data>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-only
4+
5+
# coding: utf-8
6+
7+
.ONESHELL:
8+
9+
.PHONY: test unit-test
10+
11+
# Run default tests
12+
test:
13+
set -e
14+
snakemake --cores all -f compile_cost_assumptions --configfile config.yaml
15+
snakemake --cores all -f compile_cost_assumptions_usa --configfile config.yaml
16+
echo "All tests completed successfully."
17+
18+
unit-test:
19+
pytest test

config.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# SPDX-FileCopyrightText: Contributors to technology-data <https://github.com/pypsa/technology-data>
22
#
33
# SPDX-License-Identifier: GPL-3.0-only
4-
5-
version: 0.9.2
6-
74
# considered years for output data
85
years: [2020, 2025, 2030, 2035, 2040, 2045, 2050]
96

docs/release_notes.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ Release Notes
1111
Upcoming Release
1212
================
1313

14-
* Removed water-sourced heat pumps, as cost assumptions (based on higher uncertainty range in DEA tables) are a) likely overestimates and b) break pessimistic/optimistic scenarios. Reccomendation: Use excess-heat-sourced heat pump data or see DEA data on seawater-sourced heat pumps.
14+
* Removed geothermal-sourced heat pumps and fixed previously underestimated costs for geothermal heat source. Recommendation: Use excess-heat-sourced heat pump data for geothermal-sourced heat pumps (only the heat pump part of the costs!) and consult the DEA technology catalogue.
15+
16+
* Removed water-sourced heat pumps, as cost assumptions (based on higher uncertainty range in DEA tables) are a) likely overestimates and b) break pessimistic/optimistic scenarios. Recomendation: Use excess-heat-sourced heat pump data or see DEA data on seawater-sourced heat pumps.
1517

1618
.. .. warning::
1719
@@ -48,7 +50,17 @@ Upcoming Release
4850

4951
* Inflation rates input file `inputs/prc_hicp_aind__custom_9928419_spreadsheet.xlsx` reporting inflation rates for Europe and US and dating back to Jan 2024 substituted by 'Eurostat_inflation_rates.xlsx` dating back to Feb 2025 + Convert EUR data in `manual_input_usa.csv` in USD + Include inflation adjustments for USD (https://github.com/PyPSA/technology-data/pull/193)
5052

51-
* Update scenarios for US-specific eletrolyzer investment cost (https://github.com/PyPSA/technology-data/pull/194)
53+
* Update scenarios for US-specific eletrolyzer investment cost (https://github.com/PyPSA/technology-data/pull/194; https://github.com/PyPSA/technology-data/pull/201)
54+
55+
* Removed the `version` field from the `config.yaml` (https://github.com/PyPSA/technology-data/pull/197)
56+
57+
* Adds a Makefile (https://github.com/PyPSA/technology-data/pull/204)
58+
59+
* Adds rounding for the value column of the csv files produced by compile_cost_assumptions_usa (https://github.com/PyPSA/technology-data/pull/206)
60+
61+
* Updates ci.yaml such that it fails if the generated outputs are different than the ones committed (https://github.com/PyPSA/technology-data/pull/205)
62+
63+
* Include further unit tests for compile_cost_assumptions.py (https://github.com/PyPSA/technology-data/pull/210)
5264

5365
`v0.11.0 <https://github.com/PyPSA/technology-data/releases/tag/v0.11.0>`__ (24th January 2025)
5466
=======================================================================================

0 commit comments

Comments
 (0)