Skip to content

Commit aec5435

Browse files
authored
Allow importing of new Python classes (feast-dev#1422)
* Expose 0.10 Python classes Signed-off-by: Willem Pienaar <git@willem.co> * Reformat imports Signed-off-by: Willem Pienaar <git@willem.co> * Fix broken import Signed-off-by: Willem Pienaar <git@willem.co> * Fix broken type Signed-off-by: Willem Pienaar <git@willem.co>
1 parent 9cb612d commit aec5435

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

sdk/python/feast/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
)
1111
from .entity import Entity
1212
from .feature import Feature
13+
from .feature_store import FeatureStore
1314
from .feature_table import FeatureTable
1415
from .feature_view import FeatureView
16+
from .repo_config import RepoConfig
1517
from .value_type import ValueType
1618

1719
try:
@@ -28,8 +30,10 @@
2830
"KafkaSource",
2931
"KinesisSource",
3032
"Feature",
33+
"FeatureStore",
3134
"FeatureTable",
3235
"FeatureView",
36+
"RepoConfig",
3337
"SourceType",
3438
"ValueType",
3539
]

sdk/python/feast/infra/provider.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
from datetime import datetime
33
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
44

5-
from feast import FeatureTable, FeatureView
5+
from feast.feature_table import FeatureTable
6+
from feast.feature_view import FeatureView
67
from feast.protos.feast.types.EntityKey_pb2 import EntityKey as EntityKeyProto
78
from feast.protos.feast.types.Value_pb2 import Value as ValueProto
89
from feast.repo_config import RepoConfig

sdk/python/tests/test_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,9 @@ def test_no_auth_sent_when_auth_disabled(
983983
client.list_feature_tables()
984984

985985

986-
def _ingest_test_getfeaturetable_mocked_resp(file_url: str, date_partition_col: str):
986+
def _ingest_test_getfeaturetable_mocked_resp(
987+
file_url: str, date_partition_col: str = ""
988+
):
987989
return GetFeatureTableResponse(
988990
table=FeatureTableProto(
989991
spec=FeatureTableSpecProto(
@@ -1005,9 +1007,7 @@ def _ingest_test_getfeaturetable_mocked_resp(file_url: str, date_partition_col:
10051007
),
10061008
event_timestamp_column="datetime",
10071009
created_timestamp_column="timestamp",
1008-
date_partition_column=date_partition_col
1009-
if date_partition_col is not None
1010-
else None,
1010+
date_partition_column=date_partition_col,
10111011
),
10121012
),
10131013
meta=FeatureTableMetaProto(),

0 commit comments

Comments
 (0)