From 6888034627ee4d021ed74a0f2148fc7f8e5e8921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Thu, 4 Mar 2021 16:24:33 -0800 Subject: [PATCH] Fix autodoc --- docs/changelog.rst | 2 -- docs/conf.py | 33 +++++++-------------------------- docs/index.rst | 14 ++++---------- docs/requirements.txt | 3 ++- 4 files changed, 13 insertions(+), 39 deletions(-) delete mode 100644 docs/changelog.rst diff --git a/docs/changelog.rst b/docs/changelog.rst deleted file mode 100644 index 871950df3f..0000000000 --- a/docs/changelog.rst +++ /dev/null @@ -1,2 +0,0 @@ -.. _changes: -.. include:: ../CHANGELOG.rst diff --git a/docs/conf.py b/docs/conf.py index b0c0fe0647..55a335ae22 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -65,44 +65,26 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ + "autoapi.extension", "sphinx.ext.autodoc", - "sphinx.ext.intersphinx", - "sphinx.ext.todo", - "sphinx.ext.autosummary", "sphinx.ext.viewcode", + "sphinx.ext.napoleon", + "sphinx.ext.viewcode", + "sphinx_autodoc_typehints", "sphinx.ext.coverage", "sphinx.ext.doctest", "sphinx.ext.ifconfig", "sphinx.ext.mathjax", - "sphinx.ext.napoleon", - "sphinx_rtd_theme", - "recommonmark", ] +autoapi_type = 'python' +autoapi_dirs = ['../src'] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] - -# To configure AutoStructify -def setup(app): - from recommonmark.transform import AutoStructify - - app.add_config_value( - "recommonmark_config", - { - "auto_toc_tree_section": "Contents", - "enable_eval_rst": True, - "enable_math": True, - "enable_inline_math": True, - }, - True, - ) - app.add_transform(AutoStructify) - - # The suffix of source filenames. -source_suffix = [".rst", ".md"] +source_suffix = [".rst"] # The encoding of source files. # source_encoding = 'utf-8-sig' @@ -247,7 +229,6 @@ def setup(app): # Output file base name for HTML help builder. htmlhelp_basename = "whylogs_python-doc" - # -- Options for LaTeX output -------------------------------------------------- latex_elements = { diff --git a/docs/index.rst b/docs/index.rst index 7b22c9233e..3f8b910e47 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,6 +1,6 @@ -.. whylogs documentation master file +:github_url: https://github.com/whylabs/whylogs -whylogs +whylogs API reference ================== *Profile and monitor your ML data pipeline end-to-end* @@ -15,13 +15,12 @@ your data, read our :ref:`intro` and our :ref:`getting_started` guide. This site is a work in progress. If you have questions, ask them in our `Slack channel `__! .. toctree:: - :maxdepth: 5 + :maxdepth: 2 overview getting_started concepts - auto_examples/index - Changelog + Examples License Indices and tables @@ -30,8 +29,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` - -.. toctree:: - :maxdepth: 2 - - api/modules diff --git a/docs/requirements.txt b/docs/requirements.txt index 457a010b42..169a90809a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -7,4 +7,5 @@ sphinx-autoapi>=1.4.0 autoapi>=2.0.1 sphinx-autorun >= 1.1.1 sphinx-gallery >= 0.8.0 -pillow \ No newline at end of file +pillow +sphinx_autodoc_typehints