-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
53 lines (39 loc) · 1.72 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
.DEFAULT_GOAL := help
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: clean
clean: clean_pyc ## Clean all PYC in the system
.PHONY: clean_pyc
clean_pyc: ## Cleans all *.pyc in the system
find . -type f -name "*.pyc" -delete || true
.PHONY: clean_pycache
clean_pycache: ## Removes the __pycaches__
find . -type d -name "*__pycache__*" -delete
.PHONY: serve-docs
serve-docs: ## Runs the local docs
mkdocs serve
.PHONY: build-docs
build-docs: ## Runs the local docs
mkdocs build
.PHONY: test
test: ## Runs the tests
ESMERALD_SETTINGS_MODULE='tests.settings.TestSettings' pytest $(TESTONLY) --disable-pytest-warnings -s -vv
.PHONY: coverage
coverage: ## Run tests and coverage
ESMERALD_SETTINGS_MODULE='tests.settings.TestSettings' pytest --cov=esmerald --cov=tests --cov-report=term-missing:skip-covered --cov-report=html tests
# .PHONY: cov
# cov: ## Run tests and coverage only for specific ones
# ESMERALD_SETTINGS_MODULE='tests.settings.TestSettings' pytest --cov=esmerald --cov=${ONLY} --cov-report=term-missing:skip-covered --cov-report=html ${ONLY}
.PHONY: cov
cov: ## Run tests and coverage only for specific ones
ESMERALD_SETTINGS_MODULE='tests.settings.TestSettings' coverage run -m pytest tests
ESMERALD_SETTINGS_MODULE='tests.settings.TestSettings' coverage combine
ESMERALD_SETTINGS_MODULE='tests.settings.TestSettings' coverage report --show-missing
ESMERALD_SETTINGS_MODULE='tests.settings.TestSettings' coverage html
.PHONY: requirements
requirements: ## Install requirements for development
pip install -e .[dev,test,doc,templates,jwt,encoders,schedulers,ipython,ptpython]
ifndef VERBOSE
.SILENT:
endif