Add documentation by Sphinx
This commit is contained in:
parent
0bf0531fd6
commit
53c96a2ea5
9 changed files with 157 additions and 1 deletions
71
docs/source/conf.py
Normal file
71
docs/source/conf.py
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
"""
|
||||
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).
|
||||
"""
|
||||
|
||||
import sys
|
||||
import sphinx_rtd_theme
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
project_root = Path(__file__).resolve().parent.parent
|
||||
source_root = project_root / 'setclass'
|
||||
doc_root = project_root / 'docs' / 'source'
|
||||
sys.path.insert(0, source_root)
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
|
||||
project = 'Setclass'
|
||||
copyright = '2024, Jonathan Harker'
|
||||
author = 'Jonathan Harker'
|
||||
release = '0.1'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.todo',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.mathjax',
|
||||
'sphinx_rtd_theme',
|
||||
'myst_parser',
|
||||
]
|
||||
|
||||
intersphinx_mapping = {
|
||||
'python': ('https://docs.python.org/3.12', None),
|
||||
}
|
||||
|
||||
templates_path = ['_templates']
|
||||
|
||||
exclude_patterns = [
|
||||
'_build',
|
||||
'.DS_Store',
|
||||
'.pytest_cache',
|
||||
'.tox',
|
||||
'.venv',
|
||||
]
|
||||
|
||||
source_suffix = {
|
||||
'.rst': 'restructuredtext',
|
||||
'.md': 'markdown',
|
||||
'.txt': 'markdown',
|
||||
}
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
html_theme_options = {
|
||||
'display_version': False,
|
||||
'navigation_depth': 2,
|
||||
'prev_next_buttons_location': 'None'
|
||||
}
|
||||
|
||||
html_static_path = ['_static']
|
||||
27
docs/source/index.rst
Normal file
27
docs/source/index.rst
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
.. Setclass documentation master file, created by
|
||||
sphinx-quickstart on Sat Sep 21 12:30:24 2024.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Setclass documentation
|
||||
======================
|
||||
|
||||
.. include:: readme.md
|
||||
|
||||
.. contents::
|
||||
:depth: 2
|
||||
:local:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:includehidden:
|
||||
|
||||
modules.rst
|
||||
setclass.rst
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
7
docs/source/modules.rst
Normal file
7
docs/source/modules.rst
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
setclass
|
||||
========
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
setclass
|
||||
4
docs/source/readme.md
Normal file
4
docs/source/readme.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
README:
|
||||
|
||||
```{include} ../../README.md
|
||||
```
|
||||
18
docs/source/setclass.rst
Normal file
18
docs/source/setclass.rst
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
setclass package
|
||||
================
|
||||
|
||||
setclass module
|
||||
---------------
|
||||
|
||||
.. automodule:: setclass.setclass
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: setclass
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
Loading…
Add table
Add a link
Reference in a new issue