diff --git a/docs/api/sphinx_deployment.rst b/docs/api/sphinx_deployment.rst new file mode 100644 index 0000000..9165b0b --- /dev/null +++ b/docs/api/sphinx_deployment.rst @@ -0,0 +1,26 @@ +sphinx\_deployment package +========================== + +.. automodule:: sphinx_deployment + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +sphinx\_deployment.cli module +----------------------------- + +.. automodule:: sphinx_deployment.cli + :members: + :undoc-members: + :show-inheritance: + +sphinx\_deployment.sphinx\_setup module +--------------------------------------- + +.. automodule:: sphinx_deployment.sphinx_setup + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/conf.py b/docs/conf.py index 11e5732..b57ddf9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,10 @@ from __future__ import annotations import importlib.metadata +import sys +from pathlib import Path + +sys.path.append(Path("../src").resolve()) project = "sphinx-deployment" copyright = "2023, msclock" @@ -16,6 +20,7 @@ "sphinx_autodoc_typehints", "sphinx_copybutton", "sphinx_inline_tabs", + "sphinx_deployment", ] source_suffix = [".rst", ".md"] diff --git a/src/sphinx_deployment/__init__.py b/src/sphinx_deployment/__init__.py index 301e72a..4ff1346 100644 --- a/src/sphinx_deployment/__init__.py +++ b/src/sphinx_deployment/__init__.py @@ -8,6 +8,6 @@ from __future__ import annotations from ._version import version as __version__ -from .sphinx_ext import setup +from .sphinx_setup import setup __all__ = ["__version__", "setup"] diff --git a/src/sphinx_deployment/sphinx_ext.py b/src/sphinx_deployment/sphinx_setup.py similarity index 50% rename from src/sphinx_deployment/sphinx_ext.py rename to src/sphinx_deployment/sphinx_setup.py index 64cb4f7..f32bddf 100644 --- a/src/sphinx_deployment/sphinx_ext.py +++ b/src/sphinx_deployment/sphinx_setup.py @@ -3,12 +3,20 @@ from typing import Any from loguru import logger -from sphinx.application import Sphinx from ._version import version -def setup(app: Sphinx) -> dict[str, Any]: +def setup(app: Any) -> dict[str, Any]: + """ + A description of the entire function, its parameters, and its return types. + + Parameters: + app: The app to set up. + + Returns: + A dictionary with version, parallel_read_safe, and parallel_write_safe keys. + """ logger.info(app.confdir) logger.info(app.config) @@ -16,4 +24,4 @@ def setup(app: Sphinx) -> dict[str, Any]: "version": version, "parallel_read_safe": True, "parallel_write_safe": True, - } + } \ No newline at end of file