-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (40 loc) · 1.48 KB
/
Makefile
File metadata and controls
51 lines (40 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
help:
@echo " \x1b[33;1mtest: \x1b[0mruns pytest"
@echo " \x1b[33;1mlint: \x1b[0mrun all hooks - lint and format code"
@echo "\x1b[33;1mset-up-hooks: \x1b[0mset up various git hooks"
@echo " \x1b[33;1mdev-install: \x1b[0minstall all packages required for development"
@echo " \x1b[33;1mhelp: \x1b[0mprints this"
lint:
@if command -v pre-commit >/dev/null 2>&1; then \
pre-commit run --all-files; \
pre-commit run --all-files --hook-stage manual pyright; \
elif docker compose ps --status running mcp 2>/dev/null | grep -q mcp; then \
docker compose exec -T -w /workspace mcp pre-commit run --all-files; \
docker compose exec -T -w /workspace mcp pre-commit run --all-files --hook-stage manual pyright; \
else \
echo "ERROR: Cannot run linters. Install pre-commit locally or start the MCP container (docker compose up -d mcp)." >&2; \
exit 1; \
fi
set-up-hooks:
cp hooks/pre-commit-docker.sh .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
test:
docker compose up --wait
pytest -vv ./tests/ --junit-xml=test-results/junit.xml $(ARGS)
docker compose down
dev-install:
pip install -r dev-requirements.txt
freeze-dev-requirements:
pip freeze > dev-requirements.txt
with-fastapi:
pip3 install -e .[fastapi]
with-django:
pip3 install -e .[django]
with-django2x:
pip3 install -e .[django2x]
with-drf:
pip3 install -e .[drf]
with-flask:
pip3 install -e .[flask]
build-docs:
rm -rf html && pdoc --html supertokens_python --template-dir docs-templates