49 lines
1.3 KiB
Makefile
49 lines
1.3 KiB
Makefile
.PHONY: help install install-dev test test-cov lint format type-check clean build publish
|
|
|
|
help: ## Show this help message
|
|
@echo "Available commands:"
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
|
|
|
install: ## Install the package in development mode
|
|
uv pip install -e .
|
|
|
|
install-dev: ## Install the package with development dependencies
|
|
uv pip install -e ".[dev]"
|
|
|
|
test: ## Run tests
|
|
uv run pytest
|
|
|
|
test-cov: ## Run tests with coverage
|
|
uv run pytest --cov=src --cov-report=html --cov-report=term-missing
|
|
|
|
lint: ## Run linting checks
|
|
uv run ruff check src/ tests/ example/
|
|
|
|
format: ## Format code
|
|
uv run ruff format src/ tests/ example/
|
|
|
|
type-check: ## Run type checking
|
|
uv run mypy src/
|
|
|
|
clean: ## Clean up build artifacts
|
|
rm -rf build/
|
|
rm -rf dist/
|
|
rm -rf *.egg-info/
|
|
rm -rf .pytest_cache/
|
|
rm -rf .coverage
|
|
rm -rf htmlcov/
|
|
rm -rf .mypy_cache/
|
|
|
|
build: ## Build the package
|
|
uv run python -m build
|
|
|
|
publish: ## Publish to PyPI (requires authentication)
|
|
uv run python -m twine upload dist/*
|
|
|
|
pre-commit-install: ## Install pre-commit hooks
|
|
uv run pre-commit install
|
|
|
|
pre-commit-run: ## Run pre-commit on all files
|
|
uv run pre-commit run --all-files
|
|
|
|
check-all: lint type-check test ## Run all checks (lint, type-check, test)
|