forked from arpitg1304/forge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (44 loc) · 1.02 KB
/
Makefile
File metadata and controls
55 lines (44 loc) · 1.02 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
.PHONY: install install-dev test lint typecheck format clean venv
# Create virtual environment
venv:
python -m venv .venv
@echo "Virtual environment created. Activate with: source .venv/bin/activate"
# Install package in editable mode
install:
pip install -e .
# Install with all optional dependencies for development
install-dev:
pip install -e ".[all,dev]"
# Run tests
test:
pytest tests/ -v
# Run tests with coverage
test-cov:
pytest tests/ -v --cov=forge --cov-report=term-missing --cov-report=html
# Run linter
lint:
ruff check forge/ tests/
# Run type checker
typecheck:
mypy forge/
# Format code
format:
ruff format forge/ tests/
ruff check --fix forge/ tests/
# Clean build artifacts
clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
rm -rf .pytest_cache/
rm -rf .mypy_cache/
rm -rf .ruff_cache/
rm -rf htmlcov/
rm -rf .coverage
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
# Build package
build:
pip install build
python -m build
# Run all checks
check: lint typecheck test