Skip to content

Commit a4ddca1

Browse files
authored
Merge pull request #16 from kirei/uv
Use UV for build
2 parents 9ccbcc0 + af8fbd5 commit a4ddca1

7 files changed

Lines changed: 276 additions & 196 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ on:
66

77
jobs:
88
pypi_release:
9-
name: Build with Poetry and Publish to PyPI
9+
name: Build with UV and Publish to PyPI
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
uses: actions/setup-python@v5
14-
- name: Install and configure Poetry
15-
run: |
16-
pip install poetry
17-
poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}"
12+
- uses: actions/checkout@v6
13+
- uses: actions/setup-python@v6
14+
- name: Install the latest version of uv
15+
uses: astral-sh/setup-uv@v6
16+
with:
17+
version: latest
18+
enable-cache: true
19+
- name: Build package
20+
run: uv build
1821
- name: Publish package
19-
run: poetry publish --build
22+
run: uv publish

.github/workflows/ruff.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
name: Ruff
22

3-
on: [ push, pull_request ]
3+
on: [push, pull_request]
44

55
jobs:
66
ruff:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
10-
- uses: chartboost/ruff-action@v1
9+
- uses: actions/checkout@v6
10+
- uses: astral-sh/ruff-action@v3
11+
with:
12+
version: latest
13+
- run: ruff check
14+
- run: ruff format --check

.github/workflows/test.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,22 @@ jobs:
88
strategy:
99
matrix:
1010
python-version:
11-
- "3.8"
1211
- "3.9"
1312
- "3.10"
1413
- "3.11"
1514
- "3.12"
15+
- "3.13"
16+
- "3.14"
1617
steps:
17-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v6
1819
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v5
20+
uses: actions/setup-python@v6
2021
with:
2122
python-version: ${{ matrix.python-version }}
22-
- name: Install and set up Poetry
23-
run: |
24-
pip install poetry
25-
poetry config virtualenvs.create true --local
26-
poetry config virtualenvs.in-project true --local
27-
- name: Install python dependencies
28-
run: poetry install
23+
- name: Install the latest version of uv
24+
uses: astral-sh/setup-uv@v6
25+
with:
26+
version: latest
27+
enable-cache: true
2928
- name: Test with pytest
30-
run: poetry run pytest --verbose
29+
run: uv run pytest -v

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Python Base45
22

3-
A Python module to encode/decode binary data using Base45 as described in [RFC 9285 ](https://www.rfc-editor.org/info/rfc9285).
3+
A Python module to encode/decode binary data using Base45 as described in [RFC 9285](https://www.rfc-editor.org/info/rfc9285).

poetry.lock

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

pyproject.toml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
1-
[tool.poetry]
1+
[project]
22
name = "base45"
3-
version = "0.5.0"
3+
dynamic = ["version"]
44
description = "Base45 Encoder/Decoder"
5-
authors = ["Jakob Schlyter <jakob@kirei.se>"]
5+
authors = [
6+
{ name = "Jakob Schlyter", email = "jakob@schlyter.se" }
7+
]
68
license = "BSD-2-Clause"
7-
repository = "https://github.com/kirei/python-base45"
89
readme = "README.md"
10+
requires-python = ">=3.9"
911

10-
[tool.poetry.dependencies]
11-
python = "^3.8"
12-
13-
[tool.poetry.group.dev.dependencies]
14-
ruff = "^0.4.2"
15-
pytest = "^8.2.0"
16-
isort = "^5.13.2"
17-
pytest-isort = "^4.0.0"
12+
[project.urls]
13+
repository = "https://github.com/kirei/python-base45"
1814

19-
[tool.poetry.scripts]
15+
[project.scripts]
2016
base45 = "base45.cli:main"
2117

2218
[build-system]
23-
requires = ["poetry-core>=1.0.0"]
24-
build-backend = "poetry.core.masonry.api"
19+
requires = ["hatchling", "uv-dynamic-versioning"]
20+
build-backend = "hatchling.build"
21+
22+
[tool.hatch.version]
23+
source = "uv-dynamic-versioning"
2524

26-
[tool.isort]
27-
profile = "black"
25+
[dependency-groups]
26+
dev = [
27+
"pytest>=8.4.2",
28+
"ruff>=0.15.2",
29+
]
2830

2931
[tool.ruff.lint]
3032
select = [

0 commit comments

Comments
 (0)