[SPARK-1439, SPARK-1440] Generate unified Scaladoc across projects and Javadocs#457
[SPARK-1439, SPARK-1440] Generate unified Scaladoc across projects and Javadocs#457mateiz wants to merge 8 commits intoapache:masterfrom
Conversation
|
Merged build triggered. |
|
Merged build started. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
|
One other thing that you might consider is turning on the option to generate Type Hierarchy diagrams in the published scaladocs. It's not hard to do, and works well if you've got the necessary external dependencies installed and configured, but I wouldn't recommend turning the option on by default since anyone trying to build the docs on their own will see a bunch of errors if Graphviz isn't already installed. You can see the results of the http://lamp.epfl.ch/files/content/sites/lamp/files/teaching/student-project-reports/semester/DamienObrist-SemesterProjectReport.pdf |
|
It might make sense to have the javadoc link go to the Also, it might be nice to have the Scaladoc for the org.apache.spark package now link to the other package docs (MLLib/SQL/etc) since as it stands there is no index into those packages pages. Also - it's unrelated to this pull request, but it would be nice to group the things in the org.apache.spark package. Right now the doc is a bit overwhelming. |
|
Merged build triggered. |
|
Merged build started. |
|
@pwendell I've modified the Javadoc landing page to list things by group, which I think is better: http://people.csail.mit.edu/matei/spark-unified-docs/api/java/index.html. Unfortunately you can't link to the Spark package by default without losing the frames on the left, and as far as I can tell you can't modify the HTML on the landing page in any way other than creating groups. I also saw that you need to create a separate package-info.java to have package-level docs in Java. I've added one as an example but it will be quite a bit of work to create them for every package. Later on it may be possible to modify Genjavadoc to create them from package.scala. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
Thanks @marmbrus for the SBT rule to do this!
|
Build triggered. |
|
Build started. |
|
Build finished. All automated tests passed. |
|
All automated tests passed. |
anchors on page load
|
Build triggered. |
|
I think this is ready to go now -- see http://people.csail.mit.edu/matei/spark-unified-docs/ for updated docs. I've included some code from Michael to clean up the classes shown in Javadoc, and fixed links in our main docs to go to Javadoc. One thing still missing is injecting some JavaScript to deal with the ::Experimental:: and ::DeveloperAPI:: tags in Javadoc, but we can add that in a separate PR. Same thing with adding package-info.java for all the Java classes. |
|
Build started. |
|
@markhamstra I tried -diagrams for a bit but it complained that Graphviz failed on too many of our files, and then it gave up on generating them. It might be possible to debug it but I'd push it for later -- it sounds like this feature isn't 100% robust (my guess is that it generated .dot files that Graphviz wasn't able to parse). |
|
Ah, ok -- it's been awhile since I tried it on the Spark tree, so it may not be as usable on the current state of the code. The diagrams would be nice to have, but certainly not necessary. |
|
Build triggered. |
|
Build started. |
|
Build finished. All automated tests passed. |
1 similar comment
|
Build finished. All automated tests passed. |
|
All automated tests passed. |
|
All automated tests passed. |
|
Okay I tested this locally and I'm going to merge it. One thing I noticed is that in catalyst/hive a ton of things are exposed that we might want to either make package-private or just exclude when we build docs (e.g. type classes, expression classes, etc). Probably @marmbrus can take a look. |
…d Javadocs I used the sbt-unidoc plugin (https://github.com/sbt/sbt-unidoc) to create a unified Scaladoc of our public packages, and generate Javadocs as well. One limitation is that I haven't found an easy way to exclude packages in the Javadoc; there is a SBT task that identifies Java sources to run javadoc on, but it's been very difficult to modify it from outside to change what is set in the unidoc package. Some SBT-savvy people should help with this. The Javadoc site also lacks package-level descriptions and things like that, so we may want to look into that. We may decide not to post these right now if it's too limited compared to the Scala one. Example of the built doc site: http://people.csail.mit.edu/matei/spark-unified-docs/ Author: Matei Zaharia <matei@databricks.com> This patch had conflicts when merged, resolved by Committer: Patrick Wendell <pwendell@gmail.com> Closes #457 from mateiz/better-docs and squashes the following commits: a63d4a3 [Matei Zaharia] Skip Java/Scala API docs for Python package 5ea1f43 [Matei Zaharia] Fix links to Java classes in Java guide, fix some JS for scrolling to anchors on page load f05abc0 [Matei Zaharia] Don't include java.lang package names 995e992 [Matei Zaharia] Skip internal packages and class names with $ in JavaDoc a14a93c [Matei Zaharia] typo 76ce64d [Matei Zaharia] Add groups to Javadoc index page, and a first package-info.java ed6f994 [Matei Zaharia] Generate JavaDoc as well, add titles, update doc site to use unified docs acb993d [Matei Zaharia] Add Unidoc plugin for the projects we want Unidoced (cherry picked from commit fc78384) Conflicts: project/SparkBuild.scala
…d Javadocs I used the sbt-unidoc plugin (https://github.com/sbt/sbt-unidoc) to create a unified Scaladoc of our public packages, and generate Javadocs as well. One limitation is that I haven't found an easy way to exclude packages in the Javadoc; there is a SBT task that identifies Java sources to run javadoc on, but it's been very difficult to modify it from outside to change what is set in the unidoc package. Some SBT-savvy people should help with this. The Javadoc site also lacks package-level descriptions and things like that, so we may want to look into that. We may decide not to post these right now if it's too limited compared to the Scala one. Example of the built doc site: http://people.csail.mit.edu/matei/spark-unified-docs/ Author: Matei Zaharia <matei@databricks.com> This patch had conflicts when merged, resolved by Committer: Patrick Wendell <pwendell@gmail.com> Closes apache#457 from mateiz/better-docs and squashes the following commits: a63d4a3 [Matei Zaharia] Skip Java/Scala API docs for Python package 5ea1f43 [Matei Zaharia] Fix links to Java classes in Java guide, fix some JS for scrolling to anchors on page load f05abc0 [Matei Zaharia] Don't include java.lang package names 995e992 [Matei Zaharia] Skip internal packages and class names with $ in JavaDoc a14a93c [Matei Zaharia] typo 76ce64d [Matei Zaharia] Add groups to Javadoc index page, and a first package-info.java ed6f994 [Matei Zaharia] Generate JavaDoc as well, add titles, update doc site to use unified docs acb993d [Matei Zaharia] Add Unidoc plugin for the projects we want Unidoced
###### _excavator_ is a bot for automating changes across repositories.
Changes produced by the versions-props/upgrade-all check.
{runtimeCheckDesc}
To enable or disable this check, please contact the maintainers of Excavator.
Add kind testing against ARM64
* KE-35988 minor fix when glue database location is empty
I used the sbt-unidoc plugin (https://github.com/sbt/sbt-unidoc) to create a unified Scaladoc of our public packages, and generate Javadocs as well. One limitation is that I haven't found an easy way to exclude packages in the Javadoc; there is a SBT task that identifies Java sources to run javadoc on, but it's been very difficult to modify it from outside to change what is set in the unidoc package. Some SBT-savvy people should help with this. The Javadoc site also lacks package-level descriptions and things like that, so we may want to look into that. We may decide not to post these right now if it's too limited compared to the Scala one.
Example of the built doc site: http://people.csail.mit.edu/matei/spark-unified-docs/