-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (48 loc) · 1.48 KB
/
Makefile
File metadata and controls
64 lines (48 loc) · 1.48 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
# Makefile for Dexalot Python SDK
# Run from the repository root. Uses local .venv managed by uv.
# Setup: uv venv && uv sync --group dev
PYTHON := .venv/bin/python
PYTEST := .venv/bin/pytest
RUFF := .venv/bin/ruff
MYPY := .venv/bin/mypy
MYPY_CONFIG := --config-file mypy.ini
.PHONY: setup test cov cov-file int int-file lint lint-fix format mypy typecheck clean docs-serve docs-build
setup:
uv venv && uv sync --group dev
test:
PYTHONPATH=.:./src $(PYTEST) tests/unit
cov:
PYTHONPATH=.:./src $(PYTEST) --cov=src --cov-report=term-missing tests/unit
int:
PYTHONPATH=.:./src $(PYTEST) tests/integration -v -s
int-file:
@if [ -z "$(FILE)" ]; then \
echo "Error: FILE argument is required. Usage: make int-file FILE=tests/integration/test_01_readonly.py"; \
exit 1; \
fi
PYTHONPATH=.:./src $(PYTEST) $(FILE) -v -s
# Usage: make cov-file FILE=tests/unit/core/test_clob.py
cov-file:
@if [ -z "$(FILE)" ]; then \
echo "Error: FILE argument is required. Usage: make cov-file FILE=tests/unit/core/test_clob.py"; \
exit 1; \
fi
PYTHONPATH=.:./src $(PYTEST) --cov=src --cov-report=term-missing $(FILE)
lint:
$(RUFF) check .
lint-fix:
$(RUFF) check . --fix
format:
$(RUFF) format .
mypy:
$(MYPY) $(MYPY_CONFIG) --follow-imports=silent
typecheck: mypy
docs-serve:
uv run --group docs zensical serve
docs-build:
uv run --group docs zensical build
clean:
rm -rf .pytest_cache
rm -rf .coverage
rm -rf htmlcov
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true