-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathMakefile
64 lines (52 loc) · 1.5 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
SHELL:=/bin/bash
SKLEARN_NIGHTLY_URL:=https://sklearn-nightly.scdn8.secure.raxcdn.com
ifndef SKLEARN_VERSION
override SKLEARN_VERSION=unspecified
endif
venv: venv/bin/activate
venv/bin/activate:
@echo Using $(shell python3 --version) at $(shell which python3)
python3 -m venv venv
clean:
rm -rf build dist baikal.egg-info pip-wheel-metadata
setup_dev: venv
. venv/bin/activate && \
pip install -U pip && \
if [[ ${SKLEARN_VERSION} =~ [0-9\.] ]]; then \
pip install scikit-learn==${SKLEARN_VERSION}; \
elif [[ ${SKLEARN_VERSION} = "nightly" ]]; then \
pip install --ignore-installed --pre -f ${SKLEARN_NIGHTLY_URL} scikit-learn; \
fi && \
pip install -e .[dev,viz] && \
pip install pre-commit && \
pre-commit install
setup_docs: venv docs/requirements.txt
. venv/bin/activate && \
pip install -r docs/requirements.txt
test:
. venv/bin/activate && \
pytest -vv tests/
test-cov:
. venv/bin/activate && \
pytest -vv --cov-config .coveragerc --cov=baikal tests/
upload-cov:
. venv/bin/activate && \
codecov --token=${CODECOV_TOKEN}
type-check:
. venv/bin/activate && \
mypy --ignore-missing-imports baikal/ tests/
wheel: clean venv
. venv/bin/activate && \
pip install --upgrade setuptools wheel && \
python setup.py sdist bdist_wheel
upload: dist venv
. venv/bin/activate && \
pip install --upgrade twine && \
twine check dist/* && \
twine upload dist/*
.PHONY: docs
docs:
. venv/bin/activate && \
rm -rf docs/src/_generated && \
make -C docs clean && \
make -C docs html