-
Notifications
You must be signed in to change notification settings - Fork 280
test: add unit tests to execute transform flow e2e #737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Sorry for keeping this for so long. Said here, does that mean now we can write the code without defining NewParent here, after #758? @cocoindex.transform_flow()
def for_each_transform(
data: cocoindex.DataSlice[Parent],
) -> cocoindex.DataSlice[typing.Any]: # No need to specify cocoindex.DataSlice[NewParent]?
with data["children"].row() as child:
child["new_field"] = child["value"].transform(extract_value)
return data
``` |
No worries. Yes, that's true. We can rewrite the code without defining NewParent here. Besides, because of #818, it's still possible that even if returning a |
|
|
Perfect! Thanks a lot for adding the tests! |
resolve #618.