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

docs: add the examples crate for rust #122

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gohalo
Copy link
Contributor

@gohalo gohalo commented Aug 30, 2024

Description

How are the changes test-covered

  • N/A
  • Automated tests (unit and/or integration tests)
  • Manual tests
    • Details are described below

Copy link

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@f56603b). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #122   +/-   ##
=======================================
  Coverage        ?   87.60%           
=======================================
  Files           ?       14           
  Lines           ?      702           
  Branches        ?        0           
=======================================
  Hits            ?      615           
  Misses          ?       87           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@codope codope left a comment

Choose a reason for hiding this comment

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

Thanks for adding an example. I am assuming you plan to build more on top of this.

@xushiyan Could you please review as well?

crates/examples/hello.rs Outdated Show resolved Hide resolved
Comment on lines 30 to 35
[dependencies]
hudi = { path = "../hudi", features=["datafusion"] }

[dev-dependencies]
tokio = { workspace = true, features=["full"] }
datafusion = { workspace = true }
Copy link
Member

Choose a reason for hiding this comment

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

@xushiyan Could you confirm the dependencies are correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe only the macros features will work.

Copy link
Member

@xushiyan xushiyan left a comment

Choose a reason for hiding this comment

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

@gohalo thanks for raising this. While an "examples" crate can be helpful, we won't merge nice-to-have PRs until we can justify the value of the code. As of now, it's a simple example repeating the one on the readme. What other examples could we add there in future? How do we expect users to use and benefit from it? How can the example code be tested properly so we can easily evolve it? If we are to create a website, how can we consolidate the code here and the examples to show on website?

In short, I'm highlighting that we need to make a proper plan or design for any major addition to the codebase. You may want to create an issue for design, plan, and discussion first.

@gohalo
Copy link
Contributor Author

gohalo commented Aug 31, 2024

@gohalo thanks for raising this. While an "examples" crate can be helpful, we won't merge nice-to-have PRs until we can justify the value of the code. As of now, it's a simple example repeating the one on the readme. What other examples could we add there in future? How do we expect users to use and benefit from it? How can the example code be tested properly so we can easily evolve it? If we are to create a website, how can we consolidate the code here and the examples to show on website?

It's just a startup example for now. Recently, i'm trying to build a local minio env, and also working on create the table, support writing and so on. Maybe the examples will be a good startup for user and especilly for developer to run some basic example.

In short, I'm highlighting that we need to make a proper plan or design for any major addition to the codebase. You may want to create an issue for design, plan, and discussion first.

Just open an issue #123

@xushiyan
Copy link
Member

xushiyan commented Nov 30, 2024

we should evolve the changes such that the examples are embedded in the rust module level docs and shown in docs.rs like https://docs.rs/pyo3/latest/pyo3/#example-using-python-from-rust
this is more canonical way of showing examples, and automatically we'll get the example code tested by doc testing.

echoing the comment here #123 (comment)

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.

3 participants