Skip to content

Commit c9c5e05

Browse files
committed
Use UV for CI and docs build
1 parent 5e1ca04 commit c9c5e05

8 files changed

Lines changed: 56 additions & 57 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,23 @@ on:
55
- main
66
pull_request:
77
jobs:
8-
docs:
8+
dist:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v6
12-
- uses: actions/setup-python@v6
12+
- uses: astral-sh/setup-uv@v7
13+
- run: uvx --from build pyproject-build --sdist --wheel
14+
- run: uvx twine check dist/*
15+
- uses: actions/upload-artifact@v6
1316
with:
14-
python-version: "3.x"
15-
- run: sudo apt install -y python3-enchant graphviz
16-
- run: python -m pip install sphinxcontrib-spelling
17-
- run: python -m pip install -e '.[docs]'
18-
- run: python -m sphinx -W -b spelling docs docs/_build
19-
dist:
17+
path: dist/*
18+
docs:
2019
runs-on: ubuntu-latest
2120
steps:
2221
- uses: actions/checkout@v6
23-
- uses: actions/setup-python@v6
24-
with:
25-
python-version: "3.x"
26-
- run: python -m pip install --upgrade pip build wheel twine readme-renderer
27-
- run: python -m build --sdist --wheel
28-
- run: python -m twine check dist/*
22+
- run: sudo apt-get install -y gettext graphviz
23+
- uses: astral-sh/setup-uv@v7
24+
- run: uv run sphinx-build -W -b doctest -b html docs docs/_build
2925
PyTest:
3026
needs:
3127
- dist
@@ -41,29 +37,27 @@ jobs:
4137
django-version:
4238
- "5.2"
4339
extras:
44-
- "test"
40+
- ""
4541
include:
4642
- python-version: "3.x"
4743
django-version: "5.2"
48-
extras: "test,dramatiq"
44+
extras: "--extras dramatiq"
4945
- python-version: "3.x"
5046
django-version: "5.2"
51-
extras: "test,celery"
47+
extras: "--extras celery"
5248
- python-version: "3.x"
5349
django-version: "5.2"
54-
extras: "test,reversion"
50+
extras: reversion"
5551
- python-version: "3.x"
5652
django-version: "5.2"
57-
extras: "test,graphviz,dramatiq"
53+
extras: "--extras graphviz,dramatiq"
5854
steps:
5955
- uses: actions/checkout@v6
60-
- uses: actions/setup-python@v6
56+
- run: sudo apt install -y graphviz redis-server
57+
- uses: astral-sh/setup-uv@v7
6158
with:
6259
python-version: ${{ matrix.python-version }}
63-
- run: sudo apt install -y graphviz redis-server
64-
- run: python -m pip install "django==${{ matrix.django-version }}.*"
65-
- run: python -m pip install -e .[${{ matrix.extras }}]
66-
- run: python -m pytest
60+
- run: uv run ${{ matrix.extras }} --with Django~=${{ matrix.django-version }}.0 pytest
6761
- uses: codecov/codecov-action@v5
6862
with:
6963
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,6 @@ venv.bak/
105105

106106
# flit
107107
joeflow/_version.py
108+
109+
# uv
110+
uv.lock

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ repos:
4747
rev: v1.36.4
4848
hooks:
4949
- id: djlint-reformat-django
50+
- repo: https://github.com/sphinx-contrib/sphinx-lint
51+
rev: v1.0.2
52+
hooks:
53+
- id: sphinx-lint
5054
ci:
5155
autoupdate_schedule: weekly
5256
skip:

.readthedocs.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
44
version: 2
55
build:
6-
os: ubuntu-20.04
7-
tools:
8-
python: "3.11"
6+
os: ubuntu-24.04
97
apt_packages:
108
- graphviz
11-
sphinx:
12-
configuration: docs/conf.py
13-
python:
14-
install:
15-
- method: pip
16-
path: .
17-
extra_requirements:
18-
- docs
9+
tools:
10+
python: "3"
11+
jobs:
12+
install:
13+
- curl -LsSf https://astral.sh/uv/install.sh | sh
14+
build:
15+
html:
16+
- $HOME/.local/bin/uv run sphinx-build -b html docs $READTHEDOCS_OUTPUT/html

MANIFEST.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

SECURITY.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def linkcode_resolve(domain, info):
6161
master_doc = "index"
6262
project = "Joeflow"
6363

64-
html_theme = "alabaster"
64+
html_theme = "furo"
6565

6666
intersphinx_mapping = {
6767
"python": ("https://docs.python.org/3", None),

pyproject.toml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,25 @@ dependencies = [
5353
]
5454

5555
[project.optional-dependencies]
56+
graphviz = [
57+
"graphviz>=0.18",
58+
]
59+
reversion = [
60+
"django-reversion",
61+
]
62+
celery = [
63+
"celery>=4.2.0",
64+
]
65+
dramatiq = [
66+
"dramatiq>=2.0.0",
67+
"django_dramatiq",
68+
]
69+
70+
[dependency-groups]
71+
dev = [
72+
{ include-group = "test" },
73+
{ include-group = "docs" },
74+
]
5675
test = [
5776
"pytest",
5877
"pytest-cov",
@@ -61,26 +80,15 @@ test = [
6180
"redis",
6281
]
6382
docs = [
83+
"sphinx",
84+
"furo",
6485
"celery>=4.2.0",
6586
"django-reversion",
6687
"dramatiq>=2.0.0",
6788
"django_dramatiq",
6889
"redis",
6990
"graphviz>=0.18",
7091
]
71-
graphviz = [
72-
"graphviz>=0.18",
73-
]
74-
reversion = [
75-
"django-reversion",
76-
]
77-
celery = [
78-
"celery>=4.2.0",
79-
]
80-
dramatiq = [
81-
"dramatiq>=2.0.0",
82-
"django_dramatiq",
83-
]
8492

8593
[project.urls]
8694
Project-URL = "https://github.com/codingjoe/joeflow"

0 commit comments

Comments
 (0)