File size: 741 Bytes
3a04f6a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | .PHONY: build commit license quality style test
check_dirs := scripts src tests tests_v1
RUN := $(shell command -v uv >/dev/null 2>&1 && echo "uv run" || echo "")
BUILD := $(shell command -v uv >/dev/null 2>&1 && echo "uv build" || echo "python -m build")
TOOL := $(shell command -v uv >/dev/null 2>&1 && echo "uvx" || echo "")
build:
$(BUILD)
commit:
$(TOOL) pre-commit install
$(TOOL) pre-commit run --all-files
license:
$(RUN) python3 tests/check_license.py $(check_dirs)
quality:
$(TOOL) ruff check $(check_dirs)
$(TOOL) ruff format --check $(check_dirs)
style:
$(TOOL) ruff check $(check_dirs) --fix
$(TOOL) ruff format $(check_dirs)
test:
WANDB_DISABLED=true $(RUN) pytest -vv --import-mode=importlib tests/ tests_v1/
|