-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Run / Test all examples in Documentation #14435
Comments
I think this would be a good first issue for people to work on as it is self contained, well described, doesn't require deep internals experience, and would give you exposure to the API |
@alamb I found that some tests failed because multiple code blocks shared some imports. For example, should we repeat the necessary imports in the second block? |
Hey I would like to have a try, I am quite interested in the datafusion and daft project and have been exploring both recently |
Yes I think that is what is needed for now. If that makes the documentation too messy maybe we can figure out how to do the rustdoc style of hiding lines that start with Thanks @Chen-Yuan-Lai |
Thank you @ugoa -- that is great! I recommend you pick of of the files above and then work through the errors to get all the tests passing |
Hey @alamb @Chen-Yuan-Lai folks, here is my attempt to fix doctest for file cargo test --doc -- library_user_guide_adding_udfs However, I do need advice on how to improve the issue pointed out by @Chen-Yuan-Lai. For this MR I take the (#) approach as suggested, but the doc becomes quite long, and the build process is also required to change because the Anyway looking forward to your feedback, cheers! |
Is your feature request related to a problem or challenge?
The https://datafusion.apache.org/library-user-guide/index.html has some great examples ❤
However, not all of these examples are actually tested during CI which results in issues like this one found (and fixed!) by @nuno-faria
library-user-guide/adding-udfs
#14404It is possible to prevent this type of problem by testing the examples automatically, following the instructions here
datafusion/datafusion/core/src/lib.rs
Lines 819 to 844 in 67bc04c
Describe the solution you'd like
I would like to test all examples in the entire User Guide and Library User Guide.
Here are the files in the
docs/source/library-user-guide
directory. The ones that are not checked do not have their examples checked yetdocs/source/library-user-guide/adding-udfs.md
docs/source/library-user-guide/api-health.md
docs/source/library-user-guide/building-logical-plans.md
docs/source/library-user-guide/catalogs.md
docs/source/library-user-guide/custom-table-providers.md
docs/source/library-user-guide/extending-operators.md
docs/source/library-user-guide/extensions.md
docs/source/library-user-guide/index.md
docs/source/library-user-guide/profiling.md
docs/source/library-user-guide/query-optimizer.md
docs/source/library-user-guide/using-the-dataframe-api.md
docs/source/library-user-guide/using-the-sql-api.md
docs/source/library-user-guide/working-with-exprs.md
Describe alternatives you've considered
To test the examples on a particular page, such as
adding-udfs.md
Step 1: Add entry to
lib.rs
Step 2: Run tests:
Step 3: Fix issues / run again
(iterate and repeat until test passes)
Additional context
No response
The text was updated successfully, but these errors were encountered: