-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: add semantic type to create_data_stream #3148
feat: add semantic type to create_data_stream #3148
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raphaelbalzer thanks for the PR! Is it possible to make this backwards compatible by introducing a new method and deprecating the existing method?
@@ -48,11 +51,26 @@ class RuntimeType(Enum): | |||
INTEGER = "integer" | |||
LONG = "long" | |||
|
|||
class SemanticType(Enum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is SemanticType
used for?
I can't find any usage
@@ -117,3 +136,35 @@ def create_data_stream( | |||
|
|||
data_stream.element_id = sanitized_stream_id | |||
return data_stream | |||
|
|||
# TODO Use an more general approach to create a data stream | |||
@deprecated('deprecated; please use "compose_data_stream" instead.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please adapt the tests that use create_data_stream
as well?
In addition, it would be great to have some dedicated tests for the new compose_data_stream
function, if you are open to it
Hello there 👋 |
Hello there 👋 |
Purpose
Enable specifying a semantic type for the attributes of a datastream. For example, images can now be included in an output stream.
Remarks
Instead of a string representing the runtime type, an instance of a dataclass containing information about the semantic type and runtime type needs to be passed as a value for the attribute key.
PR introduces (a) breaking change(s): <yes/no>
PR introduces (a) deprecation(s): <yes/no>