From 7249a0203b12e8459b157e7755931fb68939e56f Mon Sep 17 00:00:00 2001 From: Rehan Khwaja Date: Wed, 4 Sep 2024 19:52:46 -0700 Subject: [PATCH] Switch from poetry to uv --- .github/workflows/ci.yml | 11 ++++----- .gitignore | 2 +- pyproject.toml | 53 +++++++++++++++++++++------------------- 3 files changed, 34 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bec54e2..9a7a755 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} @@ -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 diff --git a/.gitignore b/.gitignore index cb61c6d..8bf9384 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ rtm-token.txt __pycache__/ dist/ -poetry.lock +uv.lock .env .pytest_cache .vscode diff --git a/pyproject.toml b/pyproject.toml index 4ea5071..044ef50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ -[tool.poetry] +[project] name = "rtmilk" version = "2.1.0" description = "Remember The Milk API wrapper" -authors = ["Rehan Khwaja "] -license = "MIT" -homepage = "https://github.com/rkhwaja/rtmilk" +maintainers = [ + { name = "Rehan Khwaja", email = "rehan@khwaja.name" } +] keywords = ["RememberTheMilk", "Remember", "Milk"] readme = "README.md" classifiers = [ @@ -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" @@ -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", +]