Skip to content

Commit 84aeb40

Browse files
authored
2 parents c1ec792 + 2b03bda commit 84aeb40

File tree

10 files changed

+1528
-1700
lines changed

10 files changed

+1528
-1700
lines changed

.github/workflows/docs.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,37 +28,36 @@ jobs:
2828
python_files:
2929
- 'src/django_docutils/**'
3030
- pyproject.toml
31-
- poetry.lock
31+
- uv.lock
3232
3333
- name: Should publish
3434
if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true'
3535
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
3636

37-
- name: Install poetry
37+
- name: Install uv
3838
if: env.PUBLISH == 'true'
39-
run: pipx install "poetry==1.8.4"
39+
uses: astral-sh/setup-uv@v3
40+
with:
41+
enable-cache: true
4042

4143
- name: Set up Python ${{ matrix.python-version }}
42-
uses: actions/setup-python@v5
4344
if: env.PUBLISH == 'true'
44-
with:
45-
python-version: ${{ matrix.python-version }}
46-
cache: 'poetry'
45+
run: uv python install ${{ matrix.python-version }}
4746

4847
- name: Install dependencies [w/ docs]
4948
if: env.PUBLISH == 'true'
50-
run: poetry install --with docs,lint
49+
run: uv sync --all-extras --dev
5150

5251
- name: Print python versions
5352
if: env.PUBLISH == 'true'
5453
run: |
5554
python -V
56-
poetry run python -V
55+
uv run python -V
5756
5857
- name: Build documentation
5958
if: env.PUBLISH == 'true'
6059
run: |
61-
pushd docs; make SPHINXBUILD='poetry run sphinx-build' html; popd
60+
pushd docs; make SPHINXBUILD='uv run sphinx-build' html; popd
6261
6362
- name: Push documentation to S3
6463
if: env.PUBLISH == 'true'

.github/workflows/tests.yml

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python-version: ['3.10', '3.x']
10+
python-version: ['3.10', '3.13']
1111
django-version: ['4.2', '5.0', '5.1']
1212
include:
1313
- python-version: '3.8'
@@ -17,36 +17,36 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v4
1919

20-
- name: Install poetry
21-
run: pipx install 'poetry==1.8.4'
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v3
22+
with:
23+
enable-cache: true
2224

2325
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v5
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
cache: 'poetry'
26+
run: uv python install ${{ matrix.python-version }}
2827

2928
- name: Install dependencies
30-
run: |
31-
poetry install --with=docs,test,coverage,lint
32-
poetry run pip install DJANGO~=${{ matrix.django-version }}
29+
run: uv sync --all-extras --dev
30+
31+
- name: Install django @ ${{ matrix.django-version }}
32+
run: uv pip install DJANGO~=${{ matrix.django-version }}
3333

3434
- name: Print python versions
3535
run: |
3636
python -V
37-
poetry run python -V
37+
uv run python -V
3838
3939
- name: Lint with ruff check
40-
run: poetry run ruff check .
40+
run: uv run ruff check .
4141

4242
- name: Format with ruff format
43-
run: poetry run ruff format . --check
43+
run: uv run ruff format . --check
4444

4545
- name: Lint with mypy
46-
run: poetry run mypy .
46+
run: uv run mypy .
4747

4848
- name: Test with pytest
49-
run: poetry run py.test --cov=./ --cov-report=xml
49+
run: uv run py.test --cov=./ --cov-report=xml
5050

5151
- uses: codecov/codecov-action@v5
5252
with:
@@ -64,21 +64,19 @@ jobs:
6464
steps:
6565
- uses: actions/checkout@v4
6666

67-
- name: Install poetry
68-
run: pipx install "poetry==1.8.4"
67+
- name: Install uv
68+
uses: astral-sh/setup-uv@v3
69+
with:
70+
enable-cache: true
6971

7072
- name: Set up Python ${{ matrix.python-version }}
71-
uses: actions/setup-python@v5
72-
with:
73-
python-version: ${{ matrix.python-version }}
74-
cache: 'poetry'
73+
run: uv python install ${{ matrix.python-version }}
7574

7675
- name: Build package
77-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
78-
run: poetry build
76+
run: uv build
77+
7978

8079
- name: Publish package
81-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
8280
uses: pypa/gh-action-pypi-publish@release/v1
8381
with:
8482
user: __token__

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
poetry 1.8.4
1+
uv 0.5.4
22
python 3.13.0 3.12.7 3.11.10 3.10.15 3.9.20 3.8.20 3.7.17

CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
### Development
1818

1919
- Support for Django 5.1 in CI, trove classifiers (#429)
20+
- Project and package management: poetry to uv (#435)
21+
22+
[uv] is the new package and project manager for the project, replacing Poetry.
23+
24+
[uv]: https://github.com/astral-sh/uv
2025

2126
## django-docutils 0.26.0 (2024-07-20)
2227

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ entr_warn:
1212
@echo "----------------------------------------------------------"
1313

1414
test:
15-
poetry run py.test $(test)
15+
uv run py.test $(test)
1616

1717
start:
18-
$(MAKE) test; poetry run ptw .
18+
$(MAKE) test; uv run ptw .
1919

2020
watch_test:
2121
if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) test; else $(MAKE) test entr_warn; fi
@@ -30,7 +30,7 @@ design_docs:
3030
$(MAKE) -C docs design
3131

3232
ruff_format:
33-
poetry run ruff format .
33+
uv run ruff format .
3434

3535
ruff:
3636
ruff check .
@@ -39,7 +39,7 @@ watch_ruff:
3939
if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) ruff; else $(MAKE) ruff entr_warn; fi
4040

4141
mypy:
42-
poetry run mypy `${PY_FILES}`
42+
uv run mypy `${PY_FILES}`
4343

4444
watch_mypy:
4545
if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) mypy; else $(MAKE) mypy entr_warn; fi

docs/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ dev:
202202
$(MAKE) -j watch serve
203203

204204
start:
205-
poetry run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} $(O)
205+
uv run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} $(O)
206206

207207
design:
208208
# This adds additional watch directories (for _static file changes) and disable incremental builds
209-
poetry run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} --watch "." -a $(O)
209+
uv run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} --watch "." -a $(O)

0 commit comments

Comments
 (0)