-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
68 lines (53 loc) · 1.9 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.PHONY: clean clean-test clean-pyc clean-build docs help
.DEFAULT_GOAL := help
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
docs: ## build documentation
mkdocs build
serve-docs: ## serve and watch documentation
mkdocs serve --dirtyreload -a 0.0.0.0:8000
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
clean-doc: ## remove doc artifacts
rm -fr build/site
clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg' -exec rm -fr {} +
clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-test: ## remove test and coverage artifacts
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache
rm -fr .mypy_cache
init: clean ## initialize a development environment (to be run in virtualenv)
git init
git checkout -b develop || true
pip install -U pip
pip install --extra-index-url https://pypi.fury.io/dharpa/ --extra-index-url https://gitlab.com/api/v4/projects/25344049/packages/pypi/simple -U -e '.[all_dev]'
pre-commit install
pre-commit install --hook-type commit-msg
setup-cfg-fmt setup.cfg || true
git add "*" ".*"
pre-commit run --all-files || true
git add "*" ".*"
mypy: ## run mypy
mypy src/kiara
test: ## run tests quickly with the default Python
py.test
coverage: ## check code coverage quickly with the default Python
coverage run -m pytest tests
coverage report -m
coverage html
xdg-open htmlcov/index.html
render-api:
kiara render --source-type base_api --target-type kiara_api item kiara_api template_file=src/kiara/interfaces/python_api/kiara_api.py target_file=src/kiara/interfaces/python_api/kiara_api.py
pre-commit: ## run pre-commit on all files
pre-commit run --all-files
doc: ## build documentation
mkdocs build