-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (30 loc) · 927 Bytes
/
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
# install, test, and clean
PROJECT=magrock
TESTDIR=$(PROJECT)/tests
help:
@echo "Commands:"
@echo ""
@echo " install install in editable mode"
@echo " test run the test suite (including doctests) and report coverage"
@echo " report open the html test report"
@echo " clean clean up build and generated files"
@echo ""
@echo " uninstall uninstall and remove from "
install:
# Install the python package
pip install --no-deps -e .
test:
# Run tests using coverage and pytest
mkdir -p $(TESTDIR)
cd $(TESTDIR); coverage run -m pytest; coverage html
report:
# Show test report produced by coverage
firefox $(TESTDIR)/htmlcov/index.html
clean:
find . -name "*.pyc" -exec rm -v {} \;
find . -name ".coverage" -exec rm -v {} \;
find . -name ".pytest_cache" -exec rm -rvf {} \;
find . -name "__pycache__" -exec rm -rvf {}
uninstall:
python -m pip uninstall $(PROJECT)
rm -rvf *.egg-info