-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
80 lines (63 loc) · 2.14 KB
/
Makefile
File metadata and controls
80 lines (63 loc) · 2.14 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
.PHONY: help test install clean build release dev-install lint format check sync-templates test-e2e test-e2e-sdk test-integration
# Default target
help:
@echo "Available targets:"
@echo " install Install the package"
@echo " dev-install Install for development (with test dependencies)"
@echo " test Run test suite"
@echo " test-cov Run tests with coverage"
@echo " lint Run linters"
@echo " format Format code with black"
@echo " clean Clean build artifacts"
@echo " build Build distribution packages"
@echo " release Create a new release"
@echo " check Run all checks (lint + test)"
@echo " sync-templates Sync .claude/ into src/ templates"
@echo " test-e2e Run e2e artifact contract tests (no LLM, fast)"
@echo " test-e2e-sdk Run e2e tests with real Claude SDK (slow, needs API key)"
@echo " test-integration Run integration tests (excludes slow SDK tests)"
# Installation
install:
pip install -e .
dev-install:
pip install -e ".[dev,ssl]"
# Testing
test:
pytest
test-cov:
pytest --cov=mapify_cli --cov-report=html --cov-report=term
test-watch:
pytest-watch
# E2E / Integration testing
test-e2e:
pytest tests/integration/test_e2e_artifact_contracts.py -v
test-e2e-sdk:
pytest tests/integration/test_e2e_claude_sdk.py -v -m slow
test-integration:
pytest tests/integration/ -v -m "not slow"
# Code quality
lint:
ruff check src/ tests/
mypy src/
format:
black src/ tests/
ruff check --fix src/ tests/
check: lint test
sync-templates:
./scripts/sync-templates.sh
# Build and release
clean:
rm -rf build/ dist/ *.egg-info/
rm -rf .pytest_cache/ .coverage htmlcov/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
build: clean
python -m build
release: build
@echo "Ready to upload to PyPI with: twine upload dist/*"
@echo "Don't forget to tag the release: git tag -a v$(shell python -c "import tomli; print(tomli.load(open('pyproject.toml', 'rb'))['project']['version'])") -m 'Release version ...'"
# Quick test of the CLI
test-cli:
@echo "Testing CLI installation..."
python -m mapify_cli --version
python -m mapify_cli check