-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add query downstream api #394
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
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.
Pull Request Overview
This PR introduces a new query_downstream API to the Python SDK, a corresponding example flow, and an end-to-end test to exercise the feature.
- Adds
Context.query_downstreamasync method for retrieving downstream nodes. - Provides a new example flow (
query-downstream) with two Python scriptlets. - Adds an integration test in TypeScript to run the new flow.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| oocana/oocana/context.py | Added query_downstream method to Context with request/response handling. |
| flow-examples/test/flow.test.ts | Added a test case for running the query-downstream flow. |
| flow-examples/flows/query-downstream/scriptlets/+scriptlet#1.py | Scriptlet that calls context.query_downstream and prints results. |
| flow-examples/flows/query-downstream/scriptlets/+scriptlet#2.py | Scriptlet that returns a dummy output for the downstream node. |
| flow-examples/flows/query-downstream/flow.oo.yaml | Defined the new query-downstream flow with two Python nodes. |
Comments suppressed due to low confidence (3)
oocana/oocana/context.py:589
- The docstring parameter name does not match the function signature (
handlesvshandle). Update the:paramtohandlesto align with the parameter name.
:param handle: the handle of the output, should be defined in the block schema output defs. If None means query all handles.
oocana/oocana/context.py:594
- [nitpick] The variable name
fis ambiguous. Consider renaming it tofutureorresult_futurefor better readability.
f: asyncio.Future[Dict[str, Any]] = loop.create_future()
flow-examples/test/flow.test.ts:58
- [nitpick] The test only verifies the exit code; consider adding assertions to validate the output from
query_downstream(e.g., checking logged results or returned events) to ensure the flow behaves as expected.
expect(code).toBe(0);
flow-examples/flows/query-downstream/scriptlets/+scriptlet#2.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
oomol/oocana-rust#229 's python implementation