Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-11337 Make example code in user guide testable
  3. SPARK-13018

Replace example code in mllib-pmml-model-export.md using include_example

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0
    • Documentation

    Description

      The example code in the user guide is embedded in the markdown and hence it is not easy to test. It would be nice to automatically test them. This JIRA is to discuss options to automate example code testing and see what we can do in Spark 1.6.

      Goal is to move actual example code to spark/examples and test compilation in Jenkins builds. Then in the markdown, we can reference part of the code to show in the user guide. This requires adding a Jekyll tag that is similar to https://github.com/jekyll/jekyll/blob/master/lib/jekyll/tags/include.rb, e.g., called include_example.

      {% include_example scala/org/apache/spark/examples/mllib/PMMLModelExportExample.scala %}

      Jekyll will find `examples/src/main/scala/org/apache/spark/examples/mllib/PMMLModelExportExample.scala` and pick code blocks marked "example" and replace code block in

      {% highlight %}

      in the markdown.

      See more sub-tasks in parent ticket: https://issues.apache.org/jira/browse/SPARK-11337

      Attachments

        Issue Links

          Activity

            People

              iamshrek Xin Ren
              yinxusen Xusen Yin
              Xusen Yin Xusen Yin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: