Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ may take some time as it generates all of the scaladoc. The jekyll plugin also
Python docs [Sphinx](http://sphinx-doc.org/).

NOTE: To skip the step of building and copying over the Scala, Python API docs, run `SKIP_API=1
jekyll`.
jekyll build`. To skip building Scala API docs, run `SKIP_SCALADOC=1 jekyll build`; to skip building Python API docs, run `SKIP_PYTHONDOC=1 jekyll build`.
25 changes: 15 additions & 10 deletions docs/_plugins/copy_api_dirs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,24 @@
File.open(css_file, 'a') { |f| f.write("\n" + css.join()) }
end

# Build Sphinx docs for Python
if not (ENV['SKIP_PYTHONDOC'] == '1')
# Build Sphinx docs for Python

puts "Moving to python/docs directory and building sphinx."
cd("../python/docs")
system("make html") || raise("Python doc generation failed")
# Get and set release version
version = File.foreach('_config.yml').grep(/^GRAPHFRAMES_VERSION: (.+)$/){$1}.first
version ||= 'Unknown'

puts "Moving back into home dir."
cd("../../")
puts "Moving to python/docs directory and building sphinx."
cd("../python/docs")
system({"PACKAGE_VERSION"=>version}, "make html") || raise("Python doc generation failed")

puts "Making directory api/python"
mkdir_p "docs/api/python"
puts "Moving back into home dir."
cd("../../")

puts "cp -r python/docs/_build/html/. docs/api/python"
cp_r("python/docs/_build/html/.", "docs/api/python")
puts "Making directory api/python"
mkdir_p "docs/api/python"

puts "cp -r python/docs/_build/html/. docs/api/python"
cp_r("python/docs/_build/html/.", "docs/api/python")
end
end
4 changes: 2 additions & 2 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ We use the `--packages` argument to download the graphframes package and any dep
<div data-lang="scala" markdown="1">

{% highlight bash %}
$ ./bin/spark-shell --packages graphframes:graphframes:0.2.0-spark2.0-s_2.11
$ ./bin/spark-shell --packages graphframes:graphframes:0.3.0-spark2.0-s_2.11
{% endhighlight %}

</div>

<div data-lang="python" markdown="1">

{% highlight bash %}
$ ./bin/pyspark --packages graphframes:graphframes:0.2.0-spark2.0-s_2.11
$ ./bin/pyspark --packages graphframes:graphframes:0.3.0-spark2.0-s_2.11
{% endhighlight %}

</div>
Expand Down
3 changes: 2 additions & 1 deletion python/docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build

export PYTHONPATH=$(realpath ..):$(realpath $(SPARK_HOME))/python:$(realpath $(SPARK_HOME))/python/lib/py4j-0.8.2.1-src.zip:$(realpath $(SPARK_HOME))/python/lib/py4j-0.10.1-src.zip
export PYTHONPATH=$(realpath ..):$(realpath $(SPARK_HOME))/python:$(realpath $(SPARK_HOME))/python/lib/py4j-*-src.zip
export PACKAGE_VERSION

$(info $$PYTHONPATH is [${PYTHONPATH}])

Expand Down
6 changes: 3 additions & 3 deletions python/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.2'
# The full version, including alpha/beta/rc tags.
release = '0.2.0'
release = os.environ.get('PACKAGE_VERSION', 'Unknown')
# The short X.Y version.
version = '.'.join(release.split('.')[:2])

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
3 changes: 1 addition & 2 deletions python/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Welcome to the GraphFrames Python API docs!
===========================================

*Note that most of the Python API docs are currently stubs. The APIs are designed to match
the Scala APIs as closely as reasonable, so plese refer to the Scala API docs for more details
the Scala APIs as closely as reasonable, so please refer to the Scala API docs for more details
on both the algorithms and APIs (particularly DataFrame schema).*

Contents:
Expand All @@ -31,4 +31,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`