Skip to content

Commit 03b442e

Browse files
authored
Merge pull request #5 from o-santi/switch-to-uv
chore: use uv instead of poetry
2 parents ae953f9 + 00914e9 commit 03b442e

File tree

5 files changed

+693
-43
lines changed

5 files changed

+693
-43
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ jobs:
1616
- uses: actions/checkout@v2
1717
with:
1818
ref: ${{ github.event.pull_request.head.sha }}
19-
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v2
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v6
2121
with:
22+
version: "0.8.2"
2223
python-version: ${{ matrix.python-version }}
23-
- name: Set up Poetry 2.1.0
24-
uses: abatilo/[email protected]
25-
with:
26-
poetry-version: 1.1.2
24+
2725
- name: Run tests
2826
run: make tests
2927
- name: Upload coverage

.github/workflows/publish.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,15 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12-
- name: Set up Python 3.9
13-
uses: actions/setup-python@v2
12+
- name: Install uv
13+
uses: astral-sh/setup-uv@v6
1414
with:
15-
python-version: 3.9
16-
- name: Set up Poetry 2.1.0
17-
uses: abatilo/[email protected]
18-
with:
19-
poetry-version: 1.1.2
15+
version: "0.8.2"
16+
python-version: "3.11"
2017
- name: Run tests
2118
run: make tests
2219
- name: Run build
23-
run: poetry build
20+
run: uv build
2421
- name: Publish in GitHub Releases
2522
uses: svenstaro/upload-release-action@v2
2623
with:

Makefile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
install:
2-
poetry install
3-
4-
tests: install
5-
poetry run flake8 . --count --show-source --statistics --max-line-length=88 --extend-ignore=E203
6-
poetry run black . --check
7-
poetry run isort . --profile=black
8-
poetry run pre-commit run --all-files
9-
poetry run pytest --cov=./ --cov-report=xml
1+
tests:
2+
uv run flake8 . --count --show-source --statistics --max-line-length=88 --extend-ignore=E203
3+
uv run black . --check
4+
uv run isort . --profile=black
5+
uv run pre-commit run --all-files
6+
uv run pytest --cov=./ --cov-report=xml
107

118
update_index:
129
cp README.md docs/index.md

pyproject.toml

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,44 @@
1-
[tool.poetry]
1+
[project]
22
name = "unasync-cli"
33
version = "0.0.1"
44
description = "Command line interface for unasync. Fork of https://github.com/leynier/unasync-cli/"
5-
authors = ["Leynier Gutiérrez González <[email protected]>"]
6-
homepage = "https://github.com/leynier/unasync-cli/"
7-
repository = "https://github.com/leynier/unasync-cli"
8-
documentation = "https://github.com/leynier/unasync-cli"
5+
authors = [
6+
{ name = "Leynier Gutiérrez González", email = "[email protected]"},
7+
]
98
readme = "README.md"
109
license = "MIT"
10+
requires-python = ">= 3.9"
11+
dependencies = [
12+
"typer >=0.4.0",
13+
"unasync >=0.6.0",
14+
"setuptools >=78.1.1",
15+
]
16+
17+
[project.urls]
18+
homepage = "https://github.com/leynier/unasync-cli"
19+
repository = "https://github.com/leynier/unasync-cli"
20+
documentation = "https://github.com/leynier/unasync-cli"
1121

12-
[tool.poetry.scripts]
22+
[project.scripts]
1323
unasync = "unasync_cli.main:app"
1424

15-
[tool.poetry.dependencies]
16-
python = "^3.9"
17-
typer = "^0.4.0"
18-
unasync = "^0.6.0"
19-
setuptools = "^78.1.1"
25+
[dependency-groups]
26+
dev = [
27+
"pytest >= 6.2.5",
28+
"pytest-cov >= 3.0.0",
29+
"flake8 >= 7.1.1",
30+
"black >= 24.3",
31+
"isort >= 5.9.3",
32+
"pre-commit >= 2.15.0",
33+
]
34+
35+
[tool.uv]
36+
default-groups = [ "dev" ]
2037

21-
[tool.poetry.dev-dependencies]
22-
pytest = "^6.2.5"
23-
pytest-cov = "^3.0.0"
24-
flake8 = "^7.1.1"
25-
black = "^24.3"
26-
isort = "^5.9.3"
27-
pre-commit = "^2.15.0"
38+
[tool.uv.build-backend]
39+
module-name = "unasync_cli"
40+
module-root = ""
2841

2942
[build-system]
30-
requires = ["poetry-core>=1.0.0"]
31-
build-backend = "poetry.core.masonry.api"
43+
requires = ["uv_build>=0.8.3,<0.9.0"]
44+
build-backend = "uv_build"

0 commit comments

Comments
 (0)