Skip to content

Feat: doraflow api#1106

Merged
haixuanTao merged 21 commits intodora-rs:mainfrom
heyong4725:feature/doraflow-api
Sep 25, 2025
Merged

Feat: doraflow api#1106
haixuanTao merged 21 commits intodora-rs:mainfrom
heyong4725:feature/doraflow-api

Conversation

@heyong4725
Copy link
Copy Markdown
Collaborator

  • Title: "feat(python): Add doraflow Pythonic API".

This PR introduces the new doraflow Pythonic API, providing an imperative and developer-friendly way to define dora dataflows directly within Python.

Key changes include:

  • New doraflow API: Implemented Dataflow, Node, and Operator classes for a Pythonic dataflow definition.
  • Comprehensive Documentation: Created detailed API documentation for doraflow to facilitate user adoption.
  • Updated Examples: Provided new and updated examples in the examples/doraflow directory, showcasing the API's capabilities, including a translation dataflow.

Copy link
Copy Markdown
Collaborator

@phil-opp phil-opp left a comment

Choose a reason for hiding this comment

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

Thanks, looks useful! I like that it just generates a YAML file and invokes the normal dora CLI commands, so we don't need any special handling in dora itself.

I haven't tried the new APIs or examples yet, but I skimmed the code a bit. I noticed a few things that could be improved, see my inline comments.

@phil-opp phil-opp added the waiting-for-author The pull request requires adjustments by the PR author. label Sep 3, 2025
heyong4725 and others added 17 commits September 25, 2025 12:01
Implement run, start, and stop methods in doraflow API to execute dataflows.

Add translation_dataflow.py example.

Create API documentation for doraflow.

Remove generated artifacts from the repository.
Rename directory examples/python-api-dataflow to examples/doraflow.

Update DORAFLOW_API_DESIGN.md to remove set_entry_point method.
- Add doraflow API announcement to 'Latest News' section.

- Update 'Python API' link to point to new doraflow documentation.

- Update 'Examples' section to include doraflow examples and update YOLO example path.
Copy link
Copy Markdown
Collaborator

@phil-opp phil-opp left a comment

Choose a reason for hiding this comment

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

Looks good to me overall!

Comment on lines +50 to +52
print("Skipping build and run steps due to NO_BUILD env var")
print("Running dataflow.yml")
run("dataflow.yml", uv=True)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The run step is not actually skipped, is it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah sorry AI magic.

python simple_example.py
```

To skip the build and run steps (useful for testing YAML generation only):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This also needs adjustment

@phil-opp
Copy link
Copy Markdown
Collaborator

I opened #1147 to fix the "Check for specified rust-version" CI failure.

@haixuanTao haixuanTao merged commit 77f7d8f into dora-rs:main Sep 25, 2025
50 checks passed
@heyong4725 heyong4725 deleted the feature/doraflow-api branch October 1, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-for-author The pull request requires adjustments by the PR author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants