Skip to content

Commit 5d30387

Browse files
committed
Attempt switching to uv
1 parent 17ec2e2 commit 5d30387

7 files changed

Lines changed: 1183 additions & 1451 deletions

File tree

.github/workflows/publish.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@ jobs:
99
publish:
1010
runs-on: ubuntu-latest
1111
env:
12-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
12+
UV_PUBLISH_TOKEN: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
1313
steps:
1414
- uses: actions/checkout@v4
15-
- run: pipx install poetry
15+
16+
- uses: astral-sh/setup-uv@v5
17+
with:
18+
version: "0.6.6"
19+
enable-cache: true
20+
python-version: ${{ matrix.python-version }}
21+
1622
- uses: actions/setup-python@v5
1723
with:
18-
python-version: '3.12'
19-
cache: poetry
20-
- run: poetry build
21-
- run: poetry publish
24+
python-version: ${{ matrix.python-version }}
25+
26+
- run: uv build
27+
- run: uv publish

.github/workflows/test.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,22 @@ jobs:
2727
PGPORT: 5432
2828
steps:
2929
- uses: actions/checkout@v4
30-
- run: pipx install poetry
30+
31+
- uses: astral-sh/setup-uv@v5
32+
with:
33+
version: "0.6.6"
34+
enable-cache: true
35+
python-version: ${{ matrix.python-version }}
36+
3137
- uses: actions/setup-python@v5
3238
with:
3339
python-version: ${{ matrix.python-version }}
34-
cache: poetry
35-
- run: poetry install
36-
- run: poetry run ruff check
37-
- run: poetry run ruff format --diff
40+
41+
- run: uv sync
42+
- run: uv run ruff check
43+
- run: uv run ruff format --diff
3844
if: success() || failure()
39-
- run: poetry run mypy sql_athame/**.py tests/**.py
45+
- run: uv run mypy sql_athame/**.py tests/**.py
4046
if: success() || failure()
41-
- run: poetry run pytest
47+
- run: uv run pytest
4248
if: success() || failure()

poetry.lock

Lines changed: 0 additions & 1400 deletions
This file was deleted.

poetry.toml

Lines changed: 0 additions & 6 deletions
This file was deleted.

pyproject.toml

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,43 @@
1-
[tool.poetry]
1+
[project]
2+
authors = [
3+
{name = "Brian Downing", email = "bdowning@lavos.net"},
4+
]
5+
license = {text = "MIT"}
6+
requires-python = "<4.0,>=3.9"
7+
dependencies = [
8+
"typing-extensions",
9+
]
210
name = "sql-athame"
311
version = "0.4.0-alpha-10"
412
description = "Python tool for slicing and dicing SQL"
5-
authors = ["Brian Downing <bdowning@lavos.net>"]
6-
license = "MIT"
713
readme = "README.md"
14+
15+
[project.urls]
816
homepage = "https://github.com/bdowning/sql-athame"
917
repository = "https://github.com/bdowning/sql-athame"
1018

11-
[tool.poetry.extras]
12-
asyncpg = ["asyncpg"]
13-
14-
[tool.poetry.dependencies]
15-
python = "^3.9"
16-
asyncpg = { version = "*", optional = true }
17-
typing-extensions = "*"
19+
[project.optional-dependencies]
20+
asyncpg = [
21+
"asyncpg",
22+
]
1823

19-
[tool.poetry.group.dev.dependencies]
20-
pytest = "*"
21-
mypy = "*"
22-
flake8 = "*"
23-
ipython = "*"
24-
pytest-cov = "*"
25-
bump2version = "*"
26-
asyncpg = "*"
27-
pytest-asyncio = "*"
28-
grip = "*"
29-
SQLAlchemy = "*"
30-
ruff = "*"
24+
[dependency-groups]
25+
dev = [
26+
"pytest",
27+
"mypy",
28+
"flake8",
29+
"ipython",
30+
"pytest-cov",
31+
"bump2version",
32+
"asyncpg",
33+
"pytest-asyncio",
34+
"grip",
35+
"SQLAlchemy",
36+
"ruff",
37+
]
3138

32-
[build-system]
33-
requires = ["poetry>=0.12"]
34-
build-backend = "poetry.masonry.api"
39+
[tool.setuptools]
40+
packages = ["sql_athame"]
3541

3642
[tool.ruff]
3743
target-version = "py39"

run

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ usage=()
44

55
usage+=(" $0 tests - run tests")
66
tests() {
7-
poetry run pytest "$@"
7+
uv run pytest "$@"
88
lint
99
}
1010

1111
usage+=(" $0 refmt - reformat code")
1212
refmt() {
13-
poetry run ruff check --select I --fix
14-
poetry run ruff format
13+
uv run ruff check --select I --fix
14+
uv run ruff format
1515
}
1616

1717
usage+=(" $0 lint - run linting")
1818
lint() {
19-
poetry run ruff check
20-
poetry run ruff format --diff
21-
poetry run mypy sql_athame/**.py tests/**.py
19+
uv run ruff check
20+
uv run ruff format --diff
21+
uv run mypy sql_athame/**.py tests/**.py
2222
}
2323

2424
usage+=(" $0 bump2version {major|minor|patch} - bump version number")
2525
bump2version() {
26-
poetry run bump2version "$@"
26+
uv run bump2version "$@"
2727
}
2828

2929
cmd=$1

0 commit comments

Comments
 (0)