forked from Cornerstone-OnDemand/modelkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (52 loc) · 1.6 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
SHELL := /bin/bash
.SHELLFLAGS := -e -x -c -o pipefail
.PHONY: setup setup_lint lint tests coverage ci_tests requirements upgrade
setup_lint:
pip install --upgrade pip pre-commit
pre-commit install
lint:
pre-commit run --all-files
tests:
export ENABLE_TF_SERVING_TEST=True; \
export ENABLE_TF_TEST=True; \
export ENABLE_REDIS_TEST=True; \
export ENABLE_S3_TEST=True; \
export ENABLE_GCS_TEST=True; \
export ENABLE_AZ_TEST=True; \
pytest
coverage:
export ENABLE_TF_SERVING_TEST=True; \
export ENABLE_TF_TEST=True; \
export ENABLE_REDIS_TEST=True; \
export ENABLE_S3_TEST=True; \
export ENABLE_GCS_TEST=True; \
export ENABLE_AZ_TEST=True; \
coverage run -m pytest; \
coverage report -m; \
coverage xml
setup:
pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .[lint,tensorflow,cli,api,assets-s3,assets-gcs,assets-az]
pre-commit install
ci_tests:
pip install --upgrade pip nox
@if [ "$(OS_NAME)" = "ubuntu-latest" ]; then \
export ENABLE_TF_SERVING_TEST=True; \
export ENABLE_TF_TEST=True; \
export ENABLE_REDIS_TEST=True; \
export ENABLE_S3_TEST=True; \
export ENABLE_GCS_TEST=True; \
export ENABLE_AZ_TEST=True; \
nox --error-on-missing-interpreters -s "coverage-$(PYTHON_VERSION)"; \
else \
nox --error-on-missing-interpreters -s "tests-$(PYTHON_VERSION)"; \
fi
requirements:
pip install --upgrade pip pip-compile
pip-compile --extra=dev --output-file=requirements-dev.txt
upgrade:
pip install --upgrade pip pip-tools pre-commit
pre-commit autoupdate
pip-compile --upgrade --extra=dev --output-file=requirements-dev.txt
pip install -r requirements-dev.txt