Skip to content

Commit 7b6cab3

Browse files
authored
ci: fix docs workflow (#1419)
* fix docs workflow * fix uv extra syntax. * fix numfocus badge
1 parent a72d750 commit 7b6cab3

File tree

5 files changed

+14
-23
lines changed

5 files changed

+14
-23
lines changed

.github/workflows/build_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
cache-dependency-glob: "pyproject.toml"
2727

2828
- name: Install dependencies with uv
29-
run: uv sync --all-extras --doc
29+
run: uv sync --extra doc
3030

3131
- name: strip output except plots and prints from tutorial notebooks
3232
run: |

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
cache-dependency-glob: "pyproject.toml"
3838

3939
- name: Install dependencies with uv
40-
run: uv sync --all-extras --dev
40+
run: uv sync --extra dev
4141

4242
- name: Run the fast and the slow CPU tests with coverage
4343
run: uv run pytest -v -x -n auto -m "not gpu" --cov=sbi --cov-report=xml tests/

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
cache-dependency-glob: "pyproject.toml"
4646

4747
- name: Install dependencies with uv
48-
run: uv sync --all-extras --dev
48+
run: uv sync --extra dev
4949

5050
- name: Check types with pyright
5151
run: uv run pyright sbi

.github/workflows/manual_test.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
python-version: ['3.8']
33-
torch-version: ['1.11', '2.2']
32+
python-version: ['3.10']
33+
torch-version: ['1.13', '2.5']
3434

3535
steps:
3636
- name: Checkout
@@ -39,27 +39,18 @@ jobs:
3939
fetch-depth: 0
4040
lfs: false
4141

42-
- name: Set up Python
43-
uses: actions/setup-python@v5
42+
- name: Install uv and set the python version
43+
uses: astral-sh/setup-uv@v5
4444
with:
4545
python-version: ${{ matrix.python-version }}
46+
enable-cache: true
47+
cache-dependency-glob: "pyproject.toml"
4648

47-
- name: Cache dependency
48-
id: cache-dependencies
49-
uses: actions/cache@v4
50-
with:
51-
path: ~/.cache/pip
52-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.torch-version }}$
53-
restore-keys: |
54-
${{ runner.os }}-pip-${{ matrix.python-version }}-
55-
${{ runner.os }}-pip-
56-
57-
- name: Install dependencies
49+
- name: Install dependencies with uv
5850
run: |
59-
python -m pip install --upgrade pip
60-
pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu
61-
pip install -e .[dev]
51+
uv pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu
52+
uv pip install -e .[dev]
6253
6354
- name: Run the selected tests without coverage
6455
run: |
65-
pytest -v -x -m ${{ inputs.pytest-marker }} tests/
56+
uv run pytest -v -x -m ${{ inputs.pytest-marker }} tests/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![codecov](https://codecov.io/gh/sbi-dev/sbi/branch/main/graph/badge.svg)](https://codecov.io/gh/sbi-dev/sbi)
66
[![GitHub license](https://img.shields.io/github/license/sbi-dev/sbi)](https://github.com/sbi-dev/sbi/blob/master/LICENSE.txt)
77
[![DOI](https://joss.theoj.org/papers/10.21105/joss.02505/status.svg)](https://doi.org/10.21105/joss.02505)
8-
[![NumFOCUS affiliated](https://camo.githubusercontent.com/a0f197cee66ccd8ed498cf64e9f3f384c78a072fe1e65bada8d3015356ac7599/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e756d464f4355532d616666696c696174656425323070726f6a6563742d6f72616e67652e7376673f7374796c653d666c617426636f6c6f72413d45313532334426636f6c6f72423d303037443841)]
8+
[![NumFOCUS affiliated](https://camo.githubusercontent.com/a0f197cee66ccd8ed498cf64e9f3f384c78a072fe1e65bada8d3015356ac7599/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e756d464f4355532d616666696c696174656425323070726f6a6563742d6f72616e67652e7376673f7374796c653d666c617426636f6c6f72413d45313532334426636f6c6f72423d303037443841)](https://numfocus.org/sponsored-projects/affiliated-projects)
99

1010
## `sbi`: Simulation-Based Inference
1111

0 commit comments

Comments
 (0)