forked from feast-dev/feast-spark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (51 loc) · 2.57 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
MVN := mvn ${MAVEN_EXTRA_OPTS}
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
PROTO_TYPE_SUBDIRS = api
PROTO_SERVICE_SUBDIRS = api
# Make sure env vars are available to submakes
export
# Java
format-java:
cd spark/ingestion && ${MVN} spotless:apply
lint-java:
cd spark/ingestion && ${MVN} --no-transfer-progress spotless:check
# Python
format-python:
# Sort
cd ${ROOT_DIR}/python ; isort feast_spark/
#cd ${ROOT_DIR}/tests/e2e; isort .
# Format
cd ${ROOT_DIR}/python; black --target-version py37 feast_spark
#cd ${ROOT_DIR}/tests/e2e; black --target-version py37 .
install-python-ci-dependencies:
pip install --no-cache-dir -r python/requirements-ci.txt
compile-protos-python: install-python-ci-dependencies
@$(eval FEAST_PATH=`python -c "import feast; import os; print(os.path.dirname(feast.__file__))"`)
@$(foreach dir,$(PROTO_TYPE_SUBDIRS),cd ${ROOT_DIR}/protos; python -m grpc_tools.protoc -I. -I$(FEAST_PATH)/protos/ --python_out=../python/ --mypy_out=../python/ feast_spark/$(dir)/*.proto;)
@$(foreach dir,$(PROTO_SERVICE_SUBDIRS),cd ${ROOT_DIR}/protos; python -m grpc_tools.protoc -I. -I$(FEAST_PATH)/protos/ --grpc_python_out=../python/ feast_spark/$(dir)/*.proto;)
cd ${ROOT_DIR}/protos; python -m grpc_tools.protoc -I. --python_out=../python/ --grpc_python_out=../python/ --mypy_out=../python/ feast_spark/third_party/grpc/health/v1/*.proto
# Supports feast-dev repo master branch
install-python: compile-protos-python
cd ${ROOT_DIR}; python -m pip install -e python
lint-python:
cd ${ROOT_DIR}/python ; mypy feast_spark/
cd ${ROOT_DIR}/python ; isort feast_spark/ --check-only
cd ${ROOT_DIR}/python ; flake8 feast_spark/
cd ${ROOT_DIR}/python ; black --check feast_spark
cd ${ROOT_DIR}/tests; mypy e2e
cd ${ROOT_DIR}/tests; isort e2e --check-only
cd ${ROOT_DIR}/tests; flake8 e2e
cd ${ROOT_DIR}/tests; black --check e2e
build-local-test-docker:
docker build -t feast:local -f infra/docker/tests/Dockerfile .
build-ingestion-jar-no-tests:
cd spark/ingestion && ${MVN} --no-transfer-progress -Dmaven.javadoc.skip=true -Dgpg.skip -DskipUTs=true -DskipITs=true -Drevision=${REVISION} clean package
build-jobservice-docker:
docker build -t $(REGISTRY)/feast-jobservice:$(VERSION) -f infra/docker/jobservice/Dockerfile .
push-jobservice-docker:
docker push $(REGISTRY)/feast-jobservice:$(VERSION)
build-spark-docker:
docker build -t $(REGISTRY)/feast-spark:$(VERSION) --build-arg VERSION=$(VERSION) -f infra/docker/spark/Dockerfile .
push-spark-docker:
docker push $(REGISTRY)/feast-spark:$(VERSION)
install-ci-dependencies: install-python-ci-dependencies