Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
225 commits
Select commit Hold shift + click to select a range
ec5a93b
Allow overwriting docs URL; select correct default config in test (#2…
brynpickering Feb 20, 2026
a1b452f
Link release badge to documentation (#2089)
lindnemi Feb 20, 2026
7b97305
fix: don't mutate config in cluster_network (#2091)
lkstrp Feb 24, 2026
e250075
build: use /workspace as dev-env container workdir (#2095)
lkstrp Feb 24, 2026
abb2068
fix: lower the lower bound for power grouping years (#2097)
tgilon Feb 24, 2026
90b464d
chore: remove duplicated OCGT in test config files (#2094)
tgilon Feb 24, 2026
025c72f
chore: remove duplicated OCGT in test config files (#2094)
tgilon Feb 24, 2026
18f8c81
build: install pixi env persistent with auto-symlink entrypoint (#2098)
lkstrp Feb 24, 2026
b012517
refactor: use scripts path provider consistently (#2093)
tgilon Feb 25, 2026
4a3906e
feat: setup pypsa-bot github app (#2099)
lkstrp Feb 25, 2026
34204dd
fix: validator config (#2102)
lkstrp Feb 26, 2026
5f62639
Update industry reference year to 2023 (#2103)
lindnemi Feb 27, 2026
ad10771
[github-actions.ci] Update locked envs (#2110)
github-actions[bot] Mar 2, 2026
21bc4fa
chore(deps): bump actions/upload-artifact in the github-actions group…
dependabot[bot] Mar 2, 2026
4fe739d
chore(deps): bump docker/login-action in the github-actions group (#2…
dependabot[bot] Mar 6, 2026
40c8954
Update installation.rst (#2116)
jack-gregory Mar 6, 2026
4d83a9b
chore(deps): bump dorny/paths-filter in the github-actions group (#2119)
dependabot[bot] Mar 16, 2026
960ff53
doc: update the PR template (#2118)
tgilon Mar 16, 2026
3f76942
Update solve_network.py (#2107)
toniseibold Mar 16, 2026
f85d295
[github-actions.ci] Update locked envs (#2120)
github-actions[bot] Mar 16, 2026
db2e5a0
chore(deps): bump actions/create-github-app-token (#2122)
dependabot[bot] Mar 18, 2026
7ab303c
feat: improve load shedding with carrier specific options and load si…
daniel-rdt Mar 18, 2026
25f8ee4
ci: validation runs via pypsa-app (#2123)
lkstrp Mar 19, 2026
c5b534d
test: trusted user (#2125)
daniel-rdt Mar 23, 2026
192857b
fix: clamp s/p_nom_max in brownfield to prevent floating-point infeas…
thogin Mar 25, 2026
e8b2730
ci: exclude packages newer than 7 days in lockfile update workflow (#…
lkstrp Mar 30, 2026
e2620cf
fix: remove Dask client.shutdown() in build_renewable_profiles (#2131)
thogin Mar 30, 2026
cb9ebde
chore(deps): bump prefix-dev/setup-pixi in the github-actions group (…
dependabot[bot] Apr 1, 2026
c8fd89c
perf: use chunks="auto" in a single thread (#2137)
coroa Apr 8, 2026
22c92a8
[pre-commit.ci] pre-commit autoupdate (#2134)
pre-commit-ci[bot] Apr 13, 2026
abea573
fix: remove asynchronous model for distributed client (#2149)
coroa Apr 14, 2026
f5ec6e6
fix: blacklist atlite 0.5.0 (#2150)
coroa Apr 14, 2026
d03edca
paste scenarios file from last report
lindnemi Apr 15, 2026
0ce157c
remove old scenarios
lindnemi Apr 15, 2026
4587e16
oriente towards new scenario definitions
lindnemi Apr 15, 2026
91e3371
define new scenario and get it running
lindnemi Apr 15, 2026
227d3a6
rename
lindnemi Apr 15, 2026
f6d5fee
[github-actions.ci] Update locked envs (#2133)
github-actions[bot] Apr 16, 2026
e44b3f3
avoid accidental mutations of input data
lindnemi Apr 20, 2026
617b410
update to new naming
lindnemi Apr 20, 2026
0b67d1c
clean-up scenarios automated
lindnemi Apr 20, 2026
5e77f75
define a 85 percent iin 2040 scenario
lindnemi Apr 20, 2026
918debe
feat: improve config validator for scenario management (#2155)
daniel-rdt Apr 23, 2026
fda902c
Merge branch 'main' into scenarios-2026
lindnemi Apr 27, 2026
afcec04
Heuristically split existing solar capacities 50:50 between rootop an…
lindnemi Apr 28, 2026
401b07e
take the improved defaults from config
lindnemi Apr 28, 2026
3be745a
update szenario config
lindnemi Apr 29, 2026
c6c30a7
adm clustering with post discretization
lindnemi Apr 29, 2026
ea07410
Merge remote-tracking branch 'upstream/master' into merge-master-apri…
lindnemi Apr 29, 2026
2c55375
update lockfile
lindnemi Apr 29, 2026
51dece2
fix pydantic errors
lindnemi Apr 29, 2026
91bc024
Merge branch 'merge-master-april-26' into scenarios-2026
lindnemi Apr 29, 2026
025214a
revert back to focus weight clusters
lindnemi Apr 30, 2026
9053558
more generous line threshold during post discretization
lindnemi Apr 30, 2026
79d7f73
Set IISMethod for Gurobi to 1 (#2158)
euronion May 2, 2026
d5855f5
[github-actions.ci] Update locked envs (#2159)
github-actions[bot] May 4, 2026
6346611
Fix: Re-introduce capital_cost for non-bicharging stores (#2157)
aodenweller May 4, 2026
23c2fac
fix/scale vom by efficiency when missing (#2154)
gianvicolux May 4, 2026
59a1352
onwind & offwind:
lindnemi May 11, 2026
ee262f8
adjust onwind progression
lindnemi May 12, 2026
a0c325d
remove solar_correction factors (which were adjusted to wy 2019 not 2…
lindnemi May 12, 2026
5ce2bfe
2035 EU co2 target oriented towards upper range of NDC
lindnemi May 12, 2026
bca91ea
apply 0.7 as discount rate for decentral assets as well
lindnemi May 12, 2026
94b0657
add grid reinforcement costs to solar rooftop as well
lindnemi May 12, 2026
9d601e3
new prefix
lindnemi May 12, 2026
2efb929
losses for retrotfitted H2 pipelines
lindnemi May 12, 2026
f368341
remove grid reinforcement costs again for solar rooftop
lindnemi May 12, 2026
25f47d4
Update pixi to use relative exclude-newer (#2163)
brynpickering May 13, 2026
d23d831
further downscale wind
lindnemi May 13, 2026
666fdf1
fix: URL for SCIGRID gas 1.1.2. archive on data.pypsa.org (#2165)
bobbyxng May 15, 2026
dda284e
[github-actions.ci] Update locked envs (#2167)
github-actions[bot] May 18, 2026
fa6699b
chore: fix formatting in docstring (#2172)
mgrabovsky May 19, 2026
0a56f95
Fix: activate missing losses for "H2 pipeline retrofitted" links (#2174)
lindnemi May 20, 2026
0e04bea
use a capacity limit to limit existing solar hsat in DE
lindnemi May 20, 2026
a0419ab
use a budget for consumption of decentral heat pumps
lindnemi May 20, 2026
5ee6dde
do not use UBA data for 2025, but only ariadne data
lindnemi May 20, 2026
4436c07
fix missing efficiency when overwriting FE demand for EVs
lindnemi May 20, 2026
c4cc57b
bump prefix
lindnemi May 20, 2026
889924e
2023 data is much closer to 2025, so the industry progression should …
lindnemi May 20, 2026
396305b
HVC primary fraction was inconsistent with pypsa-eur, causing slight …
lindnemi May 20, 2026
2e6d5f1
scale electricity load towards 2025 AGEB values
lindnemi May 20, 2026
98dbdc3
Agents/fix availability matrix plotting (#2173)
euronion May 21, 2026
7643299
[github-actions.ci] Update locked envs (#2176)
github-actions[bot] May 21, 2026
244f071
feat: add index name to cluster weights (#2185)
FabianHofmann Jun 3, 2026
fcb0850
docs: rename .rst files to .md
lkstrp May 7, 2026
f750d66
docs: migrate to markdown/ mkdocs/ material
lkstrp Jun 4, 2026
d4f9322
chore(deps): bump prefix-dev/setup-pixi (#2177)
dependabot[bot] Jun 5, 2026
ee729fe
Feat: SBOM vulnerability scan (#2164)
brynpickering Jun 5, 2026
2df4277
[pypsa-bot] run `sync-locks`
pypsa[bot] Jun 5, 2026
e6dd6de
chore(deps): bump the github-actions group with 2 updates (#2188)
dependabot[bot] Jun 8, 2026
926d50f
update mock_snakemake arguments
lindnemi Jun 8, 2026
3c91f3c
improve naming
lindnemi Jun 8, 2026
8208868
Fix DC junctions in simplify_network (#2147)
bobbyxng Jun 8, 2026
de97851
fix: check if array empty
lindnemi Jun 9, 2026
aa35a45
roll back and pin powerplantmatching to 0.6.1
lindnemi Jun 9, 2026
cf2ef77
docs: arrange pages in tabs (#2190)
fneum Jun 9, 2026
e985fae
fine-tuning wind config
lindnemi Jun 9, 2026
651df8f
tighten co2 budget by two percent to account for LULUCF
lindnemi Jun 9, 2026
920afca
make build_ambient_ait_temp script thread-safe
FabianHofmann Jun 10, 2026
86f0e49
Revert "make build_ambient_ait_temp script thread-safe" (#2196)
FabianHofmann Jun 10, 2026
75a73ca
docs: generate config tables from schema (#2193)
lkstrp Jun 10, 2026
fb78824
less ambitious lower limits for wind capacity
lindnemi Jun 10, 2026
f2505b3
still recalibrating wind FLH
lindnemi Jun 11, 2026
6830ed6
account conncetion investment separately
lindnemi Jun 11, 2026
335818e
account biomethane
lindnemi Jun 11, 2026
e27ed78
correct for excess elec demand in industry in 2025
lindnemi Jun 11, 2026
a989be2
higher costs for offshore wind from ISE
lindnemi Jun 12, 2026
d922eaa
prefix
lindnemi Jun 12, 2026
ca2a493
limit to pypsa < 1.2 (#2201)
fneum Jun 12, 2026
1bee705
fix cost csvs
lindnemi Jun 13, 2026
613dcc8
fix: activate electrolysis minimum cap
lindnemi Jun 15, 2026
70b2955
Account for non-CO2 GHG and Land Sink in EU co2_budget
lindnemi Jun 15, 2026
43ee51f
fix: rename nice_names as well when clustering heat buses
lindnemi Jun 15, 2026
a4d522c
fix: permissions for lockfile update action (#2205)
lkstrp Jun 17, 2026
1f8d4a5
fix: diff view for SARIF report (#2208)
lkstrp Jun 17, 2026
f124355
fix: fix typo in rolling_horizon config of solve_network (#2213)
tgilon Jun 19, 2026
1363071
fix: fix TYNDP typos (#2214)
tgilon Jun 23, 2026
a235499
Fix: correctly rename nice_names when clustering heat buses (#2203)
lindnemi Jun 23, 2026
12610b3
fix: keep unset p_set as NaN in cluster_heat_buses aggregation (#2202)
lkstrp Jun 23, 2026
9ec7b65
doc: disable root toc entry (#2216)
tgilon Jun 23, 2026
89b5250
reduce space with relative factor for 2013 -> 2019/2024
lindnemi Jun 25, 2026
12bde77
all required ref scenarios are now available
lindnemi Jun 25, 2026
cc64b69
improve computation of EU co2 budget
lindnemi Jun 26, 2026
cb11499
Make `default_target` configurable (#2218)
brynpickering Jun 28, 2026
7537e68
add AI contribution guidelines (#2215)
fneum Jun 28, 2026
d8ac20b
don't remove DC buses in sector network (#2199)
martacki Jun 28, 2026
2550d9c
fix: resolve plotting crashes due to missing tech colors (#2211)
stan-buren Jun 28, 2026
76836f7
add highs-hipo solver settings set (#2180)
fneum Jun 28, 2026
8e2068f
make build_ambient_ait_temp script thread-safe (#2197)
FabianHofmann Jun 28, 2026
e39177f
chore(deps): bump the github-actions group across 1 directory with 2 …
dependabot[bot] Jun 28, 2026
b9a248c
revert #2201 PyPSA version limit (#2204)
fneum Jun 28, 2026
e35dcc3
chore(deps): bump prefix-dev/setup-pixi in the github-actions group (…
dependabot[bot] Jun 30, 2026
9423f94
Allow data version CSV / YAML file(s) to be specified in the config (…
brynpickering Jun 30, 2026
ebd0cbe
Fix future warnings (#2220)
lindnemi Jul 4, 2026
47527a1
consistency: net biomass imports always positive
lindnemi Jul 7, 2026
91f0e33
improve consdtraint pathways for Elec and H2 scenarios
lindnemi Jul 7, 2026
5ae6b6a
define a plausible trajectory for hydrogen ramp up in H2 scenario
lindnemi Jul 8, 2026
f96b671
imrpove some exports
lindnemi Jul 8, 2026
d1672f9
fix: add missing regular expression anchor with re.fullmatch (#2225)
daniel-rdt Jul 9, 2026
8bedebd
introduce lignite and coal limits, harmonize production limits constr…
lindnemi Jul 13, 2026
32b6048
add biogas CHP; partially re-align add_existing_baseyear with upstream
lindnemi Jul 16, 2026
d8c68d0
eliminate redundancies with base scenario
lindnemi Jul 16, 2026
1b2503d
deactivate ban on new gas boilers
lindnemi Jul 16, 2026
d4f2965
improve scenario definition and correct keys
lindnemi Jul 17, 2026
ad54878
account biomethan and biogas separately
lindnemi Jul 17, 2026
308c739
chore: pin linopy 0.8.0 and override exclude-newer for pypsa/linopy/a…
FabianHofmann Jul 21, 2026
4d25fe3
add biogas CHP
lindnemi Jul 23, 2026
f8f8a2a
increase sequestration potential in Elec_plus (according to Szenarien…
lindnemi Jul 23, 2026
18fc1ca
Fix Ultranet (TYNDP 254) to end in Philippsburg (#2236)
hd1ex Jul 27, 2026
e9a1fb5
fix: add retries to WDPA/WDPA-marine download rules (#2238)
mvanhorn Jul 27, 2026
7c35b05
fix: change linting and formatting documentation to correctly show ru…
w-tusche Jul 27, 2026
85c9736
fix: define inflow_t before branch so it is always assigned (#2224)
daniel-rdt Jul 27, 2026
0cbacfc
doc: Add FAQ section for certificate errors (#2228)
euronion Jul 27, 2026
1bd63cd
chore: bump python to 3.12 (#2235)
tgilon Jul 27, 2026
b02b411
docs (BEV transport): Document consideration for deep discharge prote…
euronion Jul 27, 2026
e2c7e6e
[pre-commit.ci] pre-commit autoupdate (#2223)
pre-commit-ci[bot] Jul 28, 2026
1fbc646
Add spatial argument in `prepare-sector-networks.py`. Add release not…
w-tusche Jul 28, 2026
cf71d13
fix: keep backward fill inside country groups in fill_missing_years (…
pworschischek-aggmag Jul 29, 2026
3de1d18
fix: read population weight from correct config key in build_electric…
pworschischek-aggmag Jul 29, 2026
0625d97
chore: drop grpcio pin < 1.78 and pin python < 3.14 (#2244)
tgilon Jul 30, 2026
21c000d
fix: docker image push (#2247)
lkstrp Jul 30, 2026
3fc2968
ci: fix security scan checks on PR runs (#2246)
lkstrp Jul 30, 2026
f112fd4
fix: docker image push concurrency (#2249)
lkstrp Jul 30, 2026
62a821f
fix: loose and sync doc feature version pins (#2253)
coroa Aug 3, 2026
74b9f46
more biomass in Elek+
lindnemi Aug 3, 2026
a57b5e7
scale existing gas capa
lindnemi Aug 3, 2026
2d69bbe
biogas must run
lindnemi Aug 3, 2026
fa6b223
more carriers for eleba plot
lindnemi Aug 3, 2026
3ccf0a9
add a basic exporter for electricity timeseries
lindnemi Aug 4, 2026
ea69344
protoype for exporting NUTS runs regionally
lindnemi Aug 4, 2026
7b6b057
define scenario without transmission expansion
lindnemi Aug 5, 2026
3c2137a
plot 2025 and 2030 as well
lindnemi Aug 7, 2026
9f521a4
chore(deps): bump prefix-dev/pixi in /docker/dev-env (#2258)
dependabot[bot] Aug 10, 2026
9c50b67
use historical transport data for 2025
lindnemi Aug 10, 2026
c46edcd
reduce GCS potential
lindnemi Aug 10, 2026
8888f10
constraint allowable solid biomass in building heating to roughly tod…
lindnemi Aug 10, 2026
ea210c1
typo
lindnemi Aug 10, 2026
27d0944
use UBA data for 2030 transport
lindnemi Aug 10, 2026
0f843d7
more robust constraint building
lindnemi Aug 11, 2026
cac2a33
chore(deps): bump prefix-dev/setup-pixi in the github-actions group (…
dependabot[bot] Aug 11, 2026
b996c07
only scale DE elec load, instead of all of EU
lindnemi Aug 11, 2026
cd966d8
slightly smaller 2025 co2 budget
lindnemi Aug 11, 2026
efd9268
slow down district heat progression, because 2025 model results alrea…
lindnemi Aug 11, 2026
c5c8c0a
allow less elec imports in 2025, because weather 2012 allowed for mo…
lindnemi Aug 11, 2026
d2a2454
Restrict nuclear capacity factors to 0.9
lindnemi Aug 11, 2026
f8bc0b8
fine_tuning
lindnemi Aug 11, 2026
1194dc7
fix: Silent network optimization failure (#2256)
pkroening Aug 11, 2026
f0812f2
chore: bump to pandas v3 (#2260)
lkstrp Aug 12, 2026
38ec12b
only scale DE heat load, not EU
lindnemi Aug 12, 2026
73f635e
increment prefix
lindnemi Aug 12, 2026
9ca34c1
no retrofit in CurPol
lindnemi Aug 12, 2026
f05e20c
ci: fix false positives in PR security gate (#2261)
lkstrp Aug 12, 2026
d72eda9
Docs: temporal clustering (continues #2160) (#2264)
fneum Aug 12, 2026
0fc4c78
Fix estimation for sequestration potentials (#2086)
toniseibold Aug 12, 2026
46d651d
fix operational reserve constraints (#2178)
fneum Aug 12, 2026
1766f53
split build_energy_totals rule into energy and co2 (#2170)
fneum Aug 12, 2026
2963fd1
split build_shapes rule into offshore, nuts3, country/europe rules (#…
fneum Aug 12, 2026
c7fbf92
compatibility with tsam v4.0 (#2263)
fneum Aug 12, 2026
4824241
fix: handle corine=false in determine_availability_matrix_MD_UA (#2265)
fneum Aug 12, 2026
81bcb35
improving Carbon Manangement Modeling (#2161)
toniseibold Aug 12, 2026
d155422
fix: tsam version compability (#2266)
pkroening Aug 14, 2026
dbcacef
Initial draft architecture for FAQ/Troubleshooting. (#1939)
bobbyxng Aug 14, 2026
6d34ba0
[github-actions.ci] Update locked envs (#2268)
github-actions[bot] Aug 17, 2026
8119040
chore(deps): bump prefix-dev/pixi in /docker/dev-env (#2267)
dependabot[bot] Aug 17, 2026
aa31b9f
chore(deps): bump dawidd6/action-download-artifact (#2270)
dependabot[bot] Aug 19, 2026
ee1d49a
prepare release v2026.08.0 (#2271)
fneum Aug 19, 2026
dcba44e
fix: unbalanced parentheses in v2026.08.0 release notes (#2272)
fneum Aug 19, 2026
a5408e9
[github-actions.ci] prepare release v2026.08.0
fneum Aug 19, 2026
16ed084
fix(typo): log file extension (#2275)
pkroening Aug 21, 2026
e289dea
deactivate early transmission expansion
lindnemi Aug 21, 2026
ac0a875
minor
lindnemi Aug 21, 2026
ca27675
add some Carbon Management variables to exporter
lindnemi Aug 21, 2026
11f358a
Merge remote-tracking branch 'upstream/master' into eur-master-to-sce…
lindnemi Aug 21, 2026
8a1782c
fix: partial assignment causes pandas to drop index.name (only >=v3.0…
lindnemi Aug 25, 2026
321f707
increment versiond and improve pixi env
lindnemi Aug 25, 2026
2b3bb6e
fix netCDF unit conversion error
lindnemi Aug 25, 2026
3784e25
Merge branch 'main' into scenarios-2026
lindnemi Aug 27, 2026
b238bd8
do not allow extension of GT in 2025
lindnemi Aug 28, 2026
1e16904
increment prefix
lindnemi Aug 28, 2026
cdddbcd
fix: limit on biomass boiler usage was not correctly applied
lindnemi Aug 31, 2026
cedc52f
improve DE UBA THG trajectory
lindnemi Aug 31, 2026
c06c206
fix heat pump constraint
lindnemi Sep 3, 2026
1fbc18f
fix: don't skip later decentral heat constraints
lindnemi Sep 3, 2026
1f5ed07
increment prefix
lindnemi Sep 3, 2026
e89e03d
update cost assumption on decentreal heating technologies based on BW…
lindnemi Sep 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ body:
Thanks for taking the time to fill out this bug report!
Please do not post usage questions here. Ask them on the [PyPSA Discord server](https://discord.gg/AnuJBk23FU).

Please write this issue description yourself. Any potentially verbose AI-generated content should be marked.

- type: checkboxes
id: checks
attributes:
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ assignees: ''

<!-- Please do not post usage questions here. Ask them on the PyPSA Discord server: https://discord.gg/AnuJBk23FU -->

<!-- Please write this issue description yourself. Any potentially verbose AI-generated content should be marked.-->

## Describe the feature you'd like to see

*Please give a clear and concise description and provide context why the feature would be useful.*
Expand Down
5 changes: 5 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ updates:
github-actions:
patterns:
- '*'
- package-ecosystem: docker
directories:
- /**/*
schedule:
interval: weekly
21 changes: 15 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
Before asking for a review for this PR make sure to complete the following checklist:

- [ ] Workflow with target rule `ariadne_all` completes without errors
- [ ] The logic of `export_ariadne_variables` has been adapted to the changes
- [ ] One or several figures that validate the changes in the PR have been posted as a comment
- [ ] A brief description of the changes has been added to `Changelog.md`
- [ ] The latest `main` has been merged into the PR
- [ ] The config has a new prefix of the format `YYYYMMDDdescriptive_title`
## Changes proposed in this Pull Request


## Checklist

**Required:**
- [ ] Changes are tested locally and behave as expected.
- [ ] Code and workflow changes are documented.
- [ ] A brief description of the changes has been added to `Changelog.md`.
- [ ] The description is human-written and any AI-generated content is marked.

**If applicable:**
- [ ] Changes in configuration options are reflected in `scripts/lib/validation`.
- [ ] For new data sources or versions, [these instructions](https://pypsa-eur.readthedocs.io/en/latest/data_sources.html) have been followed.
- [ ] New rules are documented in the appropriate `doc/*.md` files.
30 changes: 30 additions & 0 deletions .github/pypsa-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
tasks:
sync-locks:
triggers:
- "pixi.toml"
- "pixi.lock"
stage:
- "pixi.lock"
- "envs/"

generate-config:
triggers:
- "scripts/lib/validation/config/**"
stage:
- "config/"
- "doc/"
- "*.yaml"
- "*.yml"

app:
trusted_users:
- daniel-rdt
runs:
- name: "config.validator.yaml"
configfile: "config/test/config.validator.yaml"
triggers: [main, pr]
cache:
key: "validator-{YYYY}-{MM}"
dirs: ["data"]
import_networks:
- "results/validation/networks/base_s_50___2050.nc"
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/push-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- master
workflow_dispatch:

# retagging must wait for a previous build to finish pushing
concurrency:
group: push-images

env:
IMAGE_NAME: pypsa/eur-dev-env

Expand All @@ -14,13 +18,13 @@ jobs:
name: dev-env
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0

- name: 'Get last commit that changed pixi env'
- name: 'Get last commit that changed pixi env or Dockerfile'
run: |
hash_last_changed=$(git log -1 --pretty=format:%H -- pixi.toml pixi.lock)
hash_last_changed=$(git log -1 --pretty=format:%H -- pixi.toml pixi.lock docker/dev-env/Dockerfile)
echo "hash_last_changed=$hash_last_changed" >> $GITHUB_ENV

- name: 'Login to GitHub Container Registry'
Expand All @@ -43,7 +47,7 @@ jobs:
fi

- name: 'Add SHA tag to existing image' # when rebuild is not needed
if: env.hash_last_changed != github.sha
if: env.hash_last_changed != github.sha && github.event_name != 'workflow_dispatch'
run: |-
docker pull ghcr.io/${{ env.IMAGE_NAME }}:${{ env.hash_last_changed }}
docker tag ghcr.io/${{ env.IMAGE_NAME }}:${{ env.hash_last_changed }} ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
outputs:
prepared: ${{ steps.validate.outputs.prepared }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Validate commit message
id: validate
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
app-id: ${{ vars.PYPSA_BOT_ID }}
private-key: ${{ secrets.PYPSA_BOT_PRIVATE_KEY }}

- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0

Expand All @@ -56,16 +56,16 @@ jobs:
echo "Branch found: $branch"
echo "BRANCH_NAME=$branch" >> $GITHUB_ENV

- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0
ref: ${{ env.BRANCH_NAME }}
token: ${{ steps.generate-token.outputs.token }}

- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.5
uses: prefix-dev/setup-pixi@v0.10.1
with:
pixi-version: v0.59.0
pixi-version: v0.68.1
cache: true
# Do not cache in branches
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
Expand Down
129 changes: 129 additions & 0 deletions .github/workflows/security-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: Security scan
on:
push:
branches: [master]
paths: [pixi.lock]
# No path filter, a required check must report on every PR
pull_request:
branches: [master]
schedule:
- cron: "0 6 * * *"
workflow_dispatch:

jobs:
changes:
name: Detect pixi.lock changes
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
outputs:
pixi: ${{ steps.diff.outputs.pixi }}
steps:
- id: diff
env:
GH_TOKEN: ${{ github.token }}
run: |
files=$(gh api "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" --paginate --jq '.[].filename')
grep -qxF pixi.lock <<< "$files" && pixi=true || pixi=false
echo "pixi=$pixi" >> "$GITHUB_OUTPUT"

scan:
name: SBOM and vulnerability scan
needs: changes
# Skip only when pixi.lock is confirmed unchanged
if: ${{ !cancelled() && !(needs.changes.result == 'success' && needs.changes.outputs.pixi == 'false') }}
runs-on: ubuntu-latest
permissions:
security-events: write
contents: write # required by anchore/sbom-action dependency-snapshot upload
actions: read # required by dawidd6/action-download-artifact on fork PRs
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v7
- uses: prefix-dev/setup-pixi@v0.10.1
with:
pixi-version: v0.68.1

- name: Generate SBOM
uses: anchore/sbom-action@v0.24.0
with:
path: ".pixi/envs/default"
output-file: sbom.spdx.json
dependency-snapshot: ${{ github.ref == 'refs/heads/master' }}
upload-artifact: false # uploaded explicitly below, master only

- name: Vulnerability Scan
id: scan
uses: anchore/scan-action@v7.4.0
env:
SBOM: sbom.spdx.json
with: &scan_settings
sbom: ${{ env.SBOM }}
fail-build: false
severity-cutoff: high
add-cpes-if-none: true
by-cve: true
output-format: sarif

# Set uri=pixi.lock for a readable location, and fingerprint each alert by
# CVE id so code scanning matches against the master baseline by CVE, not line.
- name: Normalize SARIF (pixi.lock location + CVE fingerprint)
run: |
jq '.runs[].results[] |= (
.locations[].physicalLocation.artifactLocation.uri = "pixi.lock"
| .partialFingerprints = {"grypeCve/v1": .ruleId}
)' "${{ steps.scan.outputs.sarif }}" > normalized.sarif
mv normalized.sarif "${{ steps.scan.outputs.sarif }}"

- name: Upload SARIF
if: github.ref == 'refs/heads/master'
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: ${{ steps.scan.outputs.sarif }}
category: pixi-vuln-scan

# Baseline for the PR CVE diff. PR runs rescan it with their own vuln DB.
- name: Upload SBOM as artifact
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v7
with:
name: master-sbom
path: sbom.spdx.json
retention-days: 30

# All PRs gate on new CVEs vs the master baseline
- name: Download master baseline
if: github.event_name == 'pull_request'
uses: dawidd6/action-download-artifact@v23
with:
workflow: security-scan.yaml
name: master-sbom
branch: master
if_no_artifact_found: fail
path: master-baseline

- name: Scan master baseline
id: baseline
if: github.event_name == 'pull_request'
uses: anchore/scan-action@v7.4.0
env:
SBOM: master-baseline/sbom.spdx.json
with: *scan_settings

- name: Fail on new CVEs
if: github.event_name == 'pull_request'
env:
PR_SARIF: ${{ steps.scan.outputs.sarif }}
BASE_SARIF: ${{ steps.baseline.outputs.sarif }}
run: |
[ -s "$BASE_SARIF" ] || { echo "::error::baseline SARIF missing"; exit 2; }
[ -s "$PR_SARIF" ] || { echo "::error::PR SARIF missing"; exit 2; }
ids() { jq -r '.runs[].results[] | select(.level == "error") | .ruleId' "$1" | sort -u; }
new=$(comm -23 <(ids "$PR_SARIF") <(ids "$BASE_SARIF"))
if [ -n "$new" ]; then
echo "::error::New high+ CVEs vs master:"
printf '%s\n' "$new"
exit 1
fi
echo "No new high+ CVEs vs master."
18 changes: 9 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.5
uses: prefix-dev/setup-pixi@v0.10.1
with:
pixi-version: v0.59.0
pixi-version: v0.68.1
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}

Expand All @@ -53,7 +53,7 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- uses: dorny/paths-filter@v4
id: filter
Expand Down Expand Up @@ -86,9 +86,9 @@ jobs:

- name: Setup Pixi
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
uses: prefix-dev/setup-pixi@v0.9.5
uses: prefix-dev/setup-pixi@v0.10.1
with:
pixi-version: v0.59.0
pixi-version: v0.68.1
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}

Expand All @@ -99,13 +99,13 @@ jobs:
echo "MONTH=$(date +'%Y%m')" >> $GITHUB_ENV # cutouts
echo "VERSIONS_HASH=${{ hashFiles('data/versions.csv') }}" >> $GITHUB_ENV

- uses: actions/cache@v5
- uses: actions/cache@v6
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
with:
path: data
key: data-${{ env.WEEK }}-${{ env.VERSIONS_HASH }}

- uses: actions/cache@v5
- uses: actions/cache@v6
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
with:
path: cutouts
Expand All @@ -119,7 +119,7 @@ jobs:
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
# check for undefined variables to reuse functions across scripts
run: |
pixi run pylint --disable=all --enable=E0601,E0606 --output-format=parseable scripts/add_* scripts/prepare_* scripts/solve_*
pixi run -e dev pylint --disable=all --enable=E0601,E0606 --output-format=parseable scripts/add_* scripts/prepare_* scripts/solve_*

- name: Run snakemake test workflows
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
Expand Down
Loading