Skip to content

Commit cc5246b

Browse files
Test lowest-direct dependencies (#858)
* Test lowest-direct dependencies * Update .github/workflows/nightly_dependency_tests.yaml Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> * Fix org name for setup-uv action * Use `uv` to invoke installation, not `python -m uv` * Activate an environment as well --------- Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
1 parent 815d4dc commit cc5246b

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

.github/workflows/nightly_dependency_tests.yaml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
jobs:
18-
nightly_tests:
18+
check_latest_dependencies:
1919
runs-on: ${{ matrix.os }}
2020
strategy:
2121
fail-fast: false
@@ -39,6 +39,41 @@ jobs:
3939
python -m pip install "pybamm[all] @ git+https://github.com/pybamm-team/PyBaMM@develop"
4040
4141
42+
- name: Run ${{ matrix.suite }} tests
43+
run: |
44+
if [[ "${{ matrix.suite }}" == "unit" ]]; then
45+
python -m pytest --unit
46+
elif [[ "${{ matrix.suite }}" == "integration" ]]; then
47+
python -m pytest --integration
48+
elif [[ "${{ matrix.suite }}" == "examples" ]]; then
49+
python -m pytest --examples
50+
elif [[ "${{ matrix.suite }}" == "notebooks" ]]; then
51+
python -m pytest --notebooks --nbmake --nbmake-timeout=1000 examples/
52+
fi
53+
54+
check_lowest_dependencies:
55+
runs-on: ${{ matrix.os }}
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
os: [ubuntu-latest, macos-14]
60+
python-version: ["3.10"]
61+
suite: ["unit", "integration", "examples", "notebooks"]
62+
63+
name: Test-${{ matrix.os }}-py-${{ matrix.python-version }}-${{ matrix.suite }})
64+
65+
steps:
66+
- uses: actions/checkout@v6
67+
- name: Set up Python ${{ matrix.python-version }}
68+
uses: astral-sh/setup-uv@v7
69+
with:
70+
python-version: ${{ matrix.python-version }}
71+
activate-environment: "true"
72+
- name: Install dependencies
73+
run: |
74+
uv pip install --resolution lowest-direct -e .[all,dev]
75+
76+
4277
- name: Run ${{ matrix.suite }} tests
4378
run: |
4479
if [[ "${{ matrix.suite }}" == "unit" ]]; then

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ requires-python = ">=3.10, <3.13"
2727
dependencies = [
2828
"pybamm>=25.12.0",
2929
"numpy",
30-
"scipy>=1.3",
30+
"scipy>=1.12.0",
3131
"pints>=0.5.1",
3232
"SALib>=1.5",
3333
]

0 commit comments

Comments
 (0)