-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (48 loc) · 1.71 KB
/
Makefile
File metadata and controls
57 lines (48 loc) · 1.71 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
.PHONY: help install lint format check test clean docs-serve docs-build
help:
@echo "Memorizz Development Commands:"
@echo ""
@echo " make install Install package in editable mode with dev dependencies"
@echo " make lint Run linting (flake8, check syntax)"
@echo " make format Format code with black and isort"
@echo " make check Run lint + format check (pre-commit)"
@echo " make test Run tests"
@echo " make docs-serve Launch mkdocs with hot reload"
@echo " make docs-build Build the static documentation site"
@echo " make clean Clean up generated files"
@echo ""
install:
pip install -e ".[dev]"
pip install pre-commit black flake8 isort
pre-commit install
lint:
@echo "Running syntax check..."
@find src/memorizz -name "*.py" ! -name "*backup*" ! -name "*original*" -exec python -m py_compile {} \;
@echo "✓ Syntax check passed"
@echo ""
@echo "Running flake8..."
@flake8 src/memorizz --max-line-length=120 --extend-ignore=E203,E501 --exclude='*backup*,*original*' || true
@echo ""
format:
@echo "Formatting with black..."
@black src/memorizz
@echo ""
@echo "Sorting imports with isort..."
@isort src/memorizz --profile black
@echo ""
@echo "✓ Code formatted"
check:
@echo "Running pre-commit checks..."
@pre-commit run --all-files || true
test:
pytest tests/ -v
clean:
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete
find . -type f -name "*.pyo" -delete
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
docs-serve:
mkdocs serve
docs-build:
mkdocs build --strict