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
@@ -1,3 +1,5 @@
|
||||
"""Tornado application entry point and route configuration."""
|
||||
|
||||
import os
|
||||
|
||||
import click
|
||||
@@ -20,6 +22,15 @@ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
def make_app(session_factory=None):
|
||||
"""Create and configure the Tornado application.
|
||||
|
||||
Args:
|
||||
session_factory: SQLAlchemy session factory. If None, API
|
||||
endpoints that require a database will not work.
|
||||
|
||||
Returns:
|
||||
A configured ``tornado.web.Application`` instance.
|
||||
"""
|
||||
return tornado.web.Application(
|
||||
[
|
||||
(r"/", MainHandler),
|
||||
@@ -41,6 +52,7 @@ def make_app(session_factory=None):
|
||||
@click.command()
|
||||
@click.option("--port", default=8888, type=int, help="Port to listen on.")
|
||||
def main(port):
|
||||
"""Start the web server."""
|
||||
engine = get_engine()
|
||||
init_db(engine)
|
||||
session_factory = get_session_factory(engine)
|
||||
|
||||
Reference in New Issue
Block a user