Makefile 995 Bytes
Newer Older
1
.PHONY: quality_checks quality style fixup test test-examples docs
2
3
4

# Check that source code meets quality standards

5
quality_checks:
6
	flake8 examples templates tests src utils
7
	python utils/check_copies.py
8
	python utils/check_repo.py
9

10
11
12
13
14
15
quality:
	black --check examples templates tests src utils
	isort --check-only examples templates tests src utils
	${MAKE} quality_checks

# Format source code automatically and check is there are any problems left that need manual fixing
16
17

style:
18
	black examples templates tests src utils
19
	isort examples templates tests src utils
20

21
22
fixup: style quality_checks

23
24
25
26
27
# Make marked copies of snippets of codes conform to the original

fix-copies:
	python utils/check_copies.py --fix_and_overwrite

28
29
30
31
32
33
34
35
36
# Run tests for the library

test:
	python -m pytest -n auto --dist=loadfile -s -v ./tests/

# Run tests for examples

test-examples:
	python -m pytest -n auto --dist=loadfile -s -v ./examples/
37
38
39
40
41

# Check that docs can build

docs:
	cd docs && make html SPHINXOPTS="-W"