forked from ucbds-infra/otter-grader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (29 loc) · 789 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
37
38
PYTEST = pytest
TESTPATH = test
PYTESTOPTS =
COVERAGE = coverage
DOCKER = true
SLOW = true
_PYTESTOPTS := -vv --durations=0 --html=pytest-report.html --self-contained-html
ifeq ($(DOCKER), false)
_PYTESTOPTS := $(_PYTESTOPTS) -m "not docker"
endif
ifeq ($(SLOW), false)
_PYTESTOPTS := $(_PYTESTOPTS) -m "not slow"
endif
_PYTESTOPTS := $(_PYTESTOPTS) $(PYTESTOPTS)
.PHONY: test
test:
$(PYTEST) $(TESTPATH) $(_PYTESTOPTS)
testcov:
$(COVERAGE) run -m pytest $(TESTPATH) $(_PYTESTOPTS)
htmlcov: testcov
$(COVERAGE) html
.PHONY: docs
docs:
$(MAKE) -C docs html
tutorial:
cd docs/tutorial; \
zip -r tutorial.zip submissions demo.ipynb requirements.txt -x "*.DS_Store"; \
cp tutorial.zip ../_static; \
rm tutorial.zip