Skip to content

Commit 5e1b0c3

Browse files
authored
🔀 Merge pull request #71 from davep/migrate-to-uv
Migrate from rye to uv for project management
2 parents 5cd9636 + 80b97c6 commit 5e1b0c3

File tree

7 files changed

+1655
-279
lines changed

7 files changed

+1655
-279
lines changed

.github/workflows/style-lint-and-test.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ jobs:
1919
steps:
2020

2121
- name: Checkout Code
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v5
2323

2424
- name: Set up Python
25-
uses: actions/setup-python@v4
25+
uses: actions/setup-python@v5
2626
with:
2727
python-version: ${{ matrix.python-version }}
28+
allow-prereleases: true
2829

29-
- name: Install Rye
30-
uses: eifinger/setup-rye@v4
30+
- name: Install uv
31+
uses: astral-sh/setup-uv@v6
3132
with:
3233
version: "latest"
3334

ChangeLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Peplum ChangeLog
22

3+
## Unreleased
4+
5+
**Released: WiP**
6+
7+
- Migrated from `rye` to `uv` for development management.
8+
([#71](https://github.com/davep/dhv/pull/71))
9+
310
## v1.0.1
411

512
**Released: 2025-05-15**

Makefile

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
app := peplum
2-
src := src/
3-
tests := tests/
4-
docs := docs/
5-
run := rye run
6-
test := rye test
7-
python := $(run) python
8-
lint := rye lint -- --select I
9-
fmt := rye fmt
10-
mypy := $(run) mypy
11-
mkdocs := $(run) mkdocs
12-
spell := $(run) codespell
1+
app := peplum
2+
src := src/
3+
tests := tests/
4+
docs := docs/
5+
run := uv run
6+
sync := uv sync
7+
build := uv build
8+
publish := uv publish --username=__token__ --keyring-provider=subprocess
9+
test := $(run) pytest
10+
python := $(run) python
11+
ruff := $(run) ruff
12+
lint := $(ruff) check --select I
13+
fmt := $(ruff) format
14+
mypy := $(run) mypy
15+
mkdocs := $(run) mkdocs
16+
spell := $(run) codespell
1317

1418
##############################################################################
1519
# Local "interactive testing" of the code.
@@ -33,15 +37,15 @@ console: # Run the textual console
3337
# Setup/update packages the system requires.
3438
.PHONY: ready
3539
ready: # Make the development environment ready to go
36-
rye sync
40+
$(sync)
3741

3842
.PHONY: setup
3943
setup: ready # Set up the repository for development
4044
$(run) pre-commit install
4145

4246
.PHONY: update
4347
update: # Update all dependencies
44-
rye sync --update-all
48+
$(sync) --update-all
4549

4650
.PHONY: resetup
4751
resetup: realclean # Recreate the virtual environment from scratch
@@ -94,19 +98,19 @@ publishdocs: clean-docs ready # Set up the docs for publishing
9498
# Package/publish.
9599
.PHONY: package
96100
package: # Package the library
97-
rye build
101+
$(build)
98102

99103
.PHONY: spackage
100104
spackage: # Create a source package for the library
101-
rye build --sdist
105+
$(build) --sdist
102106

103107
.PHONY: testdist
104108
testdist: package # Perform a test distribution
105-
rye publish --yes --skip-existing --repository testpypi --repository-url https://test.pypi.org/legacy/
109+
$(publish) --index testpypi
106110

107111
.PHONY: dist
108112
dist: package # Upload to pypi
109-
rye publish --yes --skip-existing
113+
$(publish)
110114

111115
##############################################################################
112116
# Utility.

pyproject.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,10 @@ Discussions = "https://github.com/davep/peplum/discussions"
6161
peplum = "peplum.__main__:main"
6262

6363
[build-system]
64-
# https://github.com/astral-sh/rye/issues/1446
65-
requires = ["hatchling==1.26.3", "hatch-vcs"]
66-
# requires = ["hatchling"]
67-
build-backend = "hatchling.build"
64+
requires = ["uv_build>=0.8.11,<0.9.0"]
65+
build-backend = "uv_build"
6866

69-
[tool.rye]
67+
[tool.uv]
7068
managed = true
7169
dev-dependencies = [
7270
"mypy>=1.14.1",
@@ -76,10 +74,14 @@ dev-dependencies = [
7674
"codespell>=2.4.1",
7775
"mkdocs-material>=9.6.11",
7876
"markdown-exec>=1.10.3",
77+
"ruff>=0.12.9",
7978
]
8079

81-
[tool.hatch.metadata]
82-
allow-direct-references = true
80+
[[tool.uv.index]]
81+
name = "testpypi"
82+
url = "https://test.pypi.org/simple/"
83+
publish-url = "https://test.pypi.org/legacy/"
84+
explicit = true
8385

8486
[tool.hatch.build.targets.wheel]
8587
packages = ["src/peplum"]

requirements-dev.lock

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

requirements.lock

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

0 commit comments

Comments
 (0)