Skip to content

Commit a02325b

Browse files
kevjumbaadchia
andauthored
feat: Makefile for contrib for Issue #2364 (#2366)
* Add make file Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix makefile Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Clean up Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Add documentation Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Clean up Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Update documentation Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * update make target Signed-off-by: Kevin Zhang <kzhang@tecton.ai> Co-authored-by: Danny Chiao <danny@tecton.ai>
1 parent d4a606a commit a02325b

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ test-python:
7272
test-python-integration:
7373
FEAST_USAGE=False IS_TEST=True python -m pytest -n 8 --integration sdk/python/tests
7474

75+
test-python-universal-contrib:
76+
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
77+
7578
test-python-universal-local:
7679
FEAST_USAGE=False IS_TEST=True FEAST_IS_LOCAL_TEST=True python -m pytest -n 8 --integration --universal sdk/python/tests
7780

@@ -198,4 +201,4 @@ build-sphinx: compile-protos-python
198201
cd $(ROOT_DIR)/sdk/python/docs && $(MAKE) build-api-source
199202

200203
build-templates:
201-
python infra/scripts/compile-templates.py
204+
python infra/scripts/compile-templates.py

docs/how-to-guides/adding-or-reusing-tests.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ The key fixtures are the `environment` and `universal_data_sources` fixtures, wh
161161
* In `repo_configuration.py` add a new`IntegrationTestRepoConfig` or two (depending on how many online stores you want to test).
162162
* Run the full test suite with `make test-python-integration.`
163163

164+
### Including a new offline / online store in the main Feast repo from external plugins with community maintainers.
165+
166+
* This folder is for plugins that are officially maintained with community owners. Place the APIs in feast/infra/offline_stores/contrib/.
167+
* Extend `data_source_creator.py` for your offline store and implement the required APIs.
168+
* In `contrib_repo_configuration.py` add a new `IntegrationTestRepoConfig` (depending on how many online stores you want to test).
169+
* Run the test suite on the contrib test suite with `make test-python-contrib-universal`.
170+
164171
### To include a new online store
165172

166173
* In `repo_configuration.py` add a new config that maps to a serialized version of configuration you need in `feature_store.yaml` to setup the online store.

sdk/python/feast/infra/offline_stores/contrib/__init__.py

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from tests.integration.feature_repos.integration_test_repo_config import (
2+
IntegrationTestRepoConfig,
3+
)
4+
from tests.integration.feature_repos.universal.data_sources.spark_data_source_creator import (
5+
SparkDataSourceCreator,
6+
)
7+
8+
FULL_REPO_CONFIGS = [
9+
IntegrationTestRepoConfig(offline_store_creator=SparkDataSourceCreator)
10+
]

0 commit comments

Comments
 (0)