Skip to content

Commit

Permalink
chore: Clean up KFP SDK docstrings, make formatting a little more con…
Browse files Browse the repository at this point in the history
…sistent (kubeflow#4218)

* Prepare SDK docs environment so its easier to understand how to build the docs locally so theyre consistent with ReadTheDocs.

* Clean up docstrings for kfp.Client

* Add in updates to the docs for compiler and components

* Update components area to add in code references and make formatting a little more consistent.

* Clean up containers, add in custom CSS to ensure we do not overflow on inline code blocks

* Clean up containers, add in custom CSS to ensure we do not overflow on inline code blocks

* Remove unused kfp.notebook package links

* Clean up a few more errant references

* Clean up the DSL docs some more

* Update SDK docs for KFP extensions to follow Sphinx guidelines

* Clean up formatting of docstrings after Ark-Kuns comments
  • Loading branch information
alexlatchford authored and chensun committed Aug 7, 2020
1 parent dbc9d56 commit e968c95
Show file tree
Hide file tree
Showing 32 changed files with 683 additions and 617 deletions.
8 changes: 8 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
sphinx:
configuration: docs/conf.py
python:
version: 3.7
install:
- requirements: sdk/python/requirements.txt
3 changes: 3 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.rst-content code, .rst-content tt, code {
white-space: normal;
}
7 changes: 5 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# -- Project information -----------------------------------------------------

project = 'Kubeflow Pipelines'
copyright = '2019, Google'
copyright = '2020, Google'
author = 'Google'

# The short X.Y version
Expand Down Expand Up @@ -106,7 +106,6 @@
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down Expand Up @@ -140,6 +139,10 @@
#
# html_sidebars = {}

html_css_files = [
'custom.css',
]


# -- Options for HTMLHelp output ---------------------------------------------

Expand Down
8 changes: 4 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Kubeflow Pipelines SDK API reference
================================================
Kubeflow Pipelines SDK API
==========================

Main documentation: https://www.kubeflow.org/docs/pipelines/

Source code: https://github.com/kubeflow/pipelines/

.. toctree::
:maxdepth: 3
:caption: Contents:
:caption: Contents

self
source/kfp


.. * :ref:`modindex`
.. * :ref:`kfp-ref`
.. * :ref:`search`
Expand Down
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx==3.1.2
sphinx_rtd_theme==0.5.0
4 changes: 2 additions & 2 deletions docs/source/kfp.client.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
kfp.Client class
------------------
================

.. autoclass:: kfp.Client
:members:
:undoc-members:
:show-inheritance:

Generated APIs
------------------
--------------

.. toctree::
:maxdepth: 2
Expand Down
1 change: 1 addition & 0 deletions docs/source/kfp.components.structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ kfp.components.structures package
:imported-members:

.. toctree::
:maxdepth: 2

kfp.components.structures.kubernetes
8 changes: 0 additions & 8 deletions docs/source/kfp.notebook.rst

This file was deleted.

3 changes: 1 addition & 2 deletions docs/source/kfp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ kfp package
.. toctree::
:maxdepth: 2

kfp.client
kfp.compiler
kfp.components
kfp.containers
kfp.dsl
kfp.client
kfp.notebook
kfp.extensions

.. automodule:: kfp
Expand Down
7 changes: 0 additions & 7 deletions docs/source/modules.rst

This file was deleted.

Loading

0 comments on commit e968c95

Please sign in to comment.