-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
57 lines (41 loc) · 1.02 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
55
56
57
.PHONY: all clean check lint type_check test test_slow docs_run docs_generate docs_copy_assets docs_build
all: check
clean:
rm -rf __pycache__
rm -rf .pytest_cache
rm -rf .ruff_cache
rm -rf dist
check: lint type_check
lint:
ruff check ./src
fix:
ruff check --fix ./src
type_check:
pyright ./src
check_format:
ruff format --check ./src
format:
ruff format ./src
# fmt:
# isort ./src
# autopep8 --in-place --recursive ./src
test_all: test test_slow
test:
pytest -k "not slow"
test_slow:
pytest -k "slow"
docs_run:
@echo "URL: http://localhost:8080/communex"
pdoc -n --docformat google ./src/communex
docs_generate:
pdoc communex \
--docformat google \
--output-directory ./docs/_build \
--logo assets/logo.png \
--favicon assets/favicon.ico \
--logo-link https://github.com/agicommies/communex \
--edit-url communex=https://github.com/agicommies/communex/blob/main/src/communex/
docs_copy_assets:
mkdir -p ./docs/_build/assets
cp -r ./docs/assets ./docs/_build/
docs_build: docs_generate docs_copy_assets