|
|
@ -1,4 +1,4 @@ |
|
|
|
.PHONY: clean clean-docs clean-test clean-pyc clean-build docs help prepareenv |
|
|
|
.PHONY: clean coverage coverall docs devenv install lint prepareenv repo test testall testfunctional nox tox |
|
|
|
.DEFAULT_GOAL := help |
|
|
|
.DEFAULT_GOAL := help |
|
|
|
|
|
|
|
|
|
|
|
define BROWSER_PYSCRIPT |
|
|
|
define BROWSER_PYSCRIPT |
|
|
@ -49,6 +49,7 @@ clean-pyc: ## remove Python file artifacts |
|
|
|
|
|
|
|
|
|
|
|
clean-test: ## remove test and coverage artifacts
|
|
|
|
clean-test: ## remove test and coverage artifacts
|
|
|
|
rm -fr .pytest_cache/ |
|
|
|
rm -fr .pytest_cache/ |
|
|
|
|
|
|
|
rm -fr .nox/ |
|
|
|
rm -fr .tox/ |
|
|
|
rm -fr .tox/ |
|
|
|
rm -f .coverage |
|
|
|
rm -f .coverage |
|
|
|
rm -fr htmlcov/ |
|
|
|
rm -fr htmlcov/ |
|
|
@ -76,8 +77,11 @@ coverall: lint ## full test suite, check code coverage and open coverage report |
|
|
|
coverage html |
|
|
|
coverage html |
|
|
|
$(BROWSER) htmlcov/index.html |
|
|
|
$(BROWSER) htmlcov/index.html |
|
|
|
|
|
|
|
|
|
|
|
tox: ## run fully isolated tests with tox
|
|
|
|
nox: ## run fully isolated tests with nox
|
|
|
|
tox |
|
|
|
nox |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tox: ## old habits die hard: typo-squatting to use nox
|
|
|
|
|
|
|
|
nox |
|
|
|
|
|
|
|
|
|
|
|
docs: ## build the documentation using mkdocs
|
|
|
|
docs: ## build the documentation using mkdocs
|
|
|
|
mkdocs build |
|
|
|
mkdocs build |
|
|
@ -86,13 +90,13 @@ serve-docs: docs ## build the documentation and serve them in a web server |
|
|
|
mkdocs serve |
|
|
|
mkdocs serve |
|
|
|
|
|
|
|
|
|
|
|
install: ## install updated project.toml with flint
|
|
|
|
install: ## install updated project.toml with flint
|
|
|
|
flit install --pth-file |
|
|
|
.venv/bin/pip3 install -e ".[dev,docs,test]" |
|
|
|
|
|
|
|
|
|
|
|
prepareenv: ## setup a virtualenv and install basic reuqired packages
|
|
|
|
prepareenv: ## setup a virtualenv and install basic reuqired packages
|
|
|
|
|
|
|
|
rm -fr .venv/ |
|
|
|
python3 -m venv --prompt sensospot_tools .venv |
|
|
|
python3 -m venv --prompt sensospot_tools .venv |
|
|
|
.venv/bin/pip3 install --upgrade pip |
|
|
|
.venv/bin/pip3 install --upgrade pip wheel |
|
|
|
.venv/bin/pip3 install "flit>3.2" |
|
|
|
.venv/bin/pip3 install -e ".[dev,docs,test]" |
|
|
|
.venv/bin/flit install --pth-file |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
devenv: prepareenv ## setup development environment including pre commit hooks
|
|
|
|
devenv: prepareenv ## setup development environment including pre commit hooks
|
|
|
|
.venv/bin/pre-commit install --install-hooks |
|
|
|
.venv/bin/pre-commit install --install-hooks |
|
|
|