-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (39 loc) · 999 Bytes
/
Makefile
File metadata and controls
48 lines (39 loc) · 999 Bytes
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
.PHONY: help install generate clean lint format test build
# Default target
help:
@echo "Available targets:"
@echo " install - Install dependencies using poetry"
@echo " generate - Generate gRPC code from proto files"
@echo " clean - Clean generated files"
@echo " lint - Run linting tools"
@echo " format - Format code using black and isort"
@echo " test - Run tests"
@echo " build - Build the package"
# Install dependencies
install:
poetry install
# Generate gRPC code
generate:
poetry run python scripts/generate.py
# Clean generated files
clean:
rm -rf generated/
rm -rf dist/
rm -rf .pytest_cache/
rm -rf htmlcov/
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
# Run linting
lint:
poetry run flake8 scripts/
poetry run mypy scripts/
# Format code
format:
poetry run black scripts/
poetry run isort scripts/
# Run tests
test:
poetry run pytest
# Build package
build: generate
poetry build