Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove references to PrimitiveFeastType
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
  • Loading branch information
felixwang9817 committed Apr 19, 2022
commit f2fab130b5bbabbc43c093c991857cd73e8a09b3
4 changes: 2 additions & 2 deletions sdk/python/tests/integration/registration/test_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
SparkSource,
)
from feast.on_demand_feature_view import on_demand_feature_view
from feast.types import Float32, PrimitiveFeastType, String, UnixTimestamp
from feast.types import Float32, String, UnixTimestamp
from tests.utils.data_source_utils import (
prep_file_source,
simple_bq_source_using_query_arg,
Expand Down Expand Up @@ -229,7 +229,7 @@ def test_view_with_missing_feature(features_df: pd.DataFrame) -> pd.DataFrame:
@pytest.mark.parametrize(
"request_source_schema",
[
[Field(name="some_date", dtype=PrimitiveFeastType.UNIX_TIMESTAMP)],
[Field(name="some_date", dtype=UnixTimestamp)],
{"some_date": ValueType.UNIX_TIMESTAMP},
],
)
Expand Down
7 changes: 2 additions & 5 deletions sdk/python/tests/integration/registration/test_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from feast.protos.feast.types import Value_pb2 as ValueProto
from feast.registry import Registry
from feast.repo_config import RegistryConfig
from feast.types import Array, Bytes, Float32, Int32, Int64, PrimitiveFeastType, String
from feast.types import Array, Bytes, Float32, Int32, Int64, String
from feast.value_type import ValueType


Expand Down Expand Up @@ -240,10 +240,7 @@ def test_apply_feature_view_success(test_registry):
# TODO(kevjumba): remove this in feast 0.23 when deprecating
@pytest.mark.parametrize(
"request_source_schema",
[
[Field(name="my_input_1", dtype=PrimitiveFeastType.INT32)],
{"my_input_1": ValueType.INT32},
],
[[Field(name="my_input_1", dtype=Int32)], {"my_input_1": ValueType.INT32}],
)
def test_modify_feature_views_success(test_registry, request_source_schema):
# Create Feature Views
Expand Down
11 changes: 7 additions & 4 deletions sdk/python/tests/unit/test_data_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
from feast.data_source import PushSource, RequestDataSource, RequestSource
from feast.field import Field
from feast.infra.offline_stores.bigquery_source import BigQuerySource
from feast.types import PrimitiveFeastType
from feast.types import Bool, Float32


def test_push_with_batch():
push_source = PushSource(
name="test", batch_source=BigQuerySource(table="test.test"),
name="test",
schema=[Field(name="f1", dtype=Float32), Field(name="f2", dtype=Bool),],
timestamp_field="event_timestamp",
batch_source=BigQuerySource(table="test.test"),
)
push_source_proto = push_source.to_proto()
assert push_source_proto.HasField("batch_source")
Expand All @@ -35,8 +38,8 @@ def test_request_data_source_deprecation():

def test_request_source_primitive_type_to_proto():
schema = [
Field(name="f1", dtype=PrimitiveFeastType.FLOAT32),
Field(name="f2", dtype=PrimitiveFeastType.BOOL),
Field(name="f1", dtype=Float32),
Field(name="f2", dtype=Bool),
]
request_source = RequestSource(
name="source", schema=schema, description="desc", tags={}, owner="feast",
Expand Down