diff --git a/docs/source/api/index.rst b/docs/source/api/index.rst new file mode 100644 index 0000000..8e0fa62 --- /dev/null +++ b/docs/source/api/index.rst @@ -0,0 +1,24 @@ +API Reference +============= + +This section contains the API reference documentation for Netsleuth. + +.. toctree:: + :maxdepth: 2 + + modules + +Modules Overview +---------------- + +.. autosummary:: + :toctree: generated + :recursive: + + netsleuth + netsleuth.cli + netsleuth.core + netsleuth.exporter + netsleuth.interpret + netsleuth.monitoring + diff --git a/docs/source/api/modules.rst b/docs/source/api/modules.rst new file mode 100644 index 0000000..dfe2e78 --- /dev/null +++ b/docs/source/api/modules.rst @@ -0,0 +1,32 @@ +Netsleuth API +============= + +.. automodule:: netsleuth + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: netsleuth.cli + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: netsleuth.core + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: netsleuth.exporter + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: netsleuth.interpret + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: netsleuth.monitoring + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..9bceec7 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,64 @@ +"""Sphinx documentation configuration for Netsleuth.""" + +import sys +from pathlib import Path + +# Add the src directory to the path +sys.path.insert(0, str(Path(__file__).parent.parent.parent / "src")) + +# Project information +project = "Netsleuth" +copyright = "2024, netsleuth contributors" +author = "netsleuth contributors" +release = "0.1.0" + +# General configuration +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.napoleon", + "sphinx.ext.viewcode", + "sphinx.ext.intersphinx", + "sphinx.ext.coverage", + "sphinx_autodoc_typehints", +] + +templates_path = ["_templates"] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] + +# HTML theme +html_theme = "sphinx_rtd_theme" +html_static_path = ["_static"] + +# Autodoc configuration +autodoc_default_options = { + "members": True, + "undoc-members": True, + "show-inheritance": True, + "special-members": "__init__", +} + +autodoc_member_order = "bysource" + +# Napoleon configuration +napoleon_google_docstring = True +napoleon_numpy_docstring = True +napoleon_include_init_with_doc = True +napoleon_include_private_with_doc = False +napoleon_include_special_with_doc = True + +# Intersphinx configuration +intersphinx_mapping = { + "python": ("https://docs.python.org/3", None), + "typer": ("https://typer.tiangolo.com", None), + "rich": ("https://rich.readthedocs.io/en/latest", None), + "httpx": ("https://www.python-httpx.org", None), + "pydantic": ("https://docs.pydantic.dev/latest", None), +} + +# Typehints configuration +set_type_checking_flag = True +typehints_fully_qualified = False +always_document_param_types = True + +# Coverage configuration +coverage_write_headline = False diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..44669f5 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,45 @@ +.. Netsleuth documentation master file, created by + sphinx-quickstart on Tue Aug 12 2024. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Netsleuth Documentation +======================== + +**Cross-platform CLI for deep network diagnostics** + +Netsleuth is a powerful command-line tool for comprehensive network analysis, +providing insights into ISP/VPN/ASN identity, latency, routing paths, and bandwidth. + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + api/modules + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + +Quick Start +----------- + +Install Netsleuth:: + + pip install netsleuth + +Basic usage:: + + netsleuth diagnose example.com + netsleuth trace google.com + netsleuth speedtest + +For more information, see the :doc:`API Reference `. + +License +------- + +This project is licensed under the PolyForm Noncommercial License 1.0.0.