-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
110 lines (87 loc) · 2.37 KB
/
Makefile
File metadata and controls
110 lines (87 loc) · 2.37 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
.PHONY: all format lint test tests integration_tests help clean
# Default target
all: help
######################
# TESTING
######################
test tests:
hatch run test
test-cov:
hatch run test-cov
test-fast:
hatch run test-fast
integration_tests:
hatch run pytest tests/integration/ -v
test-all:
hatch run pytest tests/ -v
######################
# LINTING AND FORMATTING
######################
lint:
hatch run lint
format:
hatch run ruff format src/ tests/
hatch run ruff check --select I --fix src/ tests/
typecheck:
hatch run typecheck
######################
# DEVELOPMENT
######################
install:
pip install hatch
hatch env create
install-dev:
pip install hatch
hatch env create
hatch run pre-commit install
hatch run pre-commit install --hook-type commit-msg
clean:
hatch env prune
rm -rf .pytest_cache .mypy_cache .ruff_cache htmlcov .coverage dist
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete
######################
# BUILD & PUBLISH
######################
build:
hatch build
publish:
hatch publish
######################
# DOCUMENTATION
######################
docs-serve:
hatch run docs:serve
docs-build:
hatch run docs:build
######################
# HELP
######################
help:
@echo 'Locus Development Commands'
@echo '========================='
@echo ''
@echo 'Testing:'
@echo ' make test - run unit tests'
@echo ' make test-cov - run tests with coverage'
@echo ' make test-fast - run tests in parallel'
@echo ' make integration_tests - run integration tests'
@echo ' make test-all - run all tests'
@echo ''
@echo 'Linting & Formatting:'
@echo ' make lint - run linters (ruff, mypy)'
@echo ' make format - format code with ruff'
@echo ' make typecheck - run mypy type checking'
@echo ''
@echo 'Development:'
@echo ' make install - install hatch and create env'
@echo ' make install-dev - install with pre-commit hooks'
@echo ' make clean - remove build artifacts and envs'
@echo ''
@echo 'Build & Publish:'
@echo ' make build - build package'
@echo ' make publish - publish to PyPI'
@echo ''
@echo 'Documentation:'
@echo ' make docs-serve - serve docs locally'
@echo ' make docs-build - build documentation'