Skip to content

Commit 137e937

Browse files
committed
Use dependency group instead of optional deps for lower bounds
1 parent 479ecb5 commit 137e937

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

.github/workflows/checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
tests:
1414
# Default config: py3.14, ubuntu-latest, float32, full options.
1515
# The idea is to make each of those params vary one by one, to limit the number of tests to run.
16-
name: Tests (py${{ matrix.python-version || '3.14' }}, ${{ matrix.os || 'ubuntu-latest' }}, ${{ matrix.dtype || 'float32' }}, ${{ matrix.options || 'full' }})
16+
name: Tests (py${{ matrix.python-version || '3.14' }}, ${{ matrix.os || 'ubuntu-latest' }}, ${{ matrix.dtype || 'float32' }}, ${{ matrix.options || 'full' }}${{ matrix.extra_groups && format(', {0}', matrix.extra_groups) || '' }})
1717
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
1818
strategy:
1919
fail-fast: false
@@ -34,7 +34,7 @@ jobs:
3434
- options: 'none'
3535
# Lower-bounds of all dependencies and Python version.
3636
- python-version: '3.10.0'
37-
options: 'ci_dependency_lower_bounds'
37+
extra_groups: 'lower_bounds'
3838

3939
steps:
4040
- name: Checkout repository
@@ -48,7 +48,7 @@ jobs:
4848
- uses: ./.github/actions/install-deps
4949
with:
5050
options: ${{ matrix.options || 'full' }}
51-
groups: test
51+
groups: test ${{ matrix.extra_groups }}
5252

5353
- name: Run tests
5454
run: uv run pytest -W error tests/unit tests/doc --cov=src --cov-report=xml

pyproject.toml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ plot = [
9292
"kaleido==0.2.1", # Only works with locked version
9393
"matplotlib>=3.10.0", # Recent version to avoid problems, could be relaxed
9494
]
95+
# Dependency group allowing to easily resolve version of the core dependencies to the lower bound.
96+
lower_bounds = [
97+
"torch==2.4.0",
98+
"numpy==1.23.0",
99+
"quadprog==0.1.9",
100+
"qpsolvers==1.0.1",
101+
]
95102

96103
[project.optional-dependencies]
97104
nash_mtl = [
@@ -106,15 +113,6 @@ full = [
106113
"ecos>=2.0.14", # Does not work before 2.0.14
107114
]
108115

109-
# Optional dependencies allowing to easily pin version of the core dependencies to the lower bound.
110-
# This is not intended to be installed by users: only the CI should ever install this.
111-
ci_dependency_lower_bounds = [
112-
"torch==2.4.0",
113-
"numpy==1.23.0",
114-
"quadprog==0.1.9",
115-
"qpsolvers==1.0.1",
116-
]
117-
118116
[tool.pytest.ini_options]
119117
xfail_strict = true
120118

0 commit comments

Comments
 (0)