Skip to content

Commit 18fcb15

Browse files
authored
Merge branch 'master' into pre-commit-ci-update-config
2 parents 5910845 + c415b4e commit 18fcb15

61 files changed

Lines changed: 11091 additions & 618 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/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
permissions:
3737
id-token: write
3838
steps:
39-
- uses: actions/download-artifact@v6
39+
- uses: actions/download-artifact@v8
4040
with:
4141
name: Packages
4242
path: dist

.github/workflows/test-models.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
echo -ne "url: ${CDSAPI_URL}\nkey: ${CDSAPI_TOKEN}\n" > ~/.cdsapirc
6060
echo "week=$(date +'%Y%U')" >> $GITHUB_ENV # data and cutouts
6161
62-
- uses: actions/cache@v4
62+
- uses: actions/cache@v5
6363
if: env.pinned == 'false'
6464
with:
6565
path: |
@@ -74,7 +74,7 @@ jobs:
7474

7575
- name: Cache Conda env
7676
if: env.pinned == 'false'
77-
uses: actions/cache@v4
77+
uses: actions/cache@v5
7878
with:
7979
path: ${{ env.CONDA }}/envs
8080
key: conda-pypsa-eur-${{ env.week }}-${{ hashFiles('envs/linux-64.lock.yaml') }}
@@ -101,7 +101,7 @@ jobs:
101101
102102
- name: Upload artifacts
103103
if: env.pinned == 'false'
104-
uses: actions/upload-artifact@v5
104+
uses: actions/upload-artifact@v7
105105
with:
106106
name: results-pypsa-eur-${{ matrix.version }}
107107
path: |

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
6565
- name: Set up windows package manager
6666
if: matrix.os == 'windows-latest'
67-
uses: crazy-max/ghaction-chocolatey@v3
67+
uses: crazy-max/ghaction-chocolatey@v4
6868
with:
6969
args: -h
7070

@@ -74,7 +74,7 @@ jobs:
7474
choco install glpk
7575
7676
- name: Download package
77-
uses: actions/download-artifact@v6
77+
uses: actions/download-artifact@v8
7878
with:
7979
name: Packages
8080
path: dist
@@ -112,7 +112,7 @@ jobs:
112112
python-version: 3.12
113113

114114
- name: Download package
115-
uses: actions/download-artifact@v6
115+
uses: actions/download-artifact@v8
116116
with:
117117
name: Packages
118118
path: dist

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ benchmark/scripts/leftovers/
5050
# direnv
5151
.envrc
5252
AGENTS.md
53+
coverage.xml

CLAUDE.md

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
### Running Tests
88
```bash
9-
# Run all tests
9+
# Run all tests (excluding GPU tests by default)
1010
pytest
1111

1212
# Run tests with coverage
@@ -17,8 +17,16 @@ pytest test/test_model.py
1717

1818
# Run a specific test function
1919
pytest test/test_model.py::test_model_creation
20+
21+
# Run GPU tests (requires GPU hardware and cuPDLPx installation)
22+
pytest --run-gpu
23+
24+
# Run only GPU tests
25+
pytest -m gpu --run-gpu
2026
```
2127

28+
**GPU Testing**: Tests that require GPU hardware (e.g., cuPDLPx solver) are automatically skipped by default since CI machines typically don't have GPUs. To run GPU tests locally, use the `--run-gpu` flag. The tests are automatically marked with `@pytest.mark.gpu` based on solver capabilities.
29+
2230
### Linting and Type Checking
2331
```bash
2432
# Run linter (ruff)
@@ -102,27 +110,6 @@ When modifying the codebase, maintain consistency with these patterns and ensure
102110
* Always create a feature branch for new features or bug fixes.
103111
* Use the github cli (gh) to interact with the Github repository.
104112

105-
### GitHub Claude Code Integration
106-
107-
This repository includes Claude Code GitHub Actions for automated assistance:
108-
109-
1. **Automated PR Reviews** (`claude-code-review.yml`):
110-
- Automatically reviews PRs only when first created (opened)
111-
- Subsequent reviews require manual `@claude` mention
112-
- Focuses on Python best practices, xarray patterns, and optimization correctness
113-
- Can run tests and linting as part of the review
114-
- **Skip initial review by**: Adding `[skip-review]` or `[WIP]` to PR title, or using draft PRs
115-
116-
2. **Manual Claude Assistance** (`claude.yml`):
117-
- Trigger by mentioning `@claude` in any:
118-
- Issue comments
119-
- Pull request comments
120-
- Pull request reviews
121-
- New issue body or title
122-
- Claude can help with bug fixes, feature implementation, code explanations, etc.
123-
124-
**Note**: Both workflows require the `ANTHROPIC_API_KEY` secret to be configured in the repository settings.
125-
126113

127114
## Development Guidelines
128115

@@ -132,3 +119,4 @@ This repository includes Claude Code GitHub Actions for automated assistance:
132119
4. Use type hints and mypy for type checking.
133120
5. Always write tests into the `test` directory, following the naming convention `test_*.py`.
134121
6. Always write temporary and non git-tracked code in the `dev-scripts` directory.
122+
7. In test scripts use linopy assertions from the testing.py module where useful (assert_linequal, assert_varequal, etc.)

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,14 @@ Fri 0 4
143143

144144
* [Cbc](https://projects.coin-or.org/Cbc)
145145
* [GLPK](https://www.gnu.org/software/glpk/)
146-
* [HiGHS](https://www.maths.ed.ac.uk/hall/HiGHS/)
146+
* [HiGHS](https://highs.dev/)
147147
* [Gurobi](https://www.gurobi.com/)
148148
* [Xpress](https://www.fico.com/en/products/fico-xpress-solver)
149149
* [Cplex](https://www.ibm.com/de-de/analytics/cplex-optimizer)
150150
* [MOSEK](https://www.mosek.com/)
151151
* [COPT](https://www.shanshu.ai/copt)
152+
* [cuPDLPx](https://github.com/MIT-Lu-Lab/cuPDLPx)
153+
* [Knitro](https://www.artelys.com/solvers/knitro/)
152154

153155
Note that these do have to be installed by the user separately.
154156

0 commit comments

Comments
 (0)