forked from DHARPA-Project/kiara_plugin.onboarding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
83 lines (63 loc) · 2.19 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
.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 -a 0.0.0.0:8000
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg' -exec rm -f {} +
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/ -U -e '.[dev_utils]'
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 "*" ".*"
update-dependencies: ## update all development dependencies
pip install -U pip
pip install --extra-index-url https://pypi.fury.io/dharpa/ -U -e '.[all_dev]'
setup-cfg-fmt: # format setup.cfg
setup-cfg-fmt setup.cfg || true
black: ## run black
black --config pyproject.toml setup.py src/kiara_plugin/onboarding tests
flake: ## check style with flake8
flake8 src/kiara_plugin/onboarding tests
mypy: ## run mypy
mypy --namespace-packages --explicit-package-base src/kiara_plugin/onboarding
test: ## run tests quickly with the default Python
py.test
test-all: ## run tests on every Python version with tox
tox
coverage: ## check code coverage quickly with the default Python
coverage run -m pytest tests
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html
check: black flake mypy test ## run dev-related checks
pre-commit: ## run pre-commit on all files
pre-commit run --all-files
dist: clean ## build source and wheel packages
python setup.py sdist
python setup.py bdist_wheel
ls -l dist