Skip to content

[WIP] document API using sphinx #1796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
black
  • Loading branch information
emmanuelle committed Oct 3, 2019
commit 95721f1e3c4bcfe4efb3b5b2a3850a8bf3fae106
66 changes: 33 additions & 33 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('../packages/python/plotly'))

sys.path.insert(0, os.path.abspath("../packages/python/plotly"))


# -- Project information -----------------------------------------------------

project = 'plotly'
copyright = '2019, plotly team'
author = 'plotly team'
project = "plotly"
copyright = "2019, plotly team"
author = "plotly team"

# The short X.Y version
version = ''
version = ""
# The full version, including alpha/beta/rc tags
release = '4.2'
release = "4.2"


# -- General configuration ---------------------------------------------------
Expand All @@ -39,27 +40,27 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.napoleon'
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.napoleon",
]

autosummary_generate = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -71,7 +72,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None
Expand All @@ -82,7 +83,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "alabaster"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -93,7 +94,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand All @@ -109,7 +110,7 @@
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'plotlydoc'
htmlhelp_basename = "plotlydoc"


# -- Options for LaTeX output ------------------------------------------------
Expand All @@ -118,15 +119,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -136,19 +134,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'plotly.tex', 'plotly Documentation',
'plotly team', 'manual'),
(master_doc, "plotly.tex", "plotly Documentation", "plotly team", "manual")
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'plotly', 'plotly Documentation',
[author], 1)
]
man_pages = [(master_doc, "plotly", "plotly Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -157,9 +151,15 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'plotly', 'plotly Documentation',
author, 'plotly', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"plotly",
"plotly Documentation",
author,
"plotly",
"One line description of project.",
"Miscellaneous",
)
]


Expand All @@ -178,15 +178,15 @@
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
epub_exclude_files = ["search.html"]


# -- Extension configuration -------------------------------------------------

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {"https://docs.python.org/": None}

# -- Options for todo extension ----------------------------------------------

Expand Down
34 changes: 18 additions & 16 deletions packages/python/plotly/plotly/figure_factory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,21 @@
if optional_imports.get_module("pandas") is not None:
from plotly.figure_factory._county_choropleth import create_choropleth

__all__ = ["create_2d_density",
"create_annotated_heatmap",
"create_bullet",
"create_candlestick",
"create_dendrogram",
"create_distplot",
"create_facet_grid",
"create_gantt",
"create_ohlc",
"create_quiver",
"create_scatterplotmatrix",
"create_streamline",
"create_table",
"create_ternary_contour",
"create_trisurf",
"create_violin"]
__all__ = [
"create_2d_density",
"create_annotated_heatmap",
"create_bullet",
"create_candlestick",
"create_dendrogram",
"create_distplot",
"create_facet_grid",
"create_gantt",
"create_ohlc",
"create_quiver",
"create_scatterplotmatrix",
"create_streamline",
"create_table",
"create_ternary_contour",
"create_trisurf",
"create_violin",
]
20 changes: 15 additions & 5 deletions packages/python/plotly/plotly/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,18 @@

from . import base_renderers

__all__ = ["to_image", "write_image",
"to_json", "from_json", "read_json", "write_json",
"templates", "to_templated",
"to_html", "write_html",
"renderers", "show", "base_renderers"]
__all__ = [
"to_image",
"write_image",
"to_json",
"from_json",
"read_json",
"write_json",
"templates",
"to_templated",
"to_html",
"write_html",
"renderers",
"show",
"base_renderers",
]