aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDavies Liu <davies.liu@gmail.com>2014-10-07 18:09:27 -0700
committerJosh Rosen <joshrosen@apache.org>2014-10-07 18:09:27 -0700
commit798ed22c289cf65f2249bf2f4250285685ca69e7 (patch)
tree137d93c32454aaf39e6416823a8604f816f73926 /docs
parentb69c9fb6fb048509bbd8430fb697dc3a5ca4fe59 (diff)
downloadspark-798ed22c289cf65f2249bf2f4250285685ca69e7.tar.gz
spark-798ed22c289cf65f2249bf2f4250285685ca69e7.tar.bz2
spark-798ed22c289cf65f2249bf2f4250285685ca69e7.zip
[SPARK-3412] [PySpark] Replace Epydoc with Sphinx to generate Python API docs
Retire Epydoc, use Sphinx to generate API docs. Refine Sphinx docs, also convert some docstrings into Sphinx style. It looks like: ![api doc](https://cloud.githubusercontent.com/assets/40902/4538272/9e2d4f10-4dec-11e4-8d96-6e45a8fe51f9.png) Author: Davies Liu <davies.liu@gmail.com> Closes #2689 from davies/docs and squashes the following commits: bf4a0a5 [Davies Liu] fix links 3fb1572 [Davies Liu] fix _static in jekyll 65a287e [Davies Liu] fix scripts and logo 8524042 [Davies Liu] Merge branch 'master' of github.com:apache/spark into docs d5b874a [Davies Liu] Merge branch 'master' of github.com:apache/spark into docs 4bc1c3c [Davies Liu] refactor 746d0b6 [Davies Liu] @param -> :param 240b393 [Davies Liu] replace epydoc with sphinx doc
Diffstat (limited to 'docs')
-rw-r--r--docs/README.md8
-rw-r--r--docs/_config.yml3
-rw-r--r--docs/_plugins/copy_api_dirs.rb19
3 files changed, 17 insertions, 13 deletions
diff --git a/docs/README.md b/docs/README.md
index 79708c3df9..0facecdd5f 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -54,19 +54,19 @@ phase, use the following sytax:
// supported languages too.
{% endhighlight %}
-## API Docs (Scaladoc and Epydoc)
+## API Docs (Scaladoc and Sphinx)
You can build just the Spark scaladoc by running `sbt/sbt doc` from the SPARK_PROJECT_ROOT directory.
-Similarly, you can build just the PySpark epydoc by running `epydoc --config epydoc.conf` from the
-SPARK_PROJECT_ROOT/pyspark directory. Documentation is only generated for classes that are listed as
+Similarly, you can build just the PySpark docs by running `make html` from the
+SPARK_PROJECT_ROOT/python/docs directory. Documentation is only generated for classes that are listed as
public in `__init__.py`.
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/).
+PySpark docs [Sphinx](http://sphinx-doc.org/).
NOTE: To skip the step of building and copying over the Scala and Python API docs, run `SKIP_API=1
jekyll`.
diff --git a/docs/_config.yml b/docs/_config.yml
index 7bc3a78e2d..f4bf242ac1 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -8,6 +8,9 @@ gems:
kramdown:
entity_output: numeric
+include:
+ - _static
+
# These allow the documentation to be updated with nerw releases
# of Spark, Scala, and Mesos.
SPARK_VERSION: 1.0.0-SNAPSHOT
diff --git a/docs/_plugins/copy_api_dirs.rb b/docs/_plugins/copy_api_dirs.rb
index 3b02e090ae..4566a2fff5 100644
--- a/docs/_plugins/copy_api_dirs.rb
+++ b/docs/_plugins/copy_api_dirs.rb
@@ -63,19 +63,20 @@ if not (ENV['SKIP_API'] == '1' or ENV['SKIP_SCALADOC'] == '1')
puts "cp -r " + source + "/. " + dest
cp_r(source + "/.", dest)
- # Build Epydoc for Python
- puts "Moving to python directory and building epydoc."
- cd("../python")
- puts `epydoc --config epydoc.conf`
+ # Build Sphinx docs for Python
- puts "Moving back into docs dir."
- cd("../docs")
+ puts "Moving to python/docs directory and building sphinx."
+ cd("../python/docs")
+ puts `make html`
+
+ puts "Moving back into home dir."
+ cd("../../")
puts "Making directory api/python"
- mkdir_p "api/python"
+ mkdir_p "docs/api/python"
- puts "cp -r ../python/docs/. api/python"
- cp_r("../python/docs/.", "api/python")
+ puts "cp -r python/docs/_build/html/. docs/api/python"
+ cp_r("python/docs/_build/html/.", "docs/api/python")
cd("..")
end