Skip to content

Commit e9a8d0d

Browse files
committed
uv and minor workflow tweaks
1 parent 47a12b6 commit e9a8d0d

File tree

5 files changed

+35
-47
lines changed

5 files changed

+35
-47
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,23 @@ name: CI
22

33
on:
44
push:
5+
branches-ignore:
6+
- "wip*"
7+
tags:
8+
- "v*"
59
pull_request:
610
release:
711
types: [published]
812
schedule:
913
# Daily at 7:4
1014
- cron: "4 7 * * *"
15+
workflow_dispatch:
1116

1217
env:
1318
PIP_DISABLE_PIP_VERSION_CHECK: "1"
1419
PIP_NO_PYTHON_VERSION_WARNING: "1"
1520

1621
jobs:
17-
pre-commit:
18-
runs-on: ubuntu-latest
19-
steps:
20-
- uses: actions/checkout@v4
21-
- uses: actions/setup-python@v5
22-
with:
23-
python-version: "3.x"
24-
- uses: pre-commit/[email protected]
25-
2622
list:
2723
runs-on: ubuntu-latest
2824
outputs:
@@ -40,6 +36,7 @@ jobs:
4036
ci:
4137
needs: list
4238
runs-on: ${{ matrix.os }}
39+
4340
strategy:
4441
fail-fast: false
4542
matrix:
@@ -70,8 +67,12 @@ jobs:
7067
3.12
7168
pypy3.10
7269
allow-prereleases: true
70+
cache: pip
71+
- name: Set up uv
72+
uses: hynek/setup-cached-uv@v1
7373
- name: Set up nox
7474
uses: wntrblm/[email protected]
75+
7576
- name: Run nox
7677
run: nox -s "${{ matrix.noxenv }}" -- ${{ matrix.posargs }}
7778

@@ -90,6 +91,7 @@ jobs:
9091
- name: Set up Python
9192
uses: actions/setup-python@v5
9293
with:
94+
cache: pip
9395
python-version: "3.x"
9496
- name: Install dependencies
9597
run: python -m pip install build

.readthedocs.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@ version: 2
33
build:
44
os: ubuntu-22.04
55
tools:
6-
python: "3.11"
6+
python: "3.12"
7+
8+
jobs:
9+
post_create_environment:
10+
- pip install uv
11+
post_install:
12+
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install -r docs/requirements.txt
713

814
sphinx:
915
builder: dirhtml
1016
configuration: docs/conf.py
1117
fail_on_warning: true
1218

1319
formats: all
14-
15-
python:
16-
install:
17-
- requirements: docs/requirements.txt

docs/requirements.txt

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.12
3-
# by the following command:
4-
#
5-
# pip-compile --strip-extras docs/requirements.in
6-
#
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile --output-file docs/requirements.txt docs/requirements.in
73
alabaster==0.7.16
84
# via sphinx
95
attrs==23.2.0
@@ -16,11 +12,10 @@ certifi==2024.2.2
1612
# via requests
1713
charset-normalizer==3.3.2
1814
# via requests
19-
docutils==0.20.1
15+
docutils==0.21.1
2016
# via sphinx
2117
furo==2024.1.29
22-
# via -r docs/requirements.in
23-
idna==3.6
18+
idna==3.7
2419
# via requests
2520
imagesize==1.4.1
2621
# via sphinx
@@ -38,11 +33,9 @@ pygments==2.17.2
3833
# pygments-github-lexers
3934
# sphinx
4035
pygments-github-lexers==0.0.5
41-
# via -r docs/requirements.in
42-
referencing==0.33.0
36+
referencing==0.34.0
4337
# via referencing-loaders
44-
file:.#egg=referencing-loaders
45-
# via -r docs/requirements.in
38+
referencing-loaders @ file:.#egg=referencing-loaders
4639
requests==2.31.0
4740
# via sphinx
4841
rpds-py==0.18.0
@@ -51,9 +44,8 @@ snowballstemmer==2.2.0
5144
# via sphinx
5245
soupsieve==2.5
5346
# via beautifulsoup4
54-
sphinx==7.2.6
47+
sphinx==7.3.7
5548
# via
56-
# -r docs/requirements.in
5749
# furo
5850
# sphinx-basic-ng
5951
# sphinx-copybutton
@@ -62,7 +54,6 @@ sphinx==7.2.6
6254
sphinx-basic-ng==1.0.0b2
6355
# via furo
6456
sphinx-copybutton==0.5.2
65-
# via -r docs/requirements.in
6657
sphinxcontrib-applehelp==1.0.8
6758
# via sphinx
6859
sphinxcontrib-devhelp==1.0.6
@@ -76,10 +67,7 @@ sphinxcontrib-qthelp==1.0.7
7667
sphinxcontrib-serializinghtml==1.1.10
7768
# via sphinx
7869
sphinxcontrib-spelling==8.0.0
79-
# via -r docs/requirements.in
8070
sphinxext-opengraph==0.9.1
81-
# via -r docs/requirements.in
8271
url-py==0.10.0
83-
# via -r docs/requirements.in
8472
urllib3==2.2.1
8573
# via requests

noxfile.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
tests=ROOT / "test-requirements.txt",
1515
)
1616
REQUIREMENTS_IN = [ # this is actually ordered, as files depend on each other
17-
path.parent / f"{path.stem}.in" for path in REQUIREMENTS.values()
17+
(path.parent / f"{path.stem}.in", path) for path in REQUIREMENTS.values()
1818
]
1919

2020
SUPPORTED = ["3.8", "3.9", "3.10", "pypy3.10", "3.11", "3.12"]
@@ -169,5 +169,7 @@ def requirements(session):
169169
session.install("pip-tools")
170170
cmd = ["pip-compile", "--resolver", "backtracking", "--strip-extras"]
171171

172-
for each in REQUIREMENTS_IN:
173-
session.run(*cmd, "-U", each.relative_to(ROOT))
172+
for each, out in REQUIREMENTS_IN:
173+
# otherwise output files end up with silly absolute path comments...
174+
relative = each.relative_to(ROOT)
175+
session.run(*cmd, "--upgrade", "--output-file", out, relative)

test-requirements.txt

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.12
3-
# by the following command:
4-
#
5-
# pip-compile --strip-extras test-requirements.in
6-
#
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile --output-file test-requirements.txt test-requirements.in
73
attrs==23.2.0
84
# via referencing
95
iniconfig==2.0.0
106
# via pytest
117
packaging==24.0
128
# via pytest
13-
pluggy==1.4.0
9+
pluggy==1.5.0
1410
# via pytest
1511
pytest==8.1.1
16-
# via -r test-requirements.in
17-
referencing==0.33.0
12+
referencing==0.34.0
1813
# via referencing-loaders
19-
file:.#egg=referencing-loaders
20-
# via -r test-requirements.in
14+
referencing-loaders @ file:.#egg=referencing-loaders
2115
rpds-py==0.18.0
2216
# via referencing

0 commit comments

Comments
 (0)