-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
118 lines (95 loc) · 2.92 KB
/
Makefile
File metadata and controls
118 lines (95 loc) · 2.92 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Makefile for THEMAP project
.PHONY: help install install-dev install-all test test-unit test-integration test-distance test-fast test-coverage lint lint-check format format-check type-check ci clean docs docs-serve docs-build docs-clean docs-deploy
# Default target
help:
@echo "Available targets:"
@echo ""
@echo "Installation:"
@echo " install - Install package in development mode"
@echo " install-dev - Install with dev + test dependencies"
@echo " install-all - Install with all optional dependencies"
@echo ""
@echo "Testing:"
@echo " test - Run all tests"
@echo " test-unit - Run unit tests only"
@echo " test-integration - Run integration tests only"
@echo " test-distance - Run distance module tests only"
@echo " test-fast - Run fast tests (exclude slow tests)"
@echo " test-coverage - Run tests with coverage report"
@echo ""
@echo "Code Quality:"
@echo " lint - Lint and auto-fix with ruff"
@echo " lint-check - Lint without fixing (CI mode)"
@echo " format - Format code with ruff"
@echo " format-check - Check formatting without changes (CI mode)"
@echo " type-check - Run type checking with mypy"
@echo " ci - Run all CI checks (lint, format, type-check, test-fast)"
@echo ""
@echo "Documentation:"
@echo " docs - Build and serve documentation locally"
@echo " docs-serve - Serve documentation with live reload"
@echo " docs-build - Build static documentation"
@echo " docs-clean - Clean documentation artifacts"
@echo " docs-deploy - Deploy documentation to GitHub Pages"
@echo ""
@echo "Cleanup:"
@echo " clean - Clean up build and cache artifacts"
# Installation targets
install:
uv pip install -e .
install-dev:
uv pip install -e ".[dev,test]"
install-all:
uv pip install -e ".[all,test,dev,docs]"
# Testing targets
test:
python run_tests.py all
test-unit:
python run_tests.py unit
test-integration:
python run_tests.py integration
test-distance:
python run_tests.py distance
test-fast:
python run_tests.py fast
test-coverage:
python run_tests.py coverage
# Code quality targets
lint:
ruff check --fix .
lint-check:
ruff check .
format:
ruff format .
format-check:
ruff format --check .
type-check:
mypy -p themap
# CI: replicates the exact checks run in GitHub Actions
ci: lint-check format-check type-check test-fast docs-build
# Documentation targets
docs: docs-serve
docs-serve:
python build_docs.py serve
docs-build:
mkdocs build --strict
docs-clean:
python build_docs.py clean
docs-deploy:
mkdocs gh-deploy
# Cleanup
clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
rm -rf .coverage/ .coverage
rm -rf htmlcov/
rm -rf coverage.xml
rm -rf .pytest_cache/
rm -rf .mypy_cache/
rm -rf .ruff_cache/
rm -rf site/
rm -rf .mkdocs_cache/
rm -rf feature_cache/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete