Skip to content

Commit 122f2e6

Browse files
authored
🔀 Merge pull request #128 from davep/switch-to-uv
2 parents f0f07b5 + bb24e15 commit 122f2e6

File tree

6 files changed

+1646
-287
lines changed

6 files changed

+1646
-287
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ 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 }}
2828

29-
- name: Install Rye
30-
uses: eifinger/setup-rye@v4
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v6
3131
with:
3232
version: "latest"
3333

Makefile

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
app := hike
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 := hike
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,12 +37,12 @@ console: # Run the textual console
3337
# Setup/update packages the system requires.
3438
.PHONY: setup
3539
setup: # Set up the repository for development
36-
rye sync
40+
$(sync)
3741
$(run) pre-commit install
3842

3943
.PHONY: update
4044
update: # Update all dependencies
41-
rye sync --update-all
45+
$(sync) --update-all
4246

4347
.PHONY: resetup
4448
resetup: realclean # Recreate the virtual environment from scratch
@@ -90,20 +94,20 @@ publishdocs: clean-docs # Set up the docs for publishing
9094
##############################################################################
9195
# Package/publish.
9296
.PHONY: package
93-
package: # Package the library
94-
rye build
97+
package: clean-packaging # Package the library
98+
$(build)
9599

96100
.PHONY: spackage
97101
spackage: # Create a source package for the library
98-
rye build --sdist
102+
$(build) --sdist
99103

100104
.PHONY: testdist
101105
testdist: package # Perform a test distribution
102-
rye publish --yes --skip-existing --repository testpypi --repository-url https://test.pypi.org/legacy/
106+
$(publish) --index testpypi
103107

104108
.PHONY: dist
105109
dist: package # Upload to pypi
106-
rye publish --yes --skip-existing
110+
echo $(publish)
107111

108112
##############################################################################
109113
# Utility.

pyproject.toml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "hike"
3-
version = "1.1.2"
3+
version = "1.1.2.6"
44
description = "A Markdown browser for the terminal"
55
authors = [
66
{ name = "Dave Pearson", email = "[email protected]" }
@@ -16,7 +16,7 @@ dependencies = [
1616
]
1717
readme = "README.md"
1818
requires-python = ">= 3.10"
19-
license = { text = "GNU General Public License v3 or later (GPLv3+)" }
19+
license = "GPL-3.0-or-later"
2020
keywords = [
2121
"terminal",
2222
"tui",
@@ -34,7 +34,6 @@ classifiers = [
3434
"Intended Audience :: End Users/Desktop",
3535
"Intended Audience :: Information Technology",
3636
"Intended Audience :: Other Audience",
37-
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
3837
"Operating System :: MacOS",
3938
"Operating System :: Microsoft :: Windows :: Windows 10",
4039
"Operating System :: Microsoft :: Windows :: Windows 11",
@@ -64,12 +63,10 @@ Discussions = "https://github.com/davep/hike/discussions"
6463
hike = "hike.__main__:main"
6564

6665
[build-system]
67-
# https://github.com/astral-sh/rye/issues/1446
68-
requires = ["hatchling==1.26.3", "hatch-vcs"]
69-
# requires = ["hatchling"]
70-
build-backend = "hatchling.build"
66+
requires = ["uv_build>=0.8.11,<0.9.0"]
67+
build-backend = "uv_build"
7168

72-
[tool.rye]
69+
[tool.uv]
7370
managed = true
7471
dev-dependencies = [
7572
"mypy>=1.15.0",
@@ -79,15 +76,17 @@ dev-dependencies = [
7976
"mkdocs-material>=9.6.11",
8077
"markdown-exec>=1.10.3",
8178
"codespell>=2.4.1",
79+
"ruff>=0.12.9",
8280
]
8381

84-
[tool.hatch.metadata]
85-
allow-direct-references = true
86-
87-
[tool.hatch.build.targets.wheel]
88-
packages = ["src/hike"]
82+
[[tool.uv.index]]
83+
name = "testpypi"
84+
url = "https://test.pypi.org/simple/"
85+
publish-url = "https://test.pypi.org/legacy/"
86+
explicit = true
8987

9088
[tool.pyright]
9189
venvPath="."
9290
venv=".venv"
9391
exclude=[".venv"]
92+

requirements-dev.lock

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

0 commit comments

Comments
 (0)