-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
54 lines (38 loc) · 1.54 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
54
PY_FILES= find . -type f -not -path '*/\.*' | grep -i '.*[.]py$$' 2> /dev/null
DOC_FILES= find . -type f -not -path '*/\.*' | grep -i '.*[.]rst\$\|.*[.]md\$\|.*[.]css\$\|.*[.]py\$\|mkdocs\.yml\|CHANGES\|TODO\|.*conf\.py' 2> /dev/null
SHELL := /bin/bash
entr_warn:
@echo "----------------------------------------------------------"
@echo " ! File watching functionality non-operational ! "
@echo " "
@echo "Install entr(1) to automatically run tasks on file change."
@echo "See https://eradman.com/entrproject/ "
@echo "----------------------------------------------------------"
test:
poetry run py.test $(test)
start:
$(MAKE) test; poetry run ptw .
watch_test:
if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) test; else $(MAKE) test entr_warn; fi
build_docs:
$(MAKE) -C docs html
start_docs:
$(MAKE) -C docs start
design_docs:
$(MAKE) -C docs design
ruff_format:
poetry run ruff format .
ruff:
ruff .
watch_ruff:
if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) ruff; else $(MAKE) ruff entr_warn; fi
mypy:
poetry run mypy `${PY_FILES}`
watch_mypy:
if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) mypy; else $(MAKE) mypy entr_warn; fi
format_markdown:
prettier --parser=markdown -w *.md docs/*.md docs/**/*.md CHANGES
monkeytype_create:
poetry run monkeytype run `poetry run which py.test`
monkeytype_apply:
poetry run monkeytype list-modules | xargs -n1 -I{} sh -c 'poetry run monkeytype apply {}'