Skip to content

Commit 07d2195

Browse files
committed
1 parent cea224f commit 07d2195

File tree

8 files changed

+1324
-1647
lines changed

8 files changed

+1324
-1647
lines changed

.github/workflows/docs.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,24 @@ jobs:
3333
if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true'
3434
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
3535

36-
- name: Install poetry
36+
- name: Install uv
3737
if: env.PUBLISH == 'true'
38-
run: pipx install "poetry==1.8.3"
38+
uses: astral-sh/setup-uv@v3
39+
with:
40+
enable-cache: true
3941

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

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

5150
- name: Build documentation
5251
if: env.PUBLISH == 'true'
5352
run: |
54-
pushd docs; make SPHINXBUILD='poetry run sphinx-build' html; popd
53+
pushd docs; make SPHINXBUILD='uv run sphinx-build' html; popd
5554
5655
- name: Push documentation to S3
5756
if: env.PUBLISH == 'true'

.github/workflows/tests.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,33 @@ jobs:
1919
python-version: ['3.9', '3.13']
2020
steps:
2121
- uses: actions/checkout@v4
22-
- name: Install poetry
23-
run: pipx install "poetry==1.8.3"
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v3
24+
with:
25+
enable-cache: true
2426

2527
- name: Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v5
27-
with:
28-
python-version: ${{ matrix.python-version }}
29-
cache: 'poetry'
28+
run: uv python install ${{ matrix.python-version }}
3029

3130
- name: Install dependencies
32-
run: poetry install --with=docs,test,coverage,lint
31+
run: uv sync --all-extras --dev
3332

3433
- name: Lint with ruff check
35-
run: poetry run ruff check .
34+
run: uv run ruff check .
3635

3736
- name: Format with ruff
38-
run: poetry run ruff format . --check
37+
run: uv run ruff format . --check
3938

4039
- name: Lint with mypy
41-
run: poetry run mypy .
40+
run: uv run mypy .
4241

4342
- name: Print python versions
4443
run: |
4544
python -V
46-
poetry run python -V
45+
uv run python -V
4746
4847
- name: Test with pytest
49-
run: poetry run py.test --cov=./ --cov-append --cov-report=xml
48+
run: uv run py.test --cov=./ --cov-append --cov-report=xml
5049
env:
5150
COV_CORE_SOURCE: .
5251
COV_CORE_CONFIG: .coveragerc
@@ -67,18 +66,18 @@ jobs:
6766
steps:
6867
- uses: actions/checkout@v4
6968

70-
- name: Install poetry
71-
run: pipx install "poetry==1.8.3"
69+
- name: Install uv
70+
run: pipx install "uv==0.5.1"
7271

7372
- name: Set up Python ${{ matrix.python-version }}
7473
uses: actions/setup-python@v5
7574
with:
7675
python-version: ${{ matrix.python-version }}
77-
cache: 'poetry'
76+
cache: 'uv'
7877

7978
- name: Build package
8079
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
81-
run: poetry build
80+
run: uv build
8281

8382
- name: Publish package
8483
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.13.0 3.12.7 3.11.10 3.10.15 3.9.20 3.8.20 3.7.17
1+
3.13.0

.tool-versions

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

Makefile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ DOC_FILES= find . -type f -not -path '*/\.*' | grep -i '.*[.]rst\$\|.*[.]md\$\|.
33
ALL_FILES= find . -type f -not -path '*/\.*' | grep -i '.*[.]py\$\|.*[.]rst\$\|.*[.]md\$\|.*[.]css\$\|.*[.]py\$\|mkdocs\.yml\|CHANGES\|TODO\|.*conf\.py' 2> /dev/null
44
SHELL := /bin/bash
55

6+
SPHINXBUILD = uv run sphinx-build
67

78
entr_warn:
89
@echo "----------------------------------------------------------"
@@ -13,10 +14,10 @@ entr_warn:
1314
@echo "----------------------------------------------------------"
1415

1516
test:
16-
poetry run py.test $(test)
17+
uv run py.test $(test)
1718

1819
start:
19-
$(MAKE) test; poetry run ptw .
20+
uv run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} $(O)
2021

2122
watch_test:
2223
if command -v entr > /dev/null; then ${ALL_FILES} | entr -c $(MAKE) test; else $(MAKE) test entr_warn; fi
@@ -34,16 +35,16 @@ design_docs:
3435
$(MAKE) -C docs design
3536

3637
ruff_format:
37-
poetry run ruff format .
38+
uv run ruff format .
3839

3940
ruff:
40-
poetry run ruff .
41+
uv run ruff .
4142

4243
watch_ruff:
4344
if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) ruff; else $(MAKE) ruff entr_warn; fi
4445

4546
mypy:
46-
poetry run mypy `${PY_FILES}`
47+
uv run mypy `${PY_FILES}`
4748

4849
watch_mypy:
4950
if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) mypy; else $(MAKE) mypy entr_warn; fi
@@ -52,7 +53,10 @@ format_markdown:
5253
prettier --parser=markdown -w *.md docs/*.md docs/**/*.md CHANGES
5354

5455
monkeytype_create:
55-
poetry run monkeytype run `poetry run which py.test`
56+
uv run monkeytype run `uv run which py.test`
5657

5758
monkeytype_apply:
58-
poetry run monkeytype list-modules | xargs -n1 -I{} sh -c 'poetry run monkeytype apply {}'
59+
uv run monkeytype list-modules | xargs -n1 -I{} sh -c 'uv run monkeytype apply {}'
60+
61+
design:
62+
uv run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --port ${HTTP_PORT} --watch "." -a $(O)

0 commit comments

Comments
 (0)