Skip to content

Commit 2aa5bf4

Browse files
committed
Migrate to uv
1 parent a2bd173 commit 2aa5bf4

File tree

12 files changed

+657
-771
lines changed

12 files changed

+657
-771
lines changed

.github/workflows/pre-commit.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
name: Run pre-commit
22

33
on:
4-
- pull_request
5-
- push
6-
- workflow_dispatch
4+
- pull_request
5+
- push
6+
- workflow_dispatch
77

88
jobs:
99
pre-commit:
1010
name: Run pre-commit
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
14-
- uses: actions/setup-python@v5
15-
with:
16-
python-version: 3.11
17-
- uses: pre-commit/action@v3.0.1
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: 3.12
17+
- uses: pre-commit/action@v3.0.1

.github/workflows/publish.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,29 @@ name: Publish package to PyPI
33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- "v*"
77

88
jobs:
99
build-test:
1010
runs-on: ubuntu-latest
11-
timeout-minutes: 60
11+
timeout-minutes: 30
1212
steps:
13-
- uses: actions/checkout@v4
13+
- name: Checkout Repo
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 1
1417

15-
- name: Set up Python
16-
uses: actions/setup-python@v5
18+
- name: Set up uv
19+
uses: astral-sh/setup-uv@v5
1720
with:
18-
python-version: "3.9"
21+
version: "0.6.11"
1922

20-
- name: Install dependencies
21-
run: |
22-
python -m pip install poetry
23+
- name: Install project
24+
run: uv sync
2325

2426
- name: Build and publish to PyPI
2527
env:
26-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
28+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
2729
run: |
28-
poetry publish --build
30+
uv build
31+
uv publish

.github/workflows/tests.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@ jobs:
2222

2323
- name: Checkout Repo
2424
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 1
2527

26-
- name: Set up Python
27-
uses: actions/setup-python@v5
28+
- name: Set up uv
29+
uses: astral-sh/setup-uv@v5
2830
with:
31+
version: "0.6.11"
2932
python-version: ${{ matrix.python-version }}
3033

31-
- name: Install dependencies
32-
run: |
33-
python -m pip install poetry
34-
poetry install
34+
- name: Install project
35+
run: uv sync --group dev
3536

36-
- name: Run tests
37-
run: poetry run pytest -vv -k ${{ matrix.session }}
37+
- name: Test with pytest
38+
run: uv run pytest -vv -k ${{ matrix.session }}

.isort.cfg

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

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- Updates all dependenices
44
- Adds support for Python 3.13
55
- Removes support for Python 3.8
6+
- Moved to uv for package and project management
67

78
## [0.5.22] - 2025-02-28
89

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -472,12 +472,12 @@ Please see our guide [here](./CONTRIBUTING.md)
472472

473473
## Local Development
474474

475-
We use Poetry for dependency management & packaging. Please see [here for setup instructions](https://python-poetry.org/docs/#installation).
475+
We use uv for dependency management & packaging. Please see [here for setup instructions](https://docs.astral.sh/uv/getting-started/installation/).
476476

477-
Once you have Poetry installed, you can run the following to install the dependencies in a virtual environment:
477+
Once you have uv installed, you can run the following to install the dependencies in a virtual environment:
478478

479479
```bash
480-
poetry install
480+
uv sync
481481
```
482482

483483
## Testing
@@ -491,13 +491,13 @@ If you just run `pytest` or `tox`, all tests will be run against AWS, localstack
491491
Make sure you have your boto3 client configured ([ref](https://boto3.readthedocs.io/en/latest/guide/quickstart.html#configuration)) and then run
492492

493493
```bash
494-
poetry run pytest -k aws
494+
uv run pytest -k aws
495495
```
496496

497497
Alternatively, to test all supported versions, run
498498

499499
```bash
500-
poetry run tox -- -k aws
500+
uv run tox -- -k aws
501501
```
502502

503503
### Testing with localstack
@@ -507,19 +507,19 @@ Localstack tests should perform faster than testing against AWS, and besides, th
507507
Run [ElasticMQ](https://github.com/softwaremill/elasticmq) and make sure that the SQS endpoint is available by the address localhost:4566:
508508

509509
```bash
510-
docker run -p 4566:9324 --rm -it softwaremill/elasticmq-native
510+
uv run -p 4566:9324 --rm -it softwaremill/elasticmq-native
511511
```
512512

513513
Then run
514514

515515
```bash
516-
poetry run pytest -k localstack
516+
uv run pytest -k localstack
517517
```
518518

519519
or
520520

521521
```bash
522-
poetry run tox -- -k localstack
522+
uv run tox -- -k localstack
523523
```
524524

525525
### Testing with MemorySession
@@ -529,13 +529,13 @@ MemorySession should be even faster, but has all the limitations documented abov
529529
Simply run
530530

531531
```bash
532-
poetry run pytest -k memory
532+
uv run pytest -k memory
533533
```
534534

535535
or
536536

537537
```bash
538-
poetry run tox -- -k memory
538+
uv run tox -- -k memory
539539
```
540540

541541
## Releasing new versions

0 commit comments

Comments
 (0)