Skip to content

Commit

Permalink
Allow importing of new Python classes (#1422)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
woop committed Mar 28, 2021
1 parent 9cb612d commit aec5435
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions sdk/python/feast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
)
from .entity import Entity
from .feature import Feature
from .feature_store import FeatureStore
from .feature_table import FeatureTable
from .feature_view import FeatureView
from .repo_config import RepoConfig
from .value_type import ValueType

try:
Expand All @@ -28,8 +30,10 @@
"KafkaSource",
"KinesisSource",
"Feature",
"FeatureStore",
"FeatureTable",
"FeatureView",
"RepoConfig",
"SourceType",
"ValueType",
]
3 changes: 2 additions & 1 deletion sdk/python/feast/infra/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from datetime import datetime
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union

from feast import FeatureTable, FeatureView
from feast.feature_table import FeatureTable
from feast.feature_view import FeatureView
from feast.protos.feast.types.EntityKey_pb2 import EntityKey as EntityKeyProto
from feast.protos.feast.types.Value_pb2 import Value as ValueProto
from feast.repo_config import RepoConfig
Expand Down
8 changes: 4 additions & 4 deletions sdk/python/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,9 @@ def test_no_auth_sent_when_auth_disabled(
client.list_feature_tables()


def _ingest_test_getfeaturetable_mocked_resp(file_url: str, date_partition_col: str):
def _ingest_test_getfeaturetable_mocked_resp(
file_url: str, date_partition_col: str = ""
):
return GetFeatureTableResponse(
table=FeatureTableProto(
spec=FeatureTableSpecProto(
Expand All @@ -1005,9 +1007,7 @@ def _ingest_test_getfeaturetable_mocked_resp(file_url: str, date_partition_col:
),
event_timestamp_column="datetime",
created_timestamp_column="timestamp",
date_partition_column=date_partition_col
if date_partition_col is not None
else None,
date_partition_column=date_partition_col,
),
),
meta=FeatureTableMetaProto(),
Expand Down

0 comments on commit aec5435

Please sign in to comment.