-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
64 lines (45 loc) · 1.25 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
GPU_IMAGE?="timeserio:latest-gpu"
CPU_IMAGE?="timeserio:latest"
.PHONY: yapf lint clean sync lock test test-parallel docs-build docs-clean circle build-cpu build-gpu release
yapf:
pipenv run yapf -vv -ir .
pipenv run isort -y
lint:
pipenv run flake8 .
pipenv run pydocstyle .
pipenv run mypy .
clean:
find . | grep -E '(__pycache__|\.pyc|\.pyo$$)' | xargs rm -rf
sync:
pipenv sync --dev
lock:
pipenv lock --dev
test:
pipenv run pytest tests/
test-parallel:
pipenv run pytest -n auto tests/
doctest:
pipenv run pytest --doctest-modules timeserio/
docs-build:
pipenv run $(MAKE) -C docs html
docs-clean:
pipenv run $(MAKE) -C docs clean
rm -rf docs/source/api
docs-serve:
pipenv run $(SHELL) -c "cd docs/_build/html; python -m http.server 8000"
circle:
circleci config validate
circleci local execute --job build
build-cpu:
docker build -t ${CPU_IMAGE} .
build-gpu:
docker build -t ${GPU_IMAGE} . --build-arg gpu_tag="-gpu"
version:
@pipenv run python -c "import timeserio; print(timeserio.__version__)"
package:
pipenv run python setup.py sdist
pipenv run python setup.py bdist_wheel
test-release: package
pipenv run twine upload --repository-url https://test.pypi.org/legacy/ dist/*
release: package
pipenv run twine upload dist/*