Skip to content

Commit 240d897

Browse files
committed
migrate to uv
1 parent 1412d86 commit 240d897

File tree

11 files changed

+1107
-1420
lines changed

11 files changed

+1107
-1420
lines changed

.github/workflows/lint-docs.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@ jobs:
1515
- name: Set up Python ${{ matrix.python-version }}
1616
uses: actions/setup-python@v4
1717
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
18+
python-version: "3.13"
19+
- name: Install UV
20+
uses: yezz123/setup-uv@v4
2321
- name: Install dependencies
2422
run: |
25-
poetry env use '3.10'
26-
poetry install --extras=testing
23+
uv install --extras=testing
2724
- name: Build docs with MkDocs
2825
run: |
2926
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: yezz123/setup-uv@v4
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: yezz123/setup-uv@v4
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: yezz123/setup-uv@v4
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.

poetry.lock

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

pyproject.toml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,22 @@ testing = [
4040
"testcontainers>=3.7.1,<4.0.0",
4141
]
4242

43-
[tool.poetry]
44-
packages = [{include = "wiremock"}]
45-
46-
[tool.poetry.group.dev.dependencies]
47-
black = "^23.3.0"
48-
coverage = "^7.2.3"
49-
pytest-coverage = "^0.0"
50-
python-coveralls = "^2.9.3"
51-
responses = "^0.23.1"
52-
tox = "^4.4.12"
53-
watchdog = "^3.0.0"
54-
wheel = "^0.40.0"
55-
pytest = "^7.3.1"
56-
57-
[tool.poetry.group.docs.dependencies]
58-
mkdocs = "^1.3.0"
59-
markdown_include = "^0.8.1"
43+
[dependency-groups]
44+
dev = [
45+
"black>=23.3.0,<24.0.0",
46+
"coverage>=7.2.3,<8.0.0",
47+
"pytest-coverage>=0.0,<1.0.0",
48+
"python-coveralls>=2.9.3,<3.0.0",
49+
"responses>=0.23.1,<1.0.0",
50+
"tox>=4.4.12,<5.0.0",
51+
"watchdog>=3.0.0,<4.0.0",
52+
"wheel>=0.40.0,<0.41.0",
53+
"pytest>=7.3.1,<8.0.0",
54+
]
55+
docs = [
56+
"mkdocs>=1.3.0,<2.0.0",
57+
"markdown-include>=0.8.1,<0.9.0",
58+
]
6059

6160
[tool.pytest.ini_options]
6261
markers = [
@@ -66,6 +65,9 @@ markers = [
6665
"resource",
6766
"serialization",
6867
]
68+
pythonpath = [
69+
"."
70+
]
6971

7072
[tool.black]
7173
exclude = '''

run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22

33
rm -Rf build/ dist/ wiremock.egg-info coverage/ wiremock/tests/coverage/ html/ || true
4-
poetry run pytest --cov=wiremock --tb=short
4+
uv run pytest --cov=wiremock --tb=short

0 commit comments

Comments
 (0)