-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (48 loc) · 1.59 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
.PHONY : help clean lint test doctest dist info html
help:
@echo "'clean' - remove all cached files"
@echo "'clean-build' - remove build artifacts"
@echo "'clean-pyc' - remove Python file artifacts"
@echo "'clean-cov' - remove coverage files"
@echo "'clean-model' - remove model or pipeline files"
@echo "'clean-doc' - remove documentation"
@echo "'lint' - lint source codes"
@echo "'dist' - build package"
@echo "'test' - run tests and check coverage"
@echo "'info' - show conda environment and dtoolkit information"
@echo "'html' - build html documentation"
clean-build:
rm -fr build/
rm -fr dist/
rm -fr *.egg-info
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
clean-model:
find . -name '*.model' -exec rm -f {} +
find . -name '*.joblib' -exec rm -f {} +
find . -name '*.pipeline' -exec rm -f {} +
clean-cov:
rm -rf coverage.xml
rm -rf .coverage
clean-doc:
cd doc && make clean
rm -rf doc/source/reference/api
clean: clean-build clean-pyc clean-cov clean-model clean-doc
lint:
pre-commit run -a -v
test:
pytest -v -r a -n auto --color=yes --cov=dtoolkit --cov-append --cov-report term-missing --cov-report xml test
doctest:
pytest -v -r a -n auto --color=yes --cov=dtoolkit --cov-append --cov-report xml --doctest-only dtoolkit
dist:
python -m build
twine check --strict dist/*
ls -l dist
info:
python -V
python -c "from dtoolkit import __version__; print(__version__);"
python -c "import pprint; from dtoolkit._version import get_versions; pprint.pprint(get_versions());"
html:
cd doc && make html