Skip to content

Commit af71ab9

Browse files
committed
Auto-generate Documentation
1 parent a8b0822 commit af71ab9

File tree

2 files changed

+89
-14
lines changed

2 files changed

+89
-14
lines changed

docs/sphinx/source/conf.py

Lines changed: 66 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,85 @@
11
# Configuration file for the Sphinx documentation builder.
22
#
3-
# For the full list of built-in configuration values, see the documentation:
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
45
# https://www.sphinx-doc.org/en/master/usage/configuration.html
56

7+
# -- Path setup --------------------------------------------------------------
8+
import sys
9+
10+
# Docs require Python 3.6+ to generate
11+
from pathlib import Path
12+
13+
DIR = Path(__file__).parent.parent.parent.resolve()
14+
BASEDIR = DIR.parent
15+
16+
sys.path.append(str(BASEDIR / "src"))
17+
618
# -- Project information -----------------------------------------------------
7-
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
819

920
project = "Modelspec"
10-
copyright = "2023, ModECI"
11-
author = "ModECI"
21+
copyright = "2023, ModECI Project"
22+
author = "ModECI Project"
1223
release = "0.3.1"
1324

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

17-
extensions = []
27+
# Add any Sphinx extension module names here, as strings. They can be
28+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
29+
# ones.
30+
extensions = [
31+
"sphinx.ext.autodoc", # auto generate docstrings
32+
"sphinx.ext.autosummary", # auto generate summary tables
33+
"sphinx.ext.napoleon", # napoleon docstring style
34+
# "sphinx.ext.mathjax",
35+
"sphinx_copybutton", # create copy buttons
36+
"sphinx_rtd_theme", # html theme
37+
"sphinx_markdown_tables", # include markdown style tables
38+
# "sphinx.ext.intersphinx",
39+
"sphinx.ext.viewcode",
40+
"sphinx.ext.autosectionlabel",
41+
# "sphinx.ext.todo",
42+
"myst_parser",
43+
"sphinx.ext.githubpages",
44+
]
45+
46+
autodoc_member_order = "bysource"
47+
autosummary_generate = True
48+
autoclass_content = "both" # Add __init__ doc (ie. params) to class summaries
49+
html_show_sourcelink = (
50+
False # Remove 'view source code' from top of page (for html, not python)
51+
)
52+
53+
master_doc = "index"
54+
napoleon_use_ivar = True
55+
autosectionlabel_prefix_document = True
1856

57+
# Source Suffix
58+
source_suffix = {
59+
".rst": "restructuredtext",
60+
".txt": "restructuredtext",
61+
".md": "markdown",
62+
}
63+
64+
source_parsers = {".md": "myst_parser"}
65+
66+
# Add any paths that contain templates here, relative to this directory.
1967
templates_path = ["_templates"]
68+
69+
# List of patterns, relative to source directory, that match files and
70+
# directories to ignore when looking for source files.
71+
# This pattern also affects html_static_path and html_extra_path.
2072
exclude_patterns = []
2173

2274

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

26-
html_theme = "alabaster"
77+
# The theme to use for HTML and HTML Help pages. See the documentation for
78+
# a list of builtin themes.
79+
#
80+
html_theme = "sphinx_rtd_theme"
81+
82+
# Add any paths that contain custom static files (such as style sheets) here,
83+
# relative to this directory. They are copied after the builtin static files,
84+
# so a file named "default.css" will overwrite the builtin "default.css".
2785
html_static_path = ["_static"]

docs/sphinx/source/index.rst

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
1-
.. Modelspec documentation master file, created by
2-
sphinx-quickstart on Mon Jun 19 14:05:28 2023.
1+
.. "Modelspec" documentation master file, created by
2+
sphinx-quickstart on Tue Jun 13 15:25:44 2023.
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
Welcome to Modelspec's documentation!
7-
=====================================
6+
:github_url: https://github.com/ModECI/modelspec
7+
8+
Welcome to Modelspec's documentation
9+
=======================================
10+
11+
Modelspec is an open source, community-supported standard library used for specifying the structure of models
12+
and enabling automatic serialization.
13+
It is still in development and it is being used by
14+
`MDF <https://github.com/ModECI/MDF>`_ and `NeuroMLite <https://github.com/NeuroML/NeuroMLlite>`_.
15+
16+
.. toctree::
17+
:maxdepth: 1
18+
:caption: Contents
19+
20+
api/Introduction
21+
api/Quickstart
22+
api/Installation
23+
824

925
.. toctree::
10-
:maxdepth: 2
11-
:caption: Contents:
26+
:maxdepth: 1
27+
:caption: Examples
1228

29+
api/examples/README.md
1330

1431

1532
Indices and tables

0 commit comments

Comments
 (0)