-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (34 loc) · 865 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
39
40
41
42
PYTEST_FLAGS=-W error::SyntaxWarning
SPHINXOPTS = -W --keep-going
SPHINXBUILD = sphinx-build
SPHINXPROJ = launchdarkly-server-sdk
SOURCEDIR = docs
BUILDDIR = $(SOURCEDIR)/build
.PHONY: help
help: #! Show this help message
@echo 'Usage: make [target] ... '
@echo ''
@echo 'Targets:'
@grep -h -F '#!' $(MAKEFILE_LIST) | grep -v grep | sed 's/:.*#!/:/' | column -t -s":"
.PHONY: install
install:
@poetry install
#
# Quality control checks
#
.PHONY: test
test: #! Run unit tests
test: install
@poetry run pytest $(PYTEST_FLAGS)
.PHONY: lint
lint: #! Run type analysis and linting checks
lint: install
@poetry run mypy ldotel
#
# Documentation generation
#
.PHONY: docs
docs: #! Generate sphinx-based documentation
@poetry install --with docs
@cd docs
@poetry run $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)