-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-10382] Make example code in user guide testable #9109
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
Conversation
|
Test build #43703 has finished for PR 9109 at commit
|
docs/_config.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this gem if we have include_example.rb?
|
@mengxr I add a POC example of ml#Pipeline. But I am not sure that I select right files. But it demos what we need. |
|
It requires Pygments. So install Pygments before compile it. Actually it is the same with what defined in _config.yml. |
|
Test build #43932 has finished for PR 9109 at commit
|
|
Test build #43931 has finished for PR 9109 at commit
|
|
@yinxusen Ignore my first comment. Jekyll uses pygments too for syntax highlighting. So we are not introducing new dependencies. |
|
@yinxusen Could you update the PR to support multiple example code blocks in one file? It is quite comment to have imports + example code - boilerplate code in the user guide. If you show that it works, we can remove the example and then merge this PR. |
|
@mengxr Yes, I'll do it ASAP. |
|
@mengxr You can check the POC now. If it is OK, I will remove the example. Next time we can enjoy easy code sample insertion in docs. |
|
Test build #44036 has finished for PR 9109 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add Apache header? See copy_api_dirs.rb.
|
Yes, it looks good. Please remove the example, add Apache header, then remove |
docs/_plugins/include_example.rb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: if we still want to follow Spark code style, it should be select { instead of select{
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will fix it.
|
Test build #44212 has finished for PR 9109 at commit
|
|
LGTM. Merged into master. Thanks! This makes the example code much easier to check. Could you make one JIRA and submit a PR to replace some example code using this? Then we can create more JIRAs, and ask community to help. |
|
@mengxr Sure I can do that. |
A POC code for making example code in user guide testable.
@mengxr We still need to talk about the labels in code.