aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJosh Rosen <joshrosen@eecs.berkeley.edu>2012-12-27 17:55:33 -0800
committerJosh Rosen <joshrosen@eecs.berkeley.edu>2012-12-27 18:04:10 -0800
commit85b8f2c64f0fc4be5645d8736629fc082cb3587b (patch)
treedba808b3c96d0241654b4b0c99ec0786ac2339dd /docs
parent2d98fff0651af4d527f41ba50c01f453fa049464 (diff)
downloadspark-85b8f2c64f0fc4be5645d8736629fc082cb3587b.tar.gz
spark-85b8f2c64f0fc4be5645d8736629fc082cb3587b.tar.bz2
spark-85b8f2c64f0fc4be5645d8736629fc082cb3587b.zip
Add epydoc API documentation for PySpark.
Diffstat (limited to 'docs')
-rw-r--r--docs/README.md8
-rwxr-xr-xdocs/_layouts/global.html10
-rw-r--r--docs/_plugins/copy_api_dirs.rb17
3 files changed, 30 insertions, 5 deletions
diff --git a/docs/README.md b/docs/README.md
index 092153070e..887f407f18 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -25,10 +25,12 @@ To mark a block of code in your markdown to be syntax highlighted by jekyll duri
// supported languages too.
{% endhighlight %}
-## Scaladoc
+## API Docs (Scaladoc and Epydoc)
You can build just the Spark scaladoc by running `sbt/sbt doc` from the SPARK_PROJECT_ROOT directory.
-When you run `jekyll` in the docs directory, it will also copy over the scala doc for the various Spark subprojects into the docs directory (and then also into the _site directory). We use a jekyll plugin to run `sbt/sbt doc` before building the site so if you haven't run it (recently) it may take some time as it generates all of the scaladoc.
+Similarly, you can build just the PySpark epydoc by running `epydoc --config epydoc.conf` from the SPARK_PROJECT_ROOT/pyspark directory.
-NOTE: To skip the step of building and copying over the scaladoc when you build the docs, run `SKIP_SCALADOC=1 jekyll`.
+When you run `jekyll` in the docs directory, it will also copy over the scaladoc for the various Spark subprojects into the docs directory (and then also into the _site directory). We use a jekyll plugin to run `sbt/sbt doc` before building the site so if you haven't run it (recently) it may take some time as it generates all of the scaladoc. The jekyll plugin also generates the PySpark docs using [epydoc](http://epydoc.sourceforge.net/).
+
+NOTE: To skip the step of building and copying over the scaladoc when you build the docs, run `SKIP_SCALADOC=1 jekyll`. Similarly, `SKIP_EPYDOC=1 jekyll` will skip PySpark API doc generation.
diff --git a/docs/_layouts/global.html b/docs/_layouts/global.html
index 41ad5242c9..43a5fa3e1c 100755
--- a/docs/_layouts/global.html
+++ b/docs/_layouts/global.html
@@ -49,8 +49,14 @@
<li><a href="java-programming-guide.html">Java</a></li>
</ul>
</li>
-
- <li><a href="api/core/index.html">API (Scaladoc)</a></li>
+
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">API<b class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li><a href="api/core/index.html">Scala/Java (Scaladoc)</a></li>
+ <li><a href="api/pyspark/index.html">Python (Epydoc)</a></li>
+ </ul>
+ </li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Deploying<b class="caret"></b></a>
diff --git a/docs/_plugins/copy_api_dirs.rb b/docs/_plugins/copy_api_dirs.rb
index e61c105449..577f3ebe70 100644
--- a/docs/_plugins/copy_api_dirs.rb
+++ b/docs/_plugins/copy_api_dirs.rb
@@ -28,3 +28,20 @@ if ENV['SKIP_SCALADOC'] != '1'
cp_r(source + "/.", dest)
end
end
+
+if ENV['SKIP_EPYDOC'] != '1'
+ puts "Moving to pyspark directory and building epydoc."
+ cd("../pyspark")
+ puts `epydoc --config epydoc.conf`
+
+ puts "Moving back into docs dir."
+ cd("../docs")
+
+ puts "echo making directory pyspark"
+ mkdir_p "pyspark"
+
+ puts "cp -r ../pyspark/docs/. api/pyspark"
+ cp_r("../pyspark/docs/.", "api/pyspark")
+
+ cd("..")
+end