forked from pyvista/pyvista
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (52 loc) · 1.98 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
58
59
60
61
62
63
64
65
66
67
68
69
# Simple makefile to simplify repetitive build env management tasks under posix
# Directories to run style checks against
CODE_DIRS ?= doc examples examples_flask pyvista tests
# Files in top level directory
CODE_FILES ?= *.py *.rst *.md
CODESPELL_SKIP ?= "*.pyc,*.txt,*.gif,*.png,*.jpg,*.ply,*.vtk,*.vti,*.vtu,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,doc/_build/*,./doc/images/*,./dist/*,*~,.hypothesis*,./doc/examples/*,*.mypy_cache/*,*cover,./tests/tinypages/_build/*,*/_autosummary/*"
CODESPELL_IGNORE ?= "ignore_words.txt"
# doctest modules must be off screen to avoid plotting everything
doctest-modules: export PYVISTA_OFF_SCREEN = True
doctest-modules-local-namespace: export PYVISTA_OFF_SCREEN = True
stylecheck: codespell pydocstyle lint
format: isort stylize
codespell:
@echo "Running codespell"
@codespell $(CODE_DIRS) $(CODE_FILES) -S $(CODESPELL_SKIP) -I $(CODESPELL_IGNORE)
pydocstyle:
@echo "Running pydocstyle"
@pydocstyle pyvista --match='(?!coverage).*.py'
doctest-modules:
@echo "Runnnig module doctesting"
pytest -v --doctest-modules pyvista
doctest-modules-local-namespace:
@echo "Running module doctesting using docstring local namespace"
python tests/check_doctest_names.py
example-coverage:
python -m ansys.tools.example_coverage -f pyvista
coverage:
@echo "Running coverage"
@pytest -v --cov pyvista
coverage-xml:
@echo "Reporting XML coverage"
@pytest -v --cov pyvista --cov-report xml
coverage-html:
@echo "Reporting HTML coverage"
@pytest -v --cov pyvista --cov-report html
coverage-docs:
@echo "Reporting documentation coverage"
@make -C doc html SPHINXOPTS="-Q" -b coverage
@cat doc/_build/coverage/python.txt
mypy:
@echo "Running mypy static type checking"
mypy pyvista/core/ --no-incremental
mypy pyvista/themes.py --no-incremental
lint:
@echo "Linting with flake8"
@flake8 $(CODE_DIRS) *.py
isort:
@echo "Formatting with isort"
isort .
stylize:
@echo "Formatting"
black .