Skip to content

Commit

Permalink
Replace rye with uv
Browse files Browse the repository at this point in the history
This assumes uv v0.3
  • Loading branch information
lithammer committed Aug 21, 2024
1 parent 15fcd5e commit 42bc2fd
Show file tree
Hide file tree
Showing 5 changed files with 196 additions and 53 deletions.
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@ VIRTUALENV = .venv
all: build

compile_commands.json: build
bear -- rye run python setup.py build_ext -qf
bear -- uv run -- python setup.py build_ext -qf

build: $(VIRTUALENV)/requirements.lock
build: $(VIRTUALENV)/uv.lock

$(VIRTUALENV)/requirements.lock: requirements.lock requirements-dev.lock pyproject.toml
rye sync
$(VIRTUALENV)/uv.lock: uv.lock pyproject.toml
uv sync
@cp $< $@

.PHONY: test
test: build
rye test -v
uv run -- pytest -v

.PHONY: lint
lint: build
rye run lint
uv run -- ruff check --diff $(CURDIR)
uv run -- ruff format --check --diff $(CURDIR)
uv run -- mypy $(CURDIR)
clang-format --dry-run --Werror --style=file src/jump/*.c

.PHONY: clean
Expand Down
9 changes: 1 addition & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,14 @@ test-requires = "pytest"
[tool.cibuildwheel.linux]
archs = ["auto", "aarch64"]

[tool.rye]
managed = true
[tool.uv]
dev-dependencies = [
"mypy",
"ruff",
"pytest",
"setuptools", # Required for `python setup.py build_ext`
]

[tool.rye.scripts]
lint = { chain = ["lint:ruff-check", "lint:mypy", "lint:ruff-format"] }
"lint:ruff-check" = "ruff check --diff ."
"lint:ruff-format" = "ruff format --check --diff ."
"lint:mypy" = "mypy ."

[tool.mypy]
check_untyped_defs = true
ignore_missing_imports = true
Expand Down
29 changes: 0 additions & 29 deletions requirements-dev.lock

This file was deleted.

10 changes: 0 additions & 10 deletions requirements.lock

This file was deleted.

Loading

0 comments on commit 42bc2fd

Please sign in to comment.