Skip to content
Merged
Show file tree
Hide file tree
Changes from 97 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
5c3e094
update unit commitment parameters and fix startup cost (#2073)
fneum Feb 18, 2026
050d5a5
add name to unclustered power plants (#2069)
fneum Feb 18, 2026
9d6340c
rolling horizon: drop cyclicity and allow in solve_network (#2070)
fneum Feb 18, 2026
72d1df0
add option to add existing batteries from powerplantmatching (#2071)
fneum Feb 18, 2026
d8e2909
handle co2stop id column across versions (#2077)
fneum Feb 18, 2026
0bf228e
fix missing or outdated configuration options (#2074)
fneum Feb 18, 2026
5c80319
allow custom efficiency_classes for conventional generators (#2075)
fneum Feb 18, 2026
a465b6b
chore: pin grpcio<1.78 to silence warnings (#2080)
daniel-rdt Feb 18, 2026
3247e2a
annual nuclear energy availability factors (#2072)
fneum Feb 18, 2026
f545f18
Allow pixi post link scripts to run (#2079)
brynpickering Feb 18, 2026
7bf8ed4
Fix offshore wind potentials in Germany (#2081)
fneum Feb 18, 2026
f4ed8eb
distribute electricity demand by JRC energy atlas (#1829)
fneum Feb 18, 2026
748f878
Reverting to .pdf file ending for `plot_summary` (#2083)
bobbyxng Feb 18, 2026
67806b0
prepare release v2026.02.0 (#2084)
fneum Feb 18, 2026
2a06802
Update locked environment files for all platforms (#2082)
github-actions[bot] Feb 18, 2026
99ec2d9
ci: always run integration tests on workflow_dispatch trigger (#2085)
lkstrp Feb 18, 2026
d6383eb
[github-actions.ci] prepare release v2026.02.0
lkstrp Feb 19, 2026
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
c813dd1
Merge branch 'master-upstream' into merge-upstream-260223
tgilon Feb 23, 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
655d666
Merge pull request #90 from open-energy-transition/merge-upstream-260223
tgilon 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
981654c
Merge branch 'PyPSA:master' into master
tgilon 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
f6d5fee
[github-actions.ci] Update locked envs (#2133)
github-actions[bot] Apr 16, 2026
918debe
feat: improve config validator for scenario management (#2155)
daniel-rdt Apr 23, 2026
afcec04
Heuristically split existing solar capacities 50:50 between rootop an…
lindnemi Apr 28, 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
25f47d4
Update pixi to use relative exclude-newer (#2163)
brynpickering 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
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
8208868
Fix DC junctions in simplify_network (#2147)
bobbyxng Jun 8, 2026
cf2ef77
docs: arrange pages in tabs (#2190)
fneum 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
ca2a493
limit to pypsa < 1.2 (#2201)
fneum Jun 12, 2026
a4b9bd9
Merge branch 'master-upstream' into merge-upstream-260612
tgilon Jun 12, 2026
c48ef62
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 12, 2026
6551701
chore: update environment
tgilon Jun 12, 2026
7ca2e38
Revert "chore: update environment"
tgilon Jun 12, 2026
18774d5
ci: trigger grype
tgilon Jun 15, 2026
3bd68a6
Merge pull request #96 from open-energy-transition/merge-upstream-260612
tgilon Jun 17, 2026
9a52494
Merge branch 'master-upstream-oet' into merge-upstream-260617
tgilon Jun 17, 2026
b1564e4
ci: fix update-lockfile action to commit on PR
tgilon Jun 18, 2026
4ae9f74
fix: add missing parameter in build_electricity_demand_base
tgilon Jun 18, 2026
b1a4fad
chore: remove pinned version to align with upstream
tgilon Jun 18, 2026
e7a4edf
fix: remove latest tag for nitrogen_statistics tyndp-archive as a new…
tgilon Jun 18, 2026
e7f9610
chore: update .gitignore
tgilon Jun 18, 2026
21c2f46
doc: fix various issues in the doc when rendering
tgilon Jun 18, 2026
3c903d8
fix: use dc_i_p consistently
tgilon Jun 18, 2026
8103aae
fix: add missing kwargs in make_index for create_network_topology
tgilon Jun 18, 2026
fd808db
[github-actions.ci] Update locked envs
tgilon Jun 19, 2026
b4167d0
doc: add release note
tgilon Jun 19, 2026
ab0e243
chore: pin linopy <0.7.0 as long as pypsa < 1.2.2
tgilon Jun 23, 2026
21c20b9
Apply suggestions from code review
tgilon Jun 23, 2026
2c13e22
Apply suggestions from code review
tgilon Jun 23, 2026
8f8cac2
Merge branch 'master' into merge-upstream-260617
tgilon Jun 30, 2026
8808ee4
Apply suggestions from code review
tgilon Jun 30, 2026
40a01f1
ci: reintroduce check-diff stage
tgilon Jun 30, 2026
83eb10e
refactor: remove external data provider dependency for build_electric…
tgilon Jun 30, 2026
2eace0c
doc: add comment for linopy pin
tgilon Jun 30, 2026
ddce712
Merge branch 'master' into merge-upstream-260617
tgilon Jun 30, 2026
ef65652
fix: add missing inputs for build_elecstricity_demand_base_tyndp
tgilon Jun 30, 2026
055cddb
[github-actions.ci] Update locked envs
tgilon Jul 1, 2026
7c0240a
Apply suggestions from code review
tgilon Jul 2, 2026
f7e135d
[github-actions.ci] Update locked envs
tgilon Jul 2, 2026
5519633
refactor: extend removal of external data provider for build_electric…
tgilon Jul 2, 2026
1c959b1
chore: fix indentation for pixi tasks
tgilon Jul 2, 2026
4961e06
[github-actions.ci] Update locked envs
tgilon Jul 2, 2026
0d0c02e
fix: sort new links to ensure reproducibility
tgilon Jul 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
27 changes: 14 additions & 13 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ Closes # (if applicable).

## Checklist

- [ ] Security scan(s) show no high-severity bugs, critical vulnerabilities, or exposed secrets.
- [ ] I tested my contribution locally and it works as intended.
- [ ] Code and workflow changes are sufficiently documented.
- [ ] Changed dependencies are added to `pixi.toml` (using `pixi add <dependency-name>`).
- [ ] Changes in configuration options are added in `config/config.default.yaml`.
- [ ] Changes in configuration options are documented in `doc/configtables/*.csv`.
- [ ] Changes in configuration options are added in `config/test/*.yaml`.
- [ ] The multiple weather/climate years test is passing locally (using `pixi run -e open-tyndp tyndp-cyears-test`).
- [ ] Open-TYNDP SPDX license header added to all touched files.
**Required:**
- [ ] Security scans show no high-severity bugs, critical vulnerabilities, or exposed secrets.
- [ ] Changes are tested locally and behave as expected.
- [ ] Code and workflow changes are documented.
- [ ] A release note entry is added to `doc/release_notes.md`.

**If applicable:**
- [ ] Changes in configuration options are reflected in `scripts/lib/validation`.
- [ ] Changes in configuration options are added to `config/test/*.yaml`.
- [ ] Multiple climate years test passes locally (`pixi run -e open-tyndp tyndp-cyears-test`).
- [ ] For new data sources or versions, [these instructions](https://open-tyndp.readthedocs.io/en/latest/data_sources.html) have been followed.
- [ ] New rules are documented in the appropriate `doc/*.rst` files.
- [ ] A release note `doc/release_notes.rst` is added.
- [ ] Major features are documented with up-to-date information in `doc/index.rst`.
- [ ] Module docstrings added to new Python scripts.
- [ ] Open-TYNDP SPDX license header is added to all touched files.
- [ ] Module docstrings are added to new Python scripts.
- [ ] New rules are documented in the appropriate `doc/*.md` files.
- [ ] Major features are documented in `doc/index.md`.
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"
4 changes: 2 additions & 2 deletions .github/workflows/push-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
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 Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.6
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
99 changes: 99 additions & 0 deletions .github/workflows/security-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Security scan
on:
push:
branches: [master]
paths: [pixi.lock]
pull_request:
branches: [master]
paths: [pixi.lock]
schedule:
- cron: "0 6 * * *"
workflow_dispatch:

jobs:
scan:
name: SBOM and vulnerability scan
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@v6
- uses: prefix-dev/setup-pixi@v0.9.6
with:
pixi-version: v0.68.1

- name: Generate SBOM # (master only)
if: github.ref == 'refs/heads/master'
uses: anchore/sbom-action@v0.24.0
with:
path: ".pixi/envs/default"
output-file: sbom.spdx.json
dependency-snapshot: true

- name: Vulnerability Scan
id: scan
uses: anchore/scan-action@v7.4.0
with:
path: ".pixi/envs/default"
fail-build: false
severity-cutoff: high
add-cpes-if-none: true
output-format: sarif

# Point alerts to pixi.lock so githubs path scoped PR check registers it
- name: Rewrite SARIF locations to pixi.lock
run: |
jq '.runs[].results[].locations[].physicalLocation.artifactLocation.uri = "pixi.lock"' \
"${{ steps.scan.outputs.sarif }}" > rewritten.sarif
mv rewritten.sarif "${{ steps.scan.outputs.sarif }}"

- name: Upload SARIF
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: ${{ steps.scan.outputs.sarif }}
category: pixi-vuln-scan

# Fork PRs cant upload SARIF (no access to token), so code scannings native diff
# does not apply. This builds our own diff from a master-uploaded SARIF artifact instead.
- name: Upload SARIF as artifact
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v7
with:
name: master-sarif
path: ${{ steps.scan.outputs.sarif }}
retention-days: 30

# Fork PRs cant upload SARIF to code scanning (no token write access), so
# diff against the master baseline artifact here instead
- name: Download master baseline (fork PRs only)
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
uses: dawidd6/action-download-artifact@v21
with:
workflow: security-scan.yaml
name: master-sarif
branch: master
if_no_artifact_found: fail
path: master-baseline

- name: Fail on new CVEs (fork PRs only)
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
env:
SARIF_PATH: ${{ steps.scan.outputs.sarif }}
run: |
[ -s master-baseline/output ] || { echo "::error::baseline SARIF missing"; exit 2; }
[ -s "$SARIF_PATH" ] || { echo "::error::PR SARIF missing"; exit 2; }
new=$(comm -23 \
<(jq -r '.runs[].results[] | select(.level == "error") | .ruleId' "$SARIF_PATH" | sort -u) \
<(jq -r '.runs[].results[] | select(.level == "error") | .ruleId' master-baseline/output | sort -u))
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."
24 changes: 12 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.6
with:
pixi-version: v0.59.0
pixi-version: v0.68.1
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}

Expand Down Expand Up @@ -103,39 +103,39 @@ jobs:
df -h

- name: Skip - no source changes
if: steps.filter.outputs.src != 'true' && github.event_name != 'schedule'
if: steps.filter.outputs.src != 'true' && github.event_name != 'schedule' && github.event_name != 'workflow_dispatch'
run: echo "Skipping tests because no source code changes detected"

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

- name: Setup cache keys
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule'
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
run: |
echo "WEEK=$(date +'%Y%U')" >> $GITHUB_ENV # data
echo "MONTH=$(date +'%Y%m')" >> $GITHUB_ENV # cutouts
echo "VERSIONS_HASH=${{ hashFiles('data/versions.csv') }}" >> $GITHUB_ENV

- uses: actions/cache@v5
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule'
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
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule'
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
with:
path: cutouts
key: cutouts-${{ env.MONTH }}

- name: Restore git-tracked files in data/
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule'
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
run: git checkout HEAD -- data/

- name: Restore git-tracked files in data/
Expand All @@ -146,26 +146,26 @@ jobs:
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule'
# 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 (sb)
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule'
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
env:
SNAKEMAKE_STORAGE_CACHED_HTTP_CACHE: ""
SNAKEMAKE_STORAGE_CACHED_HTTP_SKIP_REMOTE_CHECKS: "1"
run: |
pixi run -e open-tyndp tyndp-sb-test

- name: Run snakemake test workflows (cba)
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule'
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
env:
SNAKEMAKE_STORAGE_CACHED_HTTP_CACHE: ""
SNAKEMAKE_STORAGE_CACHED_HTTP_SKIP_REMOTE_CHECKS: "1"
run: |
pixi run -e open-tyndp tyndp-cba-test

- name: Run snakemake test workflows (upstream)
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule'
if: steps.filter.outputs.src == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
env:
SNAKEMAKE_STORAGE_CACHED_HTTP_CACHE: ""
SNAKEMAKE_STORAGE_CACHED_HTTP_SKIP_REMOTE_CHECKS: "1"
Expand Down
97 changes: 13 additions & 84 deletions .github/workflows/update-lockfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,16 @@ on:
- cron: "0 8 1,16 * *" # Bi-weekly
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
check-diff:
runs-on: ubuntu-latest
outputs:
has_diff: ${{ steps.check_diff.outputs.has_diff }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Check pixi files diff
id: check_diff
run: |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "has_diff=true" >> $GITHUB_OUTPUT
echo "Running on master branch - will proceed with update of lockfiles."
exit 0
fi

git fetch origin master
if git diff origin/master...HEAD -- pixi.toml pixi.lock | grep -q .; then
echo "has_diff=true" >> $GITHUB_OUTPUT
echo "Differences found compared to master - will proceed with update of lockfiles."
else
echo "has_diff=false" >> $GITHUB_OUTPUT
echo "No differences found compared to master - will skip update of lockfiles."
fi
env:
GH_TOKEN: ${{ github.token }}

update-locked-environment:
update-lockfiles:
Comment thread
tgilon marked this conversation as resolved.
if: |
needs.check-diff.outputs.has_diff == 'true' &&
(github.event_name == 'schedule' && github.ref == 'refs/heads/master' ||
github.event_name != 'schedule' && github.ref != 'refs/heads/master')
needs: check-diff
(github.event_name == 'schedule' && github.ref == 'refs/heads/master') ||
(github.event_name != 'schedule' && github.ref != 'refs/heads/master')
name: Update lockfiles
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
defaults:
run:
shell: bash -l {0}
Expand All @@ -59,65 +27,26 @@ jobs:
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.6
with:
pixi-version: v0.59.0
run-install: false
pixi-version: v0.68.1

- name: Full resolve (exclude packages newer than 7 days)
# Exclude recently published packages to avoid pulling in broken or
# yanked releases before upstream has had time to react
- name: Full resolve
run: |
EXCLUDE_DATE=$(date -u -d '7 days ago' +%Y-%m-%dT00:00:00Z)
sed -i "/^\[workspace\]/a exclude-newer = \"$EXCLUDE_DATE\"" pixi.toml
rm pixi.lock
pixi install --all
git checkout pixi.toml

- name: Create new conda lock files
run: |
pixi workspace export conda-explicit-spec -e default envs
for f in envs/*_conda_spec*; do mv "$f" "${f/_conda_spec/.pin}"; done

- name: Create new conda environment file
run: |
pixi workspace export conda-environment -e default envs/environment.yaml -n pypsa-eur

- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: lockfiles
path: |
pixi.lock
envs/

create-commit:
if: ${{ github.ref != 'refs/heads/master' }}
needs: update-locked-environment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Download all artifacts
uses: actions/download-artifact@v8
with:
name: lockfiles
- name: Export conda environment files
if: ${{ !vars.PYPSA_BOT_ID }}
run: pixi run sync-locks

- name: Create Commit
if: ${{ github.ref != 'refs/heads/master' }}
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "[github-actions.ci] Update locked envs"

create-pull-request:
if: ${{ github.ref == 'refs/heads/master' }}
needs: update-locked-environment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
name: lockfiles

- name: Create Pull Request
if: ${{ github.ref == 'refs/heads/master' }}
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading
Loading