Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
86 lines (67 loc) · 2.47 KB
/
Copy pathMakefile
File metadata and controls
86 lines (67 loc) · 2.47 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
.PHONY: help install dev test test-cov lint format format-check typecheck docs-check check clean build package-check release-check publish hooks
VENV_BIN ?= .venv/bin
PYTHON ?= $(if $(wildcard $(VENV_BIN)/python),$(VENV_BIN)/python,python)
help:
@echo "eggcalc - Development Commands"
@echo ""
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " install Install package"
@echo " dev Install with dev dependencies (no hooks)"
@echo " test Run tests"
@echo " test-cov Run tests with coverage"
@echo " lint Run linter (ruff)"
@echo " format Format code (black)"
@echo " format-check Check formatting (black --check)"
@echo " typecheck Run type checker (mypy)"
@echo " docs-check Check generated documentation drift"
@echo " check Full correctness (lint + format-check + typecheck + docs-check + test)"
@echo " clean Remove build artifacts"
@echo " build Build distribution packages"
@echo " package-check Validate wheel, sdist, and release surfaces"
@echo " release-check Full correctness + package validation"
@echo " publish Upload to PyPI via twine"
@echo " hooks Install pre-commit hooks (optional)"
install:
pip install -e .
dev:
pip install -e ".[dev]"
test:
$(PYTHON) -m pytest tests/ -v
test-cov:
$(PYTHON) -m pytest tests/ --cov=eggcalc --cov-report=term-missing --cov-report=html
lint:
$(PYTHON) -m ruff check eggcalc tests
format:
$(PYTHON) -m black eggcalc tests
format-check:
$(PYTHON) -m black --check eggcalc tests
typecheck:
$(PYTHON) -m mypy eggcalc --ignore-missing-imports
$(PYTHON) -m mypy --strict --follow-imports=silent --ignore-missing-imports tests/typing/consumer.py
generate-docs:
python3 scripts/generate_mcp_docs.py
docs-check:
$(PYTHON) scripts/generate_mcp_docs.py --check
check: lint format-check typecheck docs-check
$(PYTHON) build_single.py --validate
$(PYTHON) -m pytest tests/ -v
@echo "All checks passed!"
clean:
rm -rf build/ dist/ *.egg-info .pytest_cache .mypy_cache .ruff_cache
rm -rf htmlcov/ .coverage coverage.xml
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
build: clean
$(PYTHON) -m build
package-check: build
$(PYTHON) -m twine check dist/*
$(PYTHON) scripts/smoke_release_surfaces.py
release-check: check package-check
@echo "Release check passed!"
publish: release-check
twine upload dist/*
hooks:
pip install pre-commit
pre-commit install