docs: add Google-style docstrings and Sphinx autodoc setup
Add concise docstrings to all Python modules, classes, and public functions. Configure Sphinx with napoleon extension for Google-style docstring parsing and autodoc pages for each module. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
fd3ff46804
commit
4d681a92ca
@@ -0,0 +1,24 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath("../.."))
|
||||
|
||||
project = "ai_demo_backend"
|
||||
copyright = "2026, Mathew Guest"
|
||||
author = "Mathew Guest"
|
||||
|
||||
extensions = [
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinx.ext.viewcode",
|
||||
"sphinx.ext.napoleon",
|
||||
]
|
||||
|
||||
templates_path = ["_templates"]
|
||||
exclude_patterns = []
|
||||
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
html_static_path = ["_static"]
|
||||
|
||||
autodoc_member_order = "bysource"
|
||||
napoleon_google_docstring = True
|
||||
napoleon_numpy_docstring = False
|
||||
@@ -0,0 +1,20 @@
|
||||
ai_demo_backend
|
||||
===============
|
||||
|
||||
A backend HTTP server that powers a word search puzzle game playable in a web browser.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
modules/app
|
||||
modules/db
|
||||
modules/models
|
||||
modules/game
|
||||
modules/handlers
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
@@ -0,0 +1,7 @@
|
||||
App
|
||||
===
|
||||
|
||||
.. automodule:: app
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@@ -0,0 +1,7 @@
|
||||
Database
|
||||
========
|
||||
|
||||
.. automodule:: db
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@@ -0,0 +1,10 @@
|
||||
Game Logic
|
||||
==========
|
||||
|
||||
Board Factory
|
||||
-------------
|
||||
|
||||
.. automodule:: game.factory
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@@ -0,0 +1,26 @@
|
||||
Handlers
|
||||
========
|
||||
|
||||
API Handlers
|
||||
------------
|
||||
|
||||
.. automodule:: handlers.api
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Main Handler
|
||||
------------
|
||||
|
||||
.. automodule:: handlers.main
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Game Handler
|
||||
------------
|
||||
|
||||
.. automodule:: handlers.game
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@@ -0,0 +1,18 @@
|
||||
Models
|
||||
======
|
||||
|
||||
Category
|
||||
--------
|
||||
|
||||
.. automodule:: models.category
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Game
|
||||
----
|
||||
|
||||
.. automodule:: models.game
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
Reference in New Issue
Block a user