Skip to content
Merged
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
Data source
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>

Signed-off-by: Author <kzhang@tecton.ai>
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
  • Loading branch information
kevjumba committed Apr 5, 2022
commit c90a22463e80b3605e58d80d07819bd2e41c84e9
9 changes: 6 additions & 3 deletions sdk/python/feast/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import warnings
import enum
import warnings
from abc import ABC, abstractmethod
Expand Down Expand Up @@ -421,6 +420,7 @@ def source_datatype_to_feast_value_type() -> Callable[[str], ValueType]:
def get_table_query_string(self) -> str:
raise NotImplementedError


class RequestSource(DataSource):
Comment thread
kevjumba marked this conversation as resolved.
Outdated
"""
RequestSource that can be used to provide input features for on demand transforms
Expand Down Expand Up @@ -494,10 +494,13 @@ def get_table_query_string(self) -> str:
def source_datatype_to_feast_value_type() -> Callable[[str], ValueType]:
raise NotImplementedError


class RequestDataSource(RequestSource):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also keep a test for RequestDataSource to make sure that it continues to work, and prints the deprecation warning? I think there's examples of this in the unit tests already.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup Added.

def __init__(self, *args, **kwargs):
warnings.warn("The 'RequestDataSource' class is deprecated and was renamed to RequestSource. Please use RequestSource instead.",
DeprecationWarning)
warnings.warn(
"The 'RequestDataSource' class is deprecated and was renamed to RequestSource. Please use RequestSource instead.",
Comment thread
kevjumba marked this conversation as resolved.
Outdated
DeprecationWarning,
)
RequestSource.__init__(*args, **kwargs)


Expand Down