mirror of
https://github.com/Horizontal42/netsleuth.git
synced 2026-11-11 01:02:10 +03:00
docs: add Sphinx documentation structure with autodoc and RTD theme
This commit is contained in:
parent
d21946d1cb
commit
33283d8275
4 changed files with 165 additions and 0 deletions
24
docs/source/api/index.rst
Normal file
24
docs/source/api/index.rst
Normal file
|
|
@ -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
|
||||
|
||||
32
docs/source/api/modules.rst
Normal file
32
docs/source/api/modules.rst
Normal file
|
|
@ -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:
|
||||
64
docs/source/conf.py
Normal file
64
docs/source/conf.py
Normal file
|
|
@ -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
|
||||
45
docs/source/index.rst
Normal file
45
docs/source/index.rst
Normal file
|
|
@ -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 <api/modules>`.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
This project is licensed under the PolyForm Noncommercial License 1.0.0.
|
||||
Loading…
Add table
Reference in a new issue