-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (31 loc) · 956 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
.PHONY: all
all: black lint test coverage
RED=\033[0;31m
YELLOW=\033[0;33m
NC=\033[0m# No Color
PYTHON = Python3
.PHONY = help set up test run clean
help:
@echo "---------------HELP-----------------"
@echo "To start testing: type make test"
@echo "For code-linting: type make lint"
@echo "To format code style: type make black "
@echo "To generate coverage: type make coverage"
@echo "To clean up the folder: type make clean"
.PHONY: black
black:
${PYTHON} -m black src/
.PHONY: lint
coverage:
${PYTHON} -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
${PYTHON} -m coverage-badge -o ./data/logo/coverage.svg
.PHONY: test
test:
${PYTHON} -m pytest --cov-report term-missing --cov=src --verbose --color=yes --ignore=venv
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = ./docs
BUILDDIR = ./docs/build
.PHONY: help Makefile
docs:
${PYTHON} -m $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)