-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
58 lines (45 loc) · 1.47 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
PACKAGE=geoptics
FIGURE_DIR=docs/figures
clean_egg-info:
rm -rf GeOptics.egg-info/
clean: clean_egg-info
# need the pycmd package
py.cleanup
rm -f *.xdot
rm -rf .cache/
rm -rf .pytest_cache/
distclean: clean
rm -rf .tox/
rm -rf .eggs/
html:
make clean_egg-info
cd docs && make html
# --------------------------------- tests ------------------------------------
check:
# work around "py.test ." not setting PYTHONPATH correctly
# http://stackoverflow.com/a/34140498/3565696
# python3 -m pytest tests/
# this one is recommended by
# http://docs.pytest.org/en/latest/goodpractices.html#integrating-with-setuptools-python-setup-py-test-pytest-runner
pytest -rs --doctest-modules -m "not script"
flake8 geoptics/ tests/ setup.py
vcheck:
pytest -v -rs --doctest-modules -m "not script"
flake8 geoptics/ tests/ setup.py
vvcheck:
pytest -vv -rs --doctest-modules -m "not script"
flake8 geoptics/ tests/ setup.py
coverage:
python3 setup.py test --addopts "--cov-report=term-missing:skip-covered --cov=geoptics"
fixtures:
PYTHONPATH=$(PYTHONPATH):. pytest --fixtures
pyreverse:
# -my to show module names
# -k to show only classes, not attributes or methods
pyreverse -my -k -o xdot -p $(PACKAGE) $(PACKAGE)
# how to put the generated files directly in the right place ?
mv classes_$(PACKAGE).xdot packages_$(PACKAGE).xdot $(FIGURE_DIR)
graph_packages: pyreverse
xdot $(FIGURE_DIR)/packages_geoptics.xdot &
graph_classes: pyreverse
xdot $(FIGURE_DIR)/classes_geoptics.xdot &