Skip to content

Commit

Permalink
Switch from poetry to uv
Browse files Browse the repository at this point in the history
  • Loading branch information
rkhwaja committed Sep 5, 2024
1 parent 0d2709d commit 7249a02
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 32 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v3
- name: Install uv
uses: yezz123/setup-uv@v4
- name: Dependencies
run: |
poetry config virtualenvs.create false
poetry install
uv sync --no-cache
- name: Lint
run: |
poe lint
uv run poe lint
- name: Tests
env:
RTM_API_KEY: ${{ secrets.RTM_API_KEY }}
Expand All @@ -40,7 +39,7 @@ jobs:
if: ${{needs.secrets.outputs.valid}} == 'true'
run: |
if python --version | grep -q 'Python 3.12' ; then
poe test-with-coverage
uv run poe test-with-coverage
fi
- name: Codecov
uses: codecov/codecov-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rtm-token.txt
__pycache__/
dist/
poetry.lock
uv.lock
.env
.pytest_cache
.vscode
Expand Down
53 changes: 28 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tool.poetry]
[project]
name = "rtmilk"
version = "2.1.0"
description = "Remember The Milk API wrapper"
authors = ["Rehan Khwaja <[email protected]>"]
license = "MIT"
homepage = "https://github.com/rkhwaja/rtmilk"
maintainers = [
{ name = "Rehan Khwaja", email = "[email protected]" }
]
keywords = ["RememberTheMilk", "Remember", "Milk"]
readme = "README.md"
classifiers = [
Expand All @@ -16,26 +16,21 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
]

[tool.poetry.dependencies]
python = ">=3.9,<4"
requests = ">=2.23.0"
urllib3 = [
{ version = ">=1.26", python = ">=3.10,<4" }
requires-python = ">=3.9"
dependencies = [
"requests>=2.23.0",
"urllib3>=1.26; python_version>='3.10'",
"pydantic>=2.4.2",
"aiohttp>=3.9",
"listdiff>=1.0.2",
]
pydantic = ">=2.4.2"
aiohttp = ">=3.9"
listdiff = ">=1.0.2"

[tool.poetry.group.dev.dependencies]
pytest = ">=7.1"
pyperclip = ">=1.8.0"
python-dateutil = ">=2.8.1"
python-dotenv = ">=0.17.1"
pytest-cov = ">=3"
pytest-asyncio = ">=0.16.0"
poethepoet = ">=0.16.4"
ruff = ">=0.6.3"
[project.urls]
Homepage = "https://github.com/rkhwaja/rtmilk"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.poe.tasks]
build = "poetry build --no-interaction"
Expand Down Expand Up @@ -66,6 +61,14 @@ multiline-quotes = "single"
[tool.pytest.ini_options]
pythonpath = ["src"]

[build-system]
requires = ["poetry_core>=1.1"]
build-backend = "poetry.core.masonry.api"
[tool.uv]
dev-dependencies = [
"pytest>=7.1",
"pyperclip>=1.8.0",
"python-dateutil>=2.8.1",
"python-dotenv>=0.17.1",
"pytest-cov>=3",
"pytest-asyncio>=0.16.0",
"poethepoet>=0.16.4",
"ruff>=0.6.3",
]

0 comments on commit 7249a02

Please sign in to comment.