Skip to content

Commit

Permalink
Auto-documentation support added (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
abiswal2001 authored May 31, 2022
1 parent 0a2557d commit 41432b2
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 3 deletions.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
19 changes: 18 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@

# -- General configuration


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
# "myst_nb",
"sphinx_copybutton",
Expand All @@ -46,6 +52,7 @@
}
intersphinx_disabled_domains = ["std"]

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

# autodoc
Expand All @@ -61,9 +68,19 @@
napoleon_numpy_docstring = False # Force consistency, leave only Google
napoleon_use_rtype = False # More legible

# -- Options for HTML output
# 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", "_build", "Thumbs.db", ".DS_Store"]


# -- 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 = "sphinx_book_theme"

# 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.
Expand Down
5 changes: 3 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Contents

.. toctree::
:maxdepth: 2
:caption: API documentation
:caption: Package documentation

skyplane_cli
skyplane_cli
skyplane_internal
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
7 changes: 7 additions & 0 deletions docs/setup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
setup module
============

.. automodule:: setup
:members:
:undoc-members:
:show-inheritance:
34 changes: 34 additions & 0 deletions docs/skyplane_internal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Internal package documentation
=======================================

skyplane.chunk module
-----------------------

.. automodule:: skyplane.chunk
:members:
:undoc-members:
:show-inheritance:

skyplane.config module
------------------------

.. automodule:: skyplane.config
:members:
:undoc-members:
:show-inheritance:

skyplane.exceptions module
----------------------------

.. automodule:: skyplane.exceptions
:members:
:undoc-members:
:show-inheritance:

.. Module contents
.. ---------------
.. .. automodule:: skyplane
.. :members:
.. :undoc-members:
.. :show-inheritance:

0 comments on commit 41432b2

Please sign in to comment.