Skip to content

Commit 0e25284

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # doc/index.rst # doc/release_notes.rst # linopy/constants.py # linopy/expressions.py # linopy/io.py # linopy/model.py # linopy/solvers.py
2 parents 879b073 + e05518d commit 0e25284

43 files changed

Lines changed: 3244 additions & 222 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/claude.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
id-token: write
3232
steps:
3333
- name: Checkout repository
34-
uses: actions/checkout@v5
34+
uses: actions/checkout@v6
3535
with:
3636
fetch-depth: 1
3737

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
# 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
5656
steps:
5757
- name: Checkout repository
58-
uses: actions/checkout@v5
58+
uses: actions/checkout@v6
5959

6060
# Initializes the CodeQL tools for scanning.
6161
- name: Initialize CodeQL

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Build and verify package
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v5
14+
- uses: actions/checkout@v6
1515
- uses: hynek/build-and-inspect-python-package@v2
1616

1717
release:
@@ -20,7 +20,7 @@ jobs:
2020
needs: [build]
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v5
23+
- uses: actions/checkout@v6
2424
- uses: softprops/action-gh-release@v2
2525
with:
2626
generate_release_notes: true
@@ -36,7 +36,7 @@ jobs:
3636
permissions:
3737
id-token: write
3838
steps:
39-
- uses: actions/download-artifact@v6
39+
- uses: actions/download-artifact@v7
4040
with:
4141
name: Packages
4242
path: dist

.github/workflows/test-models.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
shell: bash -l {0}
3232

3333
steps:
34-
- uses: actions/checkout@v5
34+
- uses: actions/checkout@v6
3535
with:
3636
repository: PyPSA/pypsa-eur
3737
ref: master
@@ -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@v6
105105
with:
106106
name: results-pypsa-eur-${{ matrix.version }}
107107
path: |

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
name: Build and verify package
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v5
21+
- uses: actions/checkout@v6
2222
with:
2323
fetch-depth: 0 # Needed for setuptools_scm
2424
- uses: hynek/build-and-inspect-python-package@v2
@@ -42,7 +42,7 @@ jobs:
4242
- windows-latest
4343

4444
steps:
45-
- uses: actions/checkout@v5
45+
- uses: actions/checkout@v6
4646
with:
4747
fetch-depth: 0 # Needed for setuptools_scm
4848

@@ -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@v7
7878
with:
7979
name: Packages
8080
path: dist
@@ -102,7 +102,7 @@ jobs:
102102
runs-on: ubuntu-latest
103103

104104
steps:
105-
- uses: actions/checkout@v5
105+
- uses: actions/checkout@v6
106106
with:
107107
fetch-depth: 0 # Needed for setuptools_scm
108108

@@ -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@v7
116116
with:
117117
name: Packages
118118
path: dist

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ benchmark/scripts/leftovers/
4949

5050
# direnv
5151
.envrc
52+
AGENTS.md

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ repos:
2424
rev: v0.4.1
2525
hooks:
2626
- id: blackdoc
27+
exclude: ^dev-scripts/
2728
additional_dependencies: ['black==24.8.0']
2829
exclude: dev-scripts/quadratic_constraints_plan\.md
2930
- repo: https://github.com/codespell-project/codespell

CLAUDE.md

Lines changed: 9 additions & 1 deletion
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)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ Fri 0 4
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)
152153

153154
Note that these do have to be installed by the user separately.
154155

doc/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@
4242
"nbsphinx",
4343
"nbsphinx_link",
4444
"sphinx.ext.imgconverter", # for SVG conversion
45+
"sphinx_copybutton",
4546
]
4647

48+
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
49+
copybutton_prompt_is_regexp = True
50+
4751
# Add any paths that contain templates here, relative to this directory.
4852
templates_path = ["_templates"]
4953

0 commit comments

Comments
 (0)