-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
executable file
·44 lines (35 loc) · 1.4 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
.PHONY: clean clean-test clean-pyc clean-build lint help
.DEFAULT_GOAL := help
lint: ## Check code style
flake8
black --check .
pydocstyle
test: ## Run unit tests using pytest
pytest --pyargs afqinsight --cov-report term-missing --cov-config .coveragerc --cov=afqinsight -n auto
devtest: ## Run unit tests using pytest and abort testing after first failure
# Unit testing with the -x option, aborts testing after first failure
# Useful for development when tests are long
pytest -x --pyargs afqinsight --cov-report term-missing --cov-config .coveragerc --cov=afqinsight -n auto
clean: ## Remove all build, test, coverage and Python artifacts
clean: clean-build clean-pyc
clean-build: ## Remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
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 {} +
release: ## Package and upload a release
release: dist
twine upload dist/*
dist: ## Build source and wheel package
dist: clean
python setup.py sdist
python setup.py bdist_wheel --universal
ls -l dist
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'