-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (35 loc) · 1.19 KB
/
Makefile
File metadata and controls
48 lines (35 loc) · 1.19 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
.PHONY: help install install-dev test test-quick lint format type-check clean build docs example-docs build-all-docs serve-docs serve-examples ci-test prepare-release generate-badges
PYTHON ?= python3
install:
pip install .
install-dev:
pip install -e .[dev]
test:
pytest --cov=chizhik_api --cov-report=xml --cov-report=html --cov-report=term-missing
test-quick:
pytest --tb=short --color=yes
lint:
$(PYTHON) -m flake8 --max-line-length=100 chizhik_api/ tests/
$(PYTHON) -m black --check chizhik_api/ tests/
$(PYTHON) -m isort --profile black --line-length 100 --check-only chizhik_api/ tests/
type-check:
$(PYTHON) -m mypy chizhik_api/
format:
black chizhik_api/ tests/
isort --profile black --line-length 100 chizhik_api/ tests/
clean:
rm -rf build/ dist/ *.egg-info/
rm -rf docs/_build/ examples/docs/_build/
rm -rf htmlcov/ .coverage coverage.xml coverage.svg
rm -rf .pytest_cache/
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete
build: clean
python -m build
build-install:
$(MAKE) build
$(MAKE) install
docs:
cd docs && sphinx-build -b html source _build/html
serve-docs:
cd docs/_build/html && python -m http.server 8000