Skip to content
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

Allow top-level fields in node declaration #478

Merged
merged 5 commits into from
May 29, 2024
Merged

Conversation

phil-opp
Copy link
Collaborator

@phil-opp phil-opp commented Apr 18, 2024

We plan to deprecate operators in their current form in a future release. This PR implements the proposed new syntax for declaring custom nodes without an extra level of nesting:

nodes:
    - id: node_1
      path: something.py
      inputs:
        - input_1: "image"
        - input_2: "audio"
      outputs:
        - output_1
        - output_2

The inputs/outputs/etc fields are now directly declared next to the id field, instead of being nested under a custom field. The source field was renamed to path as discussed in our last meeting.

TODO:

  • add path alias to custom->source field to allow both names.

@phil-opp phil-opp force-pushed the dataflow-parsing branch 2 times, most recently from d7ffbe9 to 8c1412e Compare May 22, 2024 12:39
phil-opp added 2 commits May 22, 2024 14:39
We plan to (soft-)remove operators and simplify the dataflow YAML file by removing the additional nesting caused by the `custom` field. This commit prepares for that. See #474 for context.
We want to treat the nodes like custom nodes in this case since we plan to deprecate operators.
@phil-opp phil-opp force-pushed the dataflow-parsing branch from 8c1412e to ae13505 Compare May 22, 2024 12:39
@phil-opp phil-opp marked this pull request as ready for review May 22, 2024 12:39
@phil-opp phil-opp force-pushed the dataflow-parsing branch from ae13505 to f850980 Compare May 22, 2024 12:50
Copy link
Collaborator

@haixuanTao haixuanTao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you actually run

cargo run -p dora-core generate_schemas

To regenerate the JSON Schema.

Maybe I should have put a script to do this automatically

@phil-opp
Copy link
Collaborator Author

I regenerated the schemas in 7364860.

@phil-opp phil-opp requested a review from haixuanTao May 24, 2024 10:59
@haixuanTao
Copy link
Collaborator

LGTM

@haixuanTao haixuanTao merged commit e7858a6 into main May 29, 2024
17 checks passed
@haixuanTao haixuanTao deleted the dataflow-parsing branch May 29, 2024 18:00
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