Skip to content

chore: use uv instead of poetry #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.2"
python-version: ${{ matrix.python-version }}
- name: Set up Poetry 2.1.0
uses: abatilo/[email protected]
with:
poetry-version: 1.1.2

- name: Run tests
run: make tests
- name: Upload coverage
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: 3.9
- name: Set up Poetry 2.1.0
uses: abatilo/[email protected]
with:
poetry-version: 1.1.2
version: "0.8.2"
python-version: "3.11"
- name: Run tests
run: make tests
- name: Run build
run: poetry build
run: uv build
- name: Publish in GitHub Releases
uses: svenstaro/upload-release-action@v2
with:
Expand Down
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
install:
poetry install

tests: install
poetry run flake8 . --count --show-source --statistics --max-line-length=88 --extend-ignore=E203
poetry run black . --check
poetry run isort . --profile=black
poetry run pre-commit run --all-files
poetry run pytest --cov=./ --cov-report=xml
tests:
uv run flake8 . --count --show-source --statistics --max-line-length=88 --extend-ignore=E203
uv run black . --check
uv run isort . --profile=black
uv run pre-commit run --all-files
uv run pytest --cov=./ --cov-report=xml

update_index:
cp README.md docs/index.md
53 changes: 33 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,44 @@
[tool.poetry]
[project]
name = "unasync-cli"
version = "0.0.1"
description = "Command line interface for unasync. Fork of https://github.com/leynier/unasync-cli/"
authors = ["Leynier Gutiérrez González <[email protected]>"]
homepage = "https://github.com/leynier/unasync-cli/"
repository = "https://github.com/leynier/unasync-cli"
documentation = "https://github.com/leynier/unasync-cli"
authors = [
{ name = "Leynier Gutiérrez González", email = "[email protected]"},
]
readme = "README.md"
license = "MIT"
requires-python = ">= 3.9"
dependencies = [
"typer >=0.4.0",
"unasync >=0.6.0",
"setuptools >=78.1.1",
]

[project.urls]
homepage = "https://github.com/leynier/unasync-cli"
repository = "https://github.com/leynier/unasync-cli"
documentation = "https://github.com/leynier/unasync-cli"

[tool.poetry.scripts]
[project.scripts]
unasync = "unasync_cli.main:app"

[tool.poetry.dependencies]
python = "^3.9"
typer = "^0.4.0"
unasync = "^0.6.0"
setuptools = "^78.1.1"
[dependency-groups]
dev = [
"pytest >= 6.2.5",
"pytest-cov >= 3.0.0",
"flake8 >= 7.1.1",
"black >= 24.3",
"isort >= 5.9.3",
"pre-commit >= 2.15.0",
]

[tool.uv]
default-groups = [ "dev" ]

[tool.poetry.dev-dependencies]
pytest = "^6.2.5"
pytest-cov = "^3.0.0"
flake8 = "^7.1.1"
black = "^24.3"
isort = "^5.9.3"
pre-commit = "^2.15.0"
[tool.uv.build-backend]
module-name = "unasync_cli"
module-root = ""

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["uv_build>=0.8.3,<0.9.0"]
build-backend = "uv_build"
Loading