Skip to content

Comments

[SPARK-1439, SPARK-1440] Generate unified Scaladoc across projects and Javadocs#457

Closed
mateiz wants to merge 8 commits intoapache:masterfrom
mateiz:better-docs
Closed

[SPARK-1439, SPARK-1440] Generate unified Scaladoc across projects and Javadocs#457
mateiz wants to merge 8 commits intoapache:masterfrom
mateiz:better-docs

Conversation

@mateiz
Copy link
Contributor

@mateiz mateiz commented Apr 20, 2014

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/

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/14270/

@markhamstra
Copy link
Contributor

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 -diagrams option by looking at the scala-lang Scala API docs and expanding the Type Hierarchy section in the description of any class.

http://lamp.epfl.ch/files/content/sites/lamp/files/teaching/student-project-reports/semester/DamienObrist-SemesterProjectReport.pdf
http://stackoverflow.com/questions/13435474/how-to-generate-type-hierarchy-diagrams-with-scaladoc

@pwendell
Copy link
Contributor

It might make sense to have the javadoc link go to the org.apache.spark package.

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.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@mateiz
Copy link
Contributor Author

mateiz commented Apr 21, 2014

@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.

@AmplabJenkins
Copy link

Merged build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/14278/

@AmplabJenkins
Copy link

Build triggered.

@AmplabJenkins
Copy link

Build started.

@AmplabJenkins
Copy link

Build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/14303/

@AmplabJenkins
Copy link

Build triggered.

@mateiz
Copy link
Contributor Author

mateiz commented Apr 21, 2014

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.

@AmplabJenkins
Copy link

Build started.

@mateiz
Copy link
Contributor Author

mateiz commented Apr 21, 2014

@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).

@markhamstra
Copy link
Contributor

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.

@AmplabJenkins
Copy link

Build triggered.

@AmplabJenkins
Copy link

Build started.

@AmplabJenkins
Copy link

Build finished. All automated tests passed.

1 similar comment
@AmplabJenkins
Copy link

Build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/14307/

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/14308/

@pwendell
Copy link
Contributor

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.

@asfgit asfgit closed this in fc78384 Apr 22, 2014
asfgit pushed a commit that referenced this pull request Apr 22, 2014
…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
pdeyhim pushed a commit to pdeyhim/spark-1 that referenced this pull request Jun 25, 2014
…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
j-esse pushed a commit to j-esse/spark that referenced this pull request Jan 24, 2019
###### _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.
bzhaoopenstack pushed a commit to bzhaoopenstack/spark that referenced this pull request Sep 11, 2019
RolatZhang pushed a commit to RolatZhang/spark that referenced this pull request Aug 15, 2022
* KE-35988 minor fix when glue database location is empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants