Makefile 1.28 KB
Newer Older
1
.PHONY: help setup format lint test clean bump build publish
one's avatar
one committed
2
3
4
5
6
7
8
9

help:
	@echo "Available targets:"
	@echo "  make setup           - Create venv, install all dependencies, and set up git hooks"
	@echo "  make format          - Auto-fix and format code (ruff)"
	@echo "  make lint            - Check code style and errors without modifying files (ruff)"
	@echo "  make test            - Run all unit tests (pytest)"
	@echo "  make clean           - Remove build caches and the virtual environment"
10
11
12
	@echo "  make bump part=X     - Bump version (patch/minor/major or set X.Y.Z)"
	@echo "  make build           - Build wheel and sdist into dist/"
	@echo "  make publish         - Upload dist/ to PyPI (requires UV_PUBLISH_TOKEN)"
one's avatar
one committed
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

setup:
	@echo ">> Initializing virtual environment and installing dependencies..."
	uv sync --group dev
	@echo ">> Installing pre-commit git hooks..."
	uvx pre-commit install

format:
	uv run ruff check --fix src/ tests/
	uv run ruff format src/ tests/

lint:
	uv run ruff check src/ tests/
	uv run ruff format --check src/ tests/

test:
	uv run pytest -v

clean:
	rm -rf .pytest_cache .ruff_cache .venv
	find src tests -type f -name "*.pyc" -delete
	find src tests -type d -name "__pycache__" -delete

bump:
37
38
39
40
41
42
43
	uv run python -m hytop._bump $(part)

build:
	uv build

publish:
	uv publish