aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: f78376fbdc3010b7ec3094f5acdf53d32217bf35 (plain)
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
.PHONY: all output check test sphinx-apidoc documentation

all: output

DOC_OUTPUT = doc.rendered

OUTPUT_FLAGS = --path-base /code/muppet-strings/output \
			   --env ~/puppet/generated-environments/production/modules/

output:
	python -m muppet  $(OUTPUT_FLAGS)

check:
	flake8 muppet
	mypy -p muppet

# TODO only require coverage if `python -m pytest -VV | grep pytest-cov` return true
PYTEST_FLAGS = --cov=muppet --cov-branch --cov-report=html

test:
	python -m pytest $(PYTEST_FLAGS) tests

sphinx-apidoc:
	sphinx-apidoc --separate --force -o doc muppet

$(DOC_OUTPUT)/index.html: sphinx-apidoc
	sphinx-build -b dirhtml doc $(DOC_OUTPUT)

documentation: $(DOC_OUTPUT)/index.html

clean:
	-rm -r output