Skip to content

Commit 7e0c404

Browse files
committed
chore: migrate to uv
1 parent f49927c commit 7e0c404

11 files changed

Lines changed: 1282 additions & 1498 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v4
15-
- name: Install Poetry
16-
uses: snok/install-poetry@v1
17-
- uses: actions/setup-python@v5
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v3
1817
with:
19-
python-version: 3.12
20-
cache: 'poetry'
18+
enable-cache: true
2119
- name: build dist
22-
run: poetry build
20+
run: uv build
2321
- uses: actions/upload-artifact@v4
2422
with:
2523
name: artifacts
@@ -39,12 +37,11 @@ jobs:
3937

4038
steps:
4139
- uses: actions/checkout@v4
42-
- uses: actions/setup-python@v5
40+
- name: Install uv
41+
uses: astral-sh/setup-uv@v3
4342
with:
44-
python-version: 3.12
45-
- run: pip install poetry
46-
- run: poetry install
47-
- run: poetry run pyinstaller --name scim2-${{ matrix.os }} --onefile scim2_cli/__init__.py
43+
enable-cache: true
44+
- run: uv run pyinstaller --name scim2-${{ matrix.os }} --onefile scim2_cli/__init__.py
4845
- run: ./dist/scim2-${{ matrix.os }}
4946
- uses: actions/upload-artifact@v4
5047
if: ${{ matrix.os != 'windows-latest' }}

.github/workflows/tests.yaml

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
tests:
15-
name: ${{ matrix.python }}
15+
name: py${{ matrix.python }} unit tests
1616
runs-on: ubuntu-latest
1717
strategy:
1818
fail-fast: false
@@ -22,39 +22,31 @@ jobs:
2222
- '3.12'
2323
- '3.11'
2424
- '3.10'
25+
- '3.9'
2526
steps:
2627
- uses: actions/checkout@v4
27-
- name: Install Poetry
28-
uses: snok/install-poetry@v1
29-
- uses: actions/setup-python@v5
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v3
3030
with:
31-
python-version: ${{ matrix.python }}
32-
cache: 'poetry'
33-
- name: Install dependencies and run tests
34-
run: |
35-
poetry --version
36-
poetry install
37-
poetry run pytest --showlocals
31+
enable-cache: true
32+
- name: Install Python ${{ matrix.python }}
33+
run: uv python install ${{ matrix.python }}
34+
- name: Run tests
35+
run: uv run pytest --showlocals
3836

3937
minversions:
4038
name: minimum dependency versions
4139
runs-on: ubuntu-latest
4240
steps:
4341
- uses: actions/checkout@v4
44-
- name: Install Poetry
45-
uses: snok/install-poetry@v1
46-
- uses: actions/setup-python@v5
42+
- name: Install uv
43+
uses: astral-sh/setup-uv@v3
4744
with:
48-
python-version: '3.10'
49-
cache: 'poetry'
50-
- run: sed -i -E 's/"(\^|>=)([0-9\.]+)([^,]*)"/"==\2"/' pyproject.toml
51-
- run: sed -i -E 's/python = "==/python = "^/' pyproject.toml
52-
- name: Install dependencies and run tests
53-
run: |
54-
poetry --version
55-
poetry lock
56-
poetry install
57-
poetry run pytest --showlocals
45+
enable-cache: true
46+
- name: Install minimum dependencies
47+
run: uv sync --resolution=lowest-direct
48+
- name: Run tests
49+
run: uv run pytest --showlocals
5850

5951
style:
6052
runs-on: ubuntu-latest
@@ -66,12 +58,8 @@ jobs:
6658
runs-on: ubuntu-latest
6759
steps:
6860
- uses: actions/checkout@v4
69-
- name: Install Poetry
70-
uses: snok/install-poetry@v1
71-
- uses: actions/setup-python@v5
61+
- name: Install uv
62+
uses: astral-sh/setup-uv@v3
7263
with:
73-
python-version: '3.12'
74-
cache: 'poetry'
75-
- run: |
76-
poetry install --with doc
77-
poetry run sphinx-build doc build/sphinx/html
64+
enable-cache: true
65+
- run: uv run sphinx-build doc build/sphinx/html

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ pip install scim2-cli
2626

2727
### From sources
2828

29-
To run scim2-cli from the sources, [Poetry is needed](https://python-poetry.org/docs/#installation) for development:
29+
To run scim2-cli from the sources, [uv is needed](https://docs.astral.sh/uv/getting-started/installation/) for development:
3030

3131
```shell
3232
git clone https://github.com/yaal-coop/scim2-cli.git
3333
cd scim2-cli
34-
poetry install
34+
uv sync
3535
```
3636

3737
Then, it can be launched directly as a Python script:
3838

3939
```shell
40-
poetry run scim2 --help
40+
uv run scim2 --help
4141
```
4242

4343
Or you can build a single file binary from the sources:
4444

4545
```shell
46-
poetry run pyinstaller --name scim2 --onefile scim2_cli/__init__.py
46+
uv run pyinstaller --name scim2 --onefile scim2_cli/__init__.py
4747
./dist/scim2 --help
4848
```
4949

doc/contributing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ the `bugtracker <https://github.com/yaal-coop/scim2-cli/issues>`_.
1414
Unit tests
1515
----------
1616

17-
To run the tests, you just can run `poetry run pytest` and/or `tox` to test all the supported python environments.
17+
To run the tests, you just can run `uv run pytest` and/or `tox` to test all the supported python environments.
1818
Everything must be green before patches get merged.
1919

2020
The test coverage is 100%, patches won't be accepted if not entirely covered. You can check the
21-
test coverage with ``poetry run pytest --cov --cov-report=html`` or ``tox -e coverage -- --cov-report=html``.
21+
test coverage with ``uv run pytest --cov --cov-report=html`` or ``tox -e coverage -- --cov-report=html``.
2222
You can check the HTML coverage report in the newly created `htmlcov` directory.
2323

2424
Code style

0 commit comments

Comments
 (0)