Skip to content

Commit

Permalink
add sphinx setup
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanhhughes authored and GoldenZephyr committed Feb 6, 2025
1 parent 0543b39 commit b7a1d8f
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 0 deletions.
20 changes: 20 additions & 0 deletions doc/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)
Empty file added doc/_static/.gitkeep
Empty file.
Empty file added doc/_templates/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions doc/api/core.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
API Documentation for Ourobos
=============================

.. automodule:: ouroboros
:members:
5 changes: 5 additions & 0 deletions doc/api/opengv.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
API Documentation for Ourobos-OpenGV
====================================

.. automodule:: ouroboros_opengv
:members:
37 changes: 37 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "Ouroboros"
copyright = "2025, MIT-SPARK Lab, Massachusetts Institute of Technology"
author = "Aaron Ray, Mohammed Ehab, Nathan Hughes, Toya Takahashi, Yun Chang"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
]

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# -- Docstring configuration -------------------------------------------------
maximum_signature_line_length = 88
autodoc_preserve_defaults = False
autodoc_typehints = "description"

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "alabaster"
html_static_path = ["_static"]
html_theme_options = {
"font_size": "12pt",
}
22 changes: 22 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. Ouroboros documentation master file, created by
sphinx-quickstart on Wed Jan 29 22:57:36 2025.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Ouroboros's documentation!
=====================================

.. toctree::
:maxdepth: 2
:caption: Contents:

api/core
api/opengv


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

0 comments on commit b7a1d8f

Please sign in to comment.