-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
55 lines (43 loc) · 1.06 KB
/
Makefile
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
# Makefile for Project Automation
.PHONY: install lint type-check test docs serve-docs build all clean
# Variables
PACKAGE_NAME = brickllm
TEST_DIR = tests
# Default target
all: lint type-check test docs
# Install project dependencies
install:
poetry install
# Linting and Formatting Checks
lint:
poetry run ruff check $(PACKAGE_NAME) $(TEST_DIR)
poetry run black --check $(PACKAGE_NAME) $(TEST_DIR)
poetry run isort --check-only $(PACKAGE_NAME) $(TEST_DIR)
# Type Checking with MyPy
type-check:
poetry run mypy $(PACKAGE_NAME) $(TEST_DIR)
# Run Tests with Coverage
test:
poetry run pytest --cov=$(PACKAGE_NAME) --cov-report=xml $(TEST_DIR)/
# Build Documentation using MkDocs
docs:
poetry run mkdocs build
# Serve Documentation Locally
serve-docs:
poetry run mkdocs serve
# Run Pre-Commit Hooks
pre-commit:
poetry run pre-commit run --all-files
# Clean Up Generated Files
clean:
rm -rf dist/
rm -rf build/
rm -rf *.egg-info
rm -rf htmlcov/
rm -rf .mypy_cache/
rm -rf .pytest_cache/
rm -rf .ruff_cache/
rm -rf site/
# Build the Package
build:
poetry build