Skip to content

Commit 09f828a

Browse files
committed
migrate to uv
1 parent 1412d86 commit 09f828a

File tree

11 files changed

+1114
-1429
lines changed

11 files changed

+1114
-1429
lines changed

.github/workflows/lint-docs.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,13 @@ jobs:
1010
name: Check Documentation
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v3
15-
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v4
13+
- uses: actions/checkout@v4
14+
- name: Install uv and set the python version
15+
uses: astral-sh/setup-uv@v6
1716
with:
18-
python-version: "3.10"
19-
- name: Install and configure Poetry
20-
uses: snok/install-poetry@v1
21-
with:
22-
version: 2.1.3
17+
python-version: '3.13'
18+
enable-cache: true
2319
- name: Install dependencies
24-
run: |
25-
poetry env use '3.10'
26-
poetry install --extras=testing
20+
run: uv sync --locked --group docs
2721
- name: Build docs with MkDocs
28-
run: |
29-
make docs
30-
- name: Check Markdown links
31-
uses: gaurav-nelson/github-action-markdown-link-check@v1
22+
run: make docs

.github/workflows/release-drafter.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
- name: Set up Python
1414
uses: actions/setup-python@v4
1515
with:
16-
python-version: "3.10"
17-
- name: Install Poetry
18-
run: curl -sSL https://install.python-poetry.org | python
16+
python-version: "3.13"
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v6
1919
- name: Get version from pyproject.toml
20-
run: echo "VERSION=$(poetry version -s)" >> $GITHUB_ENV
20+
run: echo "VERSION=$(uv version --short)" >> $GITHUB_ENV
2121
- uses: release-drafter/release-drafter@v5
2222
with:
2323
name: ${{ env.VERSION }}

.github/workflows/release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v4
1919
with:
20-
python-version: "3.10"
21-
- name: Install and configure Poetry
22-
uses: snok/install-poetry@v1
23-
with:
24-
version: 2.1.3
20+
python-version: "3.13"
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v6
2523
- name: Install dependencies
26-
run: poetry install
24+
run: uv sync
2725
- name: Build distributions
28-
run: poetry build
26+
run: uv build
2927
- name: Publish to PyPI
3028
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/tests.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,16 @@ jobs:
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323

24-
- name: Install and configure Poetry
25-
uses: snok/install-poetry@v1
26-
with:
27-
version: 2.1.3
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v6
2826

2927
- name: Install dependencies
3028
run: |
31-
poetry env use ${{matrix.python-version}}
32-
poetry install --extras=testing
29+
uv sync --extra testing
3330
3431
- name: Test with pytest
3532
run: |
36-
poetry run pytest tests/
33+
uv run pytest tests/
3734
3835
integration-tests:
3936
runs-on: ubuntu-latest

.readthedocs.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ build:
2020
python: "3.11"
2121
jobs:
2222
post_create_environment:
23-
# Install poetry
24-
# https://python-poetry.org/docs/#installing-manually
25-
- pip install poetry
26-
# Tell poetry to not use a virtual environment
27-
- poetry config virtualenvs.create false
23+
# Install uv
24+
- pip install uv
25+
# Tell uv to not use a virtual environment
26+
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH
2827
post_install:
2928
# Install dependencies with 'docs' dependency group
30-
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
31-
- poetry install --with docs
29+
- uv sync --group docs

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ clean:
4444
find . -name '.bak' -exec rm -f {} +
4545

4646
docs:
47-
poetry run mkdocs build --site-dir=html
47+
uv run mkdocs build --site-dir=html

docs/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ General expectations:
2626

2727
## Development
2828

29-
We use [Poetry](https://python-poetry.org/) for packaging and dependency management.
29+
We use [UV](https://docs.astral.sh/uv/) for packaging and dependency management.
3030

3131
After forking and cloning the repository,
3232
run the following command to setup the project:
3333

34-
`poetry install`
34+
`uv sync`
3535

3636
Then use your favorite IDE for development and testing.
3737

@@ -48,11 +48,11 @@ make sure to update the [documentation site page](./examples.md) too.
4848
## Working on Documentation
4949

5050
The documentation is powered by [MkDocs](https://www.mkdocs.org/) and [ReadTheDocs](https://readthedocs.org/).
51-
All the necessary dependencies are included into the Poetry definition.
51+
All the necessary dependencies are included into the pyproject definition.
5252
To build the docs locally:
5353

5454
```bash
55-
poetry run mkdocs build --site-dir=html
55+
uv run mkdocs build --site-dir=html
5656
```
5757

5858
MkDocs also comes with a built-in dev-server that lets you preview your documentation as you work on it by running the `mkdocs serve` command.

0 commit comments

Comments
 (0)