1616
1717ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST ) ) ) )
1818MVN := mvn -f java/pom.xml ${MAVEN_EXTRA_OPTS}
19- PROTO_TYPE_SUBDIRS = core serving types storage
20- PROTO_SERVICE_SUBDIRS = core serving
2119OS := linux
2220ifeq ($(shell uname -s) , Darwin)
2321 OS = osx
@@ -35,13 +33,11 @@ protos: compile-protos-go compile-protos-python compile-protos-docs
3533
3634build : protos build-java build-docker build-html
3735
38- install-ci-dependencies : install-python-ci-dependencies install-java-ci-dependencies install-go-ci-dependencies
39-
4036# Python SDK
4137
42- install-python-ci-dependencies :
38+ install-python-ci-dependencies : install-go-ci-dependencies
4339 cd sdk/python && python -m piptools sync requirements/py$(PYTHON ) -ci-requirements.txt
44- cd sdk/python && python setup.py develop
40+ cd sdk/python && COMPILE_GO=true python setup.py develop
4541
4642lock-python-ci-dependencies :
4743 cd sdk/python && python -m piptools compile -U --extra ci --output-file requirements/py$(PYTHON ) -ci-requirements.txt
@@ -50,8 +46,7 @@ package-protos:
5046 cp -r ${ROOT_DIR} /protos ${ROOT_DIR} /sdk/python/feast/protos
5147
5248compile-protos-python :
53- @$(foreach dir,$(PROTO_TYPE_SUBDIRS ) ,cd ${ROOT_DIR}/protos; python -m grpc_tools.protoc -I. --grpc_python_out=../sdk/python/feast/protos/ --python_out=../sdk/python/feast/protos/ --mypy_out=../sdk/python/feast/protos/ feast/$(dir ) /* .proto;)
54- @$(foreach dir,$(PROTO_TYPE_SUBDIRS ) ,grep -rli 'from feast.$(dir ) ' sdk/python/feast/protos | xargs -I@ sed -i.bak 's/from feast.$(dir ) /from feast.protos.feast.$(dir ) /g' @;)
49+ python setup.py build_python_protos
5550
5651install-python :
5752 cd sdk/python && python -m piptools sync requirements/py$(PYTHON ) -requirements.txt
@@ -72,12 +67,23 @@ test-python:
7267test-python-integration :
7368 FEAST_USAGE=False IS_TEST=True python -m pytest -n 8 --integration sdk/python/tests
7469
70+ test-python-universal-contrib :
71+ PYTHONPATH=' .' FULL_REPO_CONFIGS_MODULE=sdk.python.feast.infra.offline_stores.contrib.contrib_repo_configuration FEAST_USAGE=False IS_TEST=True python -m pytest -n 8 --integration --universal sdk/python/tests
72+
7573test-python-universal-local :
7674 FEAST_USAGE=False IS_TEST=True FEAST_IS_LOCAL_TEST=True python -m pytest -n 8 --integration --universal sdk/python/tests
7775
7876test-python-universal :
7977 FEAST_USAGE=False IS_TEST=True python -m pytest -n 8 --integration --universal sdk/python/tests
8078
79+ test-python-go-server :
80+ go build -o ${ROOT_DIR} /sdk/python/feast/binaries/goserver github.com/feast-dev/feast/go/cmd/goserver
81+ FEAST_USAGE=False IS_TEST=True python -m pytest -n 8 --integration --goserver sdk/python/tests
82+
83+ test-python-go-server-lifecycle :
84+ go build -o ${ROOT_DIR} /sdk/python/feast/binaries/goserver github.com/feast-dev/feast/go/cmd/goserver
85+ FEAST_USAGE=False IS_TEST=True python -m pytest -n 8 --integration --goserverlifecycle sdk/python/tests
86+
8187format-python :
8288 # Sort
8389 cd ${ROOT_DIR} /sdk/python; python -m isort feast/ tests/
@@ -120,20 +126,25 @@ build-java-no-tests:
120126# Go SDK
121127
122128install-go-ci-dependencies :
123- go get -u github.com/golang/protobuf/protoc-gen-go
124- go get -u golang.org/x/lint/golint
129+ go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26.0
130+ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1.0
131+
132+ compile-protos-go : install-go-ci-dependencies
133+ pip install grpcio-tools==1.34.0
134+ python sdk/python/setup.py build_go_protos
125135
126- compile-protos-go :
127- $(foreach dir,types serving core storage,cd ${ROOT_DIR}/protos; protoc -I/usr/local/include -I. --go_out=plugins=grpc,paths=source_relative:../sdk/go/protos feast/$(dir ) /* .proto;)
136+ compile-go-feature-server : compile-protos-go
137+ go mod tidy
138+ go build -o ${ROOT_DIR} /sdk/python/feast/binaries/goserver github.com/feast-dev/feast/go/cmd/goserver
128139
129- test-go :
130- cd ${ROOT_DIR} /sdk/go ; go test ./...
140+ test-go : install-go-ci-dependencies
141+ go test ./...
131142
132143format-go :
133- cd ${ROOT_DIR} /sdk/go ; gofmt -s -w * .go
144+ gofmt -s -w go/
134145
135- lint-go :
136- cd ${ROOT_DIR} /sdk/go ; go vet
146+ lint-go : compile-protos-go
147+ go vet ./go/internal/feast ./go/cmd/goserver
137148
138149# Docker
139150
@@ -198,4 +209,4 @@ build-sphinx: compile-protos-python
198209 cd $(ROOT_DIR ) /sdk/python/docs && $(MAKE ) build-api-source
199210
200211build-templates :
201- python infra/scripts/compile-templates.py
212+ python infra/scripts/compile-templates.py
0 commit comments