Repository: PlasmaPy/PlasmaPy

Issue:
Using Sphinx to generate docs
Closes #43.

Used Sphinx to generate some docs in the docs dir. This is not expected to be pulled anytime soon, just putting it up here so other people can see the direction I was going with this and give feedback.

Right now you can look at the index.rst and you can go through a web and look at the auto documentation.


Discussion:

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,160 @@
+#!/usr/bin/env python3.6
+# -*- coding: utf-8 -*-
+#
+# PlasmaPy documentation build configuration file, created by
+# sphinx-quickstart on Wed May 31 18:16:46 2017.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+
+import os
+import sys
+sys.path.insert(0, os.path.abspath('..'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+# Warning: I installed numpydoc on my local machine to get this to work
+#          but I am not sure if there is supposed to be a requirements
+#          page for the docs section. So you might need to install this
+#          to use sphinx here. ~Colby
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'numpydoc']
+
+# Add any paths that contain templates here, relative to this directory.
+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'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = 'PlasmaPy'
+copyright = '2017, Nicholas Murphy & PlasmaPy Community'
+author = 'Nicholas Murphy & the PlasmaPy Community'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.0'
+# The full version, including alpha/beta/rc tags.
+release = '0.0.1'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This patterns also effect to html_static_path and html_extra_path
+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+#
+#html_theme = 'alabaster'
+#html_theme = 'traditional'
+#html_theme = 'agogo'
+
+# 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
+# documentation.
+#
+# html_theme_options = {}
+
+# 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']
+
+
+# -- Options for HTMLHelp output ------------------------------------------
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'PlasmaPydoc'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+    # 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',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+    (master_doc, 'PlasmaPy.tex', 'PlasmaPy Documentation',
+     'Nicholas Murphy \\& PlasmaPy Community', '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, 'plasmapy', 'PlasmaPy Documentation',
+     [author], 1)
+]
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+    (master_doc, 'PlasmaPy', 'PlasmaPy Documentation',
+     author, 'PlasmaPy', 'One line description of project.',
+     'Miscellaneous'),
+]
diff --git a/docs/example.py b/docs/example.py
new file mode 100644
--- /dev/null
+++ b/docs/example.py
@@ -0,0 +1,105 @@
+"""This is the docstring for the example.py module.  Modules names should
+have short, all-lowercase names.  The module name may have underscores if
+this improves readability.
+Every module should have a docstring at the very top of the file.  The
+module's docstring may extend over multiple lines.  If your docstring does
+extend over multiple lines, the closing three quotation marks must be on
+a line by itself, preferably preceded by a blank line.
+"""
+from __future__ import division, absolute_import, print_function
+
+import os # standard library imports first
+
+# Do NOT import using *, e.g. from numpy import *
+#
+# Import the module using
+#
+#   import numpy
+#
+# instead or import individual functions as needed, e.g
+#
+#  from numpy import array, zeros
+#
+# If you prefer the use of abbreviated module names, we suggest the
+# convention used by NumPy itself::
+
+import numpy as np
+import matplotlib as mpl
+import matplotlib.pyplot as plt
+
+# These abbreviated names are not to be used in docstrings; users must
+# be able to paste and execute docstrings after importing only the
+# numpy module itself, unabbreviated.
+
+from my_module import my_func, other_func
+
+def foo(var1, var2, long_var_name='hi'):
+    r"""A one-line summary that does not use variable names or the
+    function name.
+    Several sentences providing an extended description. Refer to
+    variables using back-ticks, e.g. `var`.
+    Parameters
+    ----------
+    var1 : array_like
+        Array_like means all those objects -- lists, nested lists, etc. --
+        that can be converted to an array.  We can also refer to
+        variables like `var1`.
+    var2 : int
+        The type above can either refer to an actual Python type
+        (e.g. ``int``), or describe the type of the variable in more
+        detail, e.g. ``(N,) ndarray`` or ``array_like``.
+    long_var_name : {'hi', 'ho'}, optional
+        Choices in brackets, default first when optional.
+    Returns
+    -------
+    type
+        Explanation of anonymous return value of type ``type``.
+    describe : type
+        Explanation of return value named `describe`.
+    out : type
+        Explanation of `out`.
+    Other Parameters
+    ----------------
+    only_seldom_used_keywords : type
+        Explanation
+    common_parameters_listed_above : type
+        Explanation
+    Raises
+    ------
+    BadException
+        Because you shouldn't have done that.
+    See Also
+    --------
+    otherfunc : relationship (optional)
+    newfunc : Relationship (optional), which could be fairly long, in which
+              case the line wraps here.
+    thirdfunc, fourthfunc, fifthfunc
+    Notes
+    -----
+    Notes about the implementation algorithm (if needed).
+    This can have multiple paragraphs.
+    You may include some math:
+    .. math:: X(e^{j\omega } ) = x(n)e^{ - j\omega n}
+    And even use a greek symbol like :math:`omega` inline.
+    References
+    ----------
+    Cite the relevant literature, e.g. [1]_.  You may also cite these
+    references in the notes section above.
+    .. [1] O. McNoleg, "The integration of GIS, remote sensing,
+       expert systems and adaptive co-kriging for environmental habitat
+       modelling of the Highland Haggis using object-oriented, fuzzy-logic
+       and neural-network techniques," Computers & Geosciences, vol. 22,
+       pp. 585-588, 1996.
+    Examples
+    --------
+    These are written in doctest format, and should illustrate how to
+    use the function.
+    >>> a = [1, 2, 3]
+    >>> print [x + 3 for x in a]
+    [4, 5, 6]
+    >>> print "a\n\nb"
+    a
+    b
+    """
+
+    pass


Test patch:
diff --git a/docs/source/plasmapy.analytic.tests.rst b/docs/source/plasmapy.analytic.tests.rst
new file mode 100644
--- /dev/null
+++ b/docs/source/plasmapy.analytic.tests.rst
@@ -0,0 +1,22 @@
+plasmapy\.analytic\.tests package
+=================================
+
+Submodules
+----------
+
+plasmapy\.analytic\.tests\.test\_dispersion module
+--------------------------------------------------
+
+.. automodule:: plasmapy.analytic.tests.test_dispersion
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+
+Module contents
+---------------
+
+.. automodule:: plasmapy.analytic.tests
+    :members:
+    :undoc-members:
+    :show-inheritance:
diff --git a/docs/source/plasmapy.classes.tests.rst b/docs/source/plasmapy.classes.tests.rst
new file mode 100644
--- /dev/null
+++ b/docs/source/plasmapy.classes.tests.rst
@@ -0,0 +1,22 @@
+plasmapy\.classes\.tests package
+================================
+
+Submodules
+----------
+
+plasmapy\.classes\.tests\.test\_Plasma module
+---------------------------------------------
+
+.. automodule:: plasmapy.classes.tests.test_Plasma
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+
+Module contents
+---------------
+
+.. automodule:: plasmapy.classes.tests
+    :members:
+    :undoc-members:
+    :show-inheritance:
diff --git a/docs/source/plasmapy.constants.tests.rst b/docs/source/plasmapy.constants.tests.rst
new file mode 100644
--- /dev/null
+++ b/docs/source/plasmapy.constants.tests.rst
@@ -0,0 +1,22 @@
+plasmapy\.constants\.tests package
+==================================
+
+Submodules
+----------
+
+plasmapy\.constants\.tests\.test\_atomic module
+-----------------------------------------------
+
+.. automodule:: plasmapy.constants.tests.test_atomic
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+
+Module contents
+---------------
+
+.. automodule:: plasmapy.constants.tests
+    :members:
+    :undoc-members:
+    :show-inheritance: