-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (45 loc) · 1.49 KB
/
Makefile
File metadata and controls
62 lines (45 loc) · 1.49 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.PHONY: help install test lint format type-check clean build publish dev-install
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 dependencies
poetry install
dev-install: ## Install with development dependencies
poetry install --extras dev
test: ## Run tests
poetry run pytest
test-cov: ## Run tests with coverage
poetry run pytest --cov=phagetrix --cov-report=html --cov-report=term
lint: ## Run linting tools
poetry run black --check .
poetry run isort --check-only .
poetry run flake8 src tests
format: ## Format code
poetry run black .
poetry run isort .
type-check: ## Run type checking
poetry run mypy src
pre-commit: ## Run pre-commit hooks
poetry run pre-commit run --all-files
clean: ## Clean 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/
rm -rf .tox/
build: clean ## Build package
poetry build
publish: build ## Publish to PyPI
poetry publish
check: lint test ## Run all checks
ci: check ## Run CI pipeline locally
tox: ## Run tox tests
tox
example: ## Run example
poetry run phagetrix examples/sample.phagetrix
bump-version: ## Bump version (usage: make bump-version VERSION=0.2.4)
@if [ -z "$(VERSION)" ]; then echo "Usage: make bump-version VERSION=0.2.4"; exit 1; fi
python scripts/bump_version.py $(VERSION)