Skip to content

Diagram python op#191

Open
aaronchongth wants to merge 13 commits into
python_opfrom
diagram-python-op
Open

Diagram python op#191
aaronchongth wants to merge 13 commits into
python_opfrom
diagram-python-op

Conversation

@aaronchongth
Copy link
Copy Markdown
Member

@aaronchongth aaronchongth commented May 5, 2026

New feature implementation

Implemented feature

  • script environment manager
    • create, edit, delete script environments
    • highlight script nodes using a specific script environment
    • prevents deletion of script environments if script nodes are using the environment
    • script editor (added react-codemirror as dependency)
    • reads what script builders are available, also reads language and default script, for now only python is supported
  • script node
    • selection of script environment
    • added exporting and connections
  • added a context for handling notifications, to provide some feedback when users create, edit or delete script environments. We can migrate error notifications to this, in the future. Keeping this PR easier to review for now
  • minor linting

Discussion points

  • only supporting python for now, as each language support is an additional dep to the frontend. It is described in a tooltip for now
python.mp4
  • although regex is fun, I can't say for certain the implementation is foolproof. It would be better to use well tested tools to detect functions if possible instead

GenAI Use

We follow OSRA's policy on GenAI tools

  • I used a GenAI tool in this PR.
  • I did not use GenAI

Generated-by: Gemini Flash

@mxgrey mxgrey added this to PMC Board May 5, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in PMC Board May 5, 2026
@aaronchongth aaronchongth marked this pull request as draft May 5, 2026 01:15
@aaronchongth aaronchongth moved this from Inbox to In Progress in PMC Board May 5, 2026
@aaronchongth aaronchongth marked this pull request as ready for review May 22, 2026 09:29
@aaronchongth aaronchongth requested review from mxgrey May 22, 2026 09:36
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
…for dropdown, language and example

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
@aaronchongth
Copy link
Copy Markdown
Member Author

ci_linux is not passing because these branches do not have #196 yet

I've made the following changes according to feedback and our demo,

  • a1e6f32 - multiple stream outs are supported now, and exporting stream outs from script nodes
  • 28a7825 - add tests for loading diagrams and validating connections (we are using our basic map based validation for now, full inference validation will require [Feature request]: Use diagram inference to validate if connections and types are valid #203), and API level tests where we run the loaded diagrams against their example inputs
  • 602867b - the forms for script environment builders were abstracted out, with a default form that has the json config style, while developers can implement their own form based on a builder, in this case a form for process-bound-python was implemented to allow choosing ownership, defaulting to script for the code editor and hiding away the json config
python-op-0529.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants