-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (40 loc) · 1.72 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
.PHONY: format lint unit-test integration-test performance-test cmd-grammar clean
ANTLR=antlr
format:
black .
isort .
lint:
flake8 .
mypy .
unit-test:
pytest -m "unit" --cov=labtasker --cov-report=term-missing --cov-report=xml
integration-test:
pytest -m "integration" --cov=labtasker --cov-report=term-missing --cov-report=xml
e2e-test:
pytest -m "e2e" --cov=labtasker --cov-report=term-missing --cov-report=xml
performance-test:
pytest -m "integration and benchmark" --benchmark-columns="rounds, iterations, min, mean, max"
cmd-grammar:
$(ANTLR) -Dlanguage=Python3 labtasker/client/core/cmd_parser/LabCmdLexer.g4
$(ANTLR) -Dlanguage=Python3 labtasker/client/core/cmd_parser/LabCmd.g4
clean:
# Python cache files
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -name "*.pyc" -delete
find . -name "*.pyo" -delete
find . -name "*.pyd" -delete
# Test and coverage files
find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".coverage" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "htmlcov" -exec rm -rf {} + 2>/dev/null || true
rm -f .coverage coverage.xml cov.xml .coverage.* 2>/dev/null || true
# Build and distribution files
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "dist" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "build" -exec rm -rf {} + 2>/dev/null || true
# Cache directories
find . -type d -name ".mypy_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".ruff_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".hypothesis" -exec rm -rf {} + 2>/dev/null || true
# Documentation build
rm -rf docs/site/ 2>/dev/null || true