forked from SeldonIO/tempo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
85 lines (69 loc) · 1.8 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
SHELL := /bin/bash
VERSION = $(shell sed 's/^__version__ = "\(.*\)"/\1/' ./tempo/version.py)
.PHONY: install
install:
pip install -e .
.PHONY: install-dev
install-dev: install
pip install -r requirements-dev.txt
pip install -r docs/requirements-docs.txt
.PHONY: test
test:
tox
.PHONY: fmt
fmt:
isort . \
--skip ansible \
--skip .tox \
--skip .eggs \
--skip build
black . \
--exclude "(.eggs|.tox|ansible|build)" \
--line-length 120
.PHONY: lint
lint:
flake8 . \
--extend-exclude "ansible"
mypy ./tempo
isort . --check \
--skip ansible \
--skip .tox \
--skip .eggs \
--skip build
black . \
--check \
--exclude "(.eggs|.tox|ansible|build)" \
--line-length 120
.PHONY: install-rclone
install-rclone:
curl https://rclone.org/install.sh | sudo bash
.PHONY: tests/testdata
tests/testdata:
cd tests/testdata && \
gsutil -m cp -r gs://seldon-models/sklearn . && \
gsutil -m cp -r gs://seldon-models/xgboost . && \
gsutil -m cp -r gs://seldon-models/mlflow . && \
gsutil -m cp -r gs://seldon-models/keras . && \
gsutil -m cp -r gs://seldon-models/tfserving .
.PHONY: clean_test_data
clean_test_data:
rm -rf tests/examples
.PHONY: build
build: clean
python setup.py sdist bdist_wheel
.PHONY: clean
clean:
rm -rf ./dist ./build *.egg-info
.PHONY: push-test
push-test:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
.PHONY: push
push:
twine upload dist/*
.PHONY: version
version:
@echo ${VERSION}
build_changelog:
docker run --rm -it -v "$(PWD)":/usr/local/src/your-app -e CHANGELOG_GITHUB_TOKEN=${CHANGELOG_GITHUB_TOKEN} ferrarimarco/github-changelog-generator:1.15.2 -u SeldonIO -p tempo
chmod 664 CHANGELOG.md # (Read+Write, Read+Write, Read)
sed -i -e 's/\(HEAD\|Unreleased\)/v${VERSION}/g' CHANGELOG.md # Replacing unreleased version with latest tag