Skip to content

Export a workflow as Python from the editor, and read the schema's constraints in the property panel #8427

Description

@kz930

Task Summary

Everything the browser side of this work needs, in one step.

A button on the workflow toolbar asks the compiling service to translate the canvas into a Python script and shows what comes back, with a copy control so the script can be taken somewhere that runs it. The translation is a round trip, so the button disables itself while one is in flight, and a workflow the translator cannot express comes back with a reason rather than an empty modal. The route is added in the two places a browser reaches the compiling service from: the dev server's proxy and the single-node nginx.

A workflow that fails to compile cannot be executed either, so the run button reads the compilation state alongside the schema and port validation it already read. Running to one operator is offered only when everything upstream of it compiled too, not only the operator itself.

The property panel reads the constraints the schema declares. A column property is checked against the attribute type rule for every column it names rather than only the first. A hyperparameter's value renders as the control its parameter implies: a dropdown where the accepted set is known, a number input where it is numeric, a plain text box where the rules say nothing.

Twenty-first of the twenty-one steps listed in #8325. It touches no Scala, so it compiles and its tests run on their own; the endpoint the button calls is added in #8327, and until that lands the button reports that the request failed and nothing else changes. The run-button change is filed separately as #7981 and closes with this work; #7979, #7952 and #7936 are part-of, since each is only fixed once the schema half in the trainers step lands too.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions