[SPARK-16294][SQL] Labelling support for the include_example Jekyll plugin#13972
[SPARK-16294][SQL] Labelling support for the include_example Jekyll plugin#13972liancheng wants to merge 3 commits intoapache:masterfrom
Conversation
|
@mengxr Could you please help review this PR? Thanks! |
|
Test build #61467 has finished for PR 13972 at commit
|
|
@yinxusen Could you please help review this one since you're the original author of this plugin? |
|
I'll take a look. |
|
One small matter is that we can't use intersecting labels, e.g. // $example on:init_session$
some code
// $example on:build_session$
some code
// $example off:init_session$
// $example off:build_session$But this is a rare case I think. Otherwise LGTM. |
|
@yinxusen Thanks for the review! Also discussed with @mengxr. IIUC, overlapped labels are most useful for handling imports, since sometimes we may want to include one import line in multiple example snippet blocks. Regarding to this issue, I have two concerns:
|
|
@yinxusen @mengxr Actually I found that implementing overlapped labelling is far more easier than I expected earlier... So did it in the last commit. Made the following experiment to illustrate the effect: # $SPARK_HOME/examples/src/main/python/test.py
# $example on:foo$
import used.by.foo
# $example on:bar$
import common.stuff
# $example off:foo$
import used.by.bar
# $example off:bar$Liquid template: Screenshot: |
|
LGTM |
|
@yinxusen Thanks! |
|
@mengxr With this PR merged, I think we can also fix the SPARK-13015 (mllib-data-types.md ) with a consolidated example file. |
|
Test build #61519 has finished for PR 13972 at commit
|
…lugin ## What changes were proposed in this pull request? This PR adds labelling support for the `include_example` Jekyll plugin, so that we may split a single source file into multiple line blocks with different labels, and include them in multiple code snippets in the generated HTML page. ## How was this patch tested? Manually tested. <img width="923" alt="screenshot at jun 29 19-53-21" src="https://cloud.githubusercontent.com/assets/230655/16451099/66a76db2-3e33-11e6-84fb-63104c2f0688.png"> Author: Cheng Lian <lian@databricks.com> Closes #13972 from liancheng/include-example-with-labels. (cherry picked from commit bde1d6a) Signed-off-by: Xiangrui Meng <meng@databricks.com>
|
LGTM2. Merged into master and branch-2.0. Thanks! |
|
@yinxusen Do you have time to consolidate example files for |
|
Thanks for the review! |
|
Other example snippets in the SQL programming guide will be updated in follow-up PRs. |
|
@mengxr Sure |
## What changes were proposed in this pull request? * Update SparkR ML section to make them consistent with SparkR API docs. * Since #13972 adds labelling support for the ```include_example``` Jekyll plugin, so that we can split the single ```ml.R``` example file into multiple line blocks with different labels, and include them in different algorithms/models in the generated HTML page. ## How was this patch tested? Only docs update, manually check the generated docs. Author: Yanbo Liang <ybliang8@gmail.com> Closes #14011 from yanboliang/r-user-guide-update. (cherry picked from commit 2ad031b) Signed-off-by: Shivaram Venkataraman <shivaram@cs.berkeley.edu>
## What changes were proposed in this pull request? * Update SparkR ML section to make them consistent with SparkR API docs. * Since #13972 adds labelling support for the ```include_example``` Jekyll plugin, so that we can split the single ```ml.R``` example file into multiple line blocks with different labels, and include them in different algorithms/models in the generated HTML page. ## How was this patch tested? Only docs update, manually check the generated docs. Author: Yanbo Liang <ybliang8@gmail.com> Closes #14011 from yanboliang/r-user-guide-update.

What changes were proposed in this pull request?
This PR adds labelling support for the
include_exampleJekyll plugin, so that we may split a single source file into multiple line blocks with different labels, and include them in multiple code snippets in the generated HTML page.How was this patch tested?
Manually tested.