-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (27 loc) · 973 Bytes
/
Makefile
File metadata and controls
37 lines (27 loc) · 973 Bytes
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
.PHONY: all clean docs docs-serve lint lint-fix type test test-cov
CMD:=poetry run
PYMODULE:=astoria
TESTS:=tests
EXTRACODE:=docs/_code
SPHINX_ARGS:=docs/ docs/_build -nWE
PYTEST_FLAGS:=-vv
EXCLUDED_PATHS:=tests/data/execute_code
all: type test lint
docs:
$(CMD) sphinx-build $(SPHINX_ARGS)
docs-serve:
$(CMD) sphinx-autobuild $(SPHINX_ARGS)
lint:
$(CMD) ruff $(PYMODULE) $(TESTS) $(EXTRACODE) --exclude $(EXCLUDED_PATHS)
$(CMD) black --check $(PYMODULE) $(TESTS) $(EXTRACODE) --exclude $(EXCLUDED_PATHS)
lint-fix:
$(CMD) ruff --fix $(PYMODULE) $(TESTS) $(EXTRACODE) --exclude $(EXCLUDED_PATHS)
$(CMD) black $(PYMODULE) $(TESTS) $(EXTRACODE) --exclude $(EXCLUDED_PATHS)
type:
$(CMD) mypy $(PYMODULE) $(TESTS) $(EXTRACODE) --exclude $(EXCLUDED_PATHS)
test:
$(CMD) pytest $(PYTEST_FLAGS) --cov=$(PYMODULE) $(TESTS)
test-cov:
$(CMD) pytest $(PYTEST_FLAGS) --cov=$(PYMODULE) $(TESTS) --cov-report html
clean:
git clean -Xdf # Delete all files in .gitignore