Skip to content

Commit 9a62fc8

Browse files
committed
ci: use uv
Signed-off-by: nstarman <[email protected]>
1 parent 38371e5 commit 9a62fc8

File tree

4 files changed

+2710
-33
lines changed

4 files changed

+2710
-33
lines changed

.github/workflows/build_book.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,15 @@ jobs:
1919

2020
# Install dependencies.
2121
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v5
22+
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525
- name: Install dependencies
26-
run: |
27-
python -m pip install -e '.[dev]'
26+
run: uv sync --locked --all-extras --group dev
2827

2928
# Build the book.
3029
- name: Build
31-
run: |
32-
jupyter-book build docs
30+
run: uv run jupyter-book build docs
3331

3432
# Deploy the book's HTML to gh-pages branch.
3533
- name: Deploy to GitHub Pages

.github/workflows/ci.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,31 @@ jobs:
3030
extra-install: ""
3131
- name: "3.12-pre-beartype"
3232
python-version: "3.12"
33-
extra-install: "pip install --upgrade --pre beartype"
33+
extra-install: "uv pip install --upgrade --pre beartype"
3434
- name: "3.13"
3535
python-version: "3.13"
3636
extra-install: ""
3737
- name: "3.13-pre-beartype"
3838
python-version: "3.13"
39-
extra-install: "pip install --upgrade --pre beartype"
39+
extra-install: "uv pip install --upgrade --pre beartype"
4040

4141
name: Test ${{ matrix.value.name }}
4242
steps:
4343
- uses: actions/checkout@v2
4444
- name: Set up Python ${{ matrix.value.python-version }}
45-
uses: actions/setup-python@v2
45+
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
4646
with:
47-
python-version: ${{ matrix.value.python-version }}
47+
python-version: ${{ matrix.python-version }}
4848
- name: Install dependencies
4949
run: |
50-
python -m pip install --upgrade pip
51-
python -m pip install --no-cache-dir --group dev
52-
python -m pip install --no-cache-dir -e .
50+
uv sync --locked --all-extras --group dev
5351
${{ matrix.value.extra-install }}
5452
- name: Test linter assertions
55-
run: |
56-
python check_linter_assertions.py tests/typechecked
53+
run: uv run check_linter_assertions.py tests/typechecked
5754
- name: Run tests
5855
run: |
59-
PRAGMA_VERSION=`python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))"` \
60-
pytest -v --cov=plum --cov-report term-missing
56+
PRAGMA_VERSION=`uv run python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))"` \
57+
uv run pytest -v --cov=plum --cov-report term-missing
6158
- name: Coveralls parallel
6259
uses: coverallsapp/github-action@v2
6360
with:

pyproject.toml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,37 +28,35 @@ repository = "https://github.com/beartype/plum"
2828
documentation = "https://beartype.github.io/plum"
2929

3030

31+
[build-system]
32+
requires = ["hatchling>=1.8.0", "hatch-vcs"]
33+
build-backend = "hatchling.build"
34+
35+
3136
[dependency-groups]
3237
dev = [
3338
{ include-group = "docs" },
3439
{ include-group = "lint" },
3540
{ include-group = "test" },
3641
]
3742
lint = [
38-
"pre-commit",
43+
"pre-commit>=4.3.0",
3944
]
4045
test = [
41-
"IPython",
42-
"numpy",
43-
"tox",
44-
"pytest>=6",
45-
"pytest-cov",
46-
"coveralls",
47-
"sybil",
48-
"mypy",
46+
"coveralls>=4.0.1",
47+
"ipython>=8.18.1",
48+
"mypy>=1.18.2",
49+
"numpy>=2.0.2",
4950
"pyright>=1.1.331",
50-
"sybil",
51+
"pytest>=8.4.2",
52+
"pytest-cov>=7.0.0",
53+
"sybil>=9.2.0",
54+
"tox>=4.30.2",
5155
]
5256
docs = [
53-
"jupyter-book",
57+
"jupyter-book>=1.0.4.post1",
5458
]
5559

56-
57-
[build-system]
58-
requires = ["hatchling>=1.8.0", "hatch-vcs"]
59-
build-backend = "hatchling.build"
60-
61-
6260
[tool.hatch]
6361
version.source = "vcs"
6462
build.include = ["plum*"]

0 commit comments

Comments
 (0)