Skip to content

Conversation

@leavesster
Copy link
Contributor

oomol/oocana-rust#229 's python implementation

@leavesster leavesster requested a review from Copilot July 16, 2025 03:28
Copy link
Contributor

Copilot AI left a 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_downstream async 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 (handles vs handle). Update the :param to handles to 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 f is ambiguous. Consider renaming it to future or result_future for 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);

leavesster and others added 6 commits July 16, 2025 11:30
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>
@leavesster leavesster closed this Jul 16, 2025
@leavesster leavesster reopened this Jul 16, 2025
@leavesster leavesster merged commit 0c1cc21 into main Jul 16, 2025
7 of 9 checks passed
@leavesster leavesster deleted the query-downstream branch July 16, 2025 08:29
@oomol-bot oomol-bot mentioned this pull request Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants