-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate away from Tox to UV and Make (#84)
* Migrate away from Tox to UV and Make * Add --frozen to uv run * Combine optional deps into dev
- Loading branch information
1 parent
e27da3a
commit 37878a4
Showing
8 changed files
with
1,518 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
PROJECT := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) | ||
|
||
SRC := $(PROJECT)src | ||
TESTS := $(PROJECT)tests | ||
ALL := $(SRC) $(TESTS) | ||
|
||
export PYTHONPATH = $(PROJECT):$(PROJECT)/lib:$(SRC) | ||
export PY_COLORS=1 | ||
|
||
# Update uv.lock with the latest deps | ||
lock: | ||
uv lock --upgrade --no-cache | ||
|
||
# Generate requirements.txt from pyproject.toml | ||
requirements: | ||
uv export --frozen --no-hashes --format=requirements-txt -o requirements.txt | ||
|
||
# Lint the code | ||
lint: | ||
uv run --frozen --isolated --extra dev \ | ||
codespell $(PROJECT) \ | ||
--skip $(PROJECT).git \ | ||
--skip $(PROJECT).venv \ | ||
--skip $(PROJECT)build \ | ||
--skip $(PROJECT)lib | ||
uv run --frozen --isolated --extra dev \ | ||
ruff check $(ALL) | ||
uv run --frozen --isolated --extra dev \ | ||
ruff format --check --diff $(ALL) | ||
|
||
# Run static checks | ||
static: | ||
uv run --frozen --isolated --extra dev pyright | ||
|
||
# Format the code | ||
fmt: | ||
uv run --frozen --isolated --extra dev \ | ||
ruff check --fix-only $(ALL) | ||
uv run --frozen --isolated --extra dev \ | ||
ruff format $(ALL) | ||
|
||
# Run unit tests | ||
unit: | ||
uv run --frozen --isolated --extra dev \ | ||
coverage run \ | ||
--source=$(SRC) \ | ||
-m pytest \ | ||
--tb native \ | ||
--verbose \ | ||
--capture=no \ | ||
$(TESTS)/unit \ | ||
$(ARGS) | ||
uv run --frozen --isolated --extra dev \ | ||
coverage report | ||
|
||
# Run integration tests | ||
integration: | ||
uv run --frozen --isolated --extra dev \ | ||
pytest \ | ||
--verbose \ | ||
--exitfirst \ | ||
--capture=no \ | ||
--tb native \ | ||
--log-cli-level=INFO \ | ||
$(TESTS)/integration \ | ||
$(ARGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ requires: | |
interface: mimir_cluster | ||
limit: 1 | ||
|
||
|
||
storage: | ||
data: | ||
type: filesystem | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.