Skip to content

Commit af3d063

Browse files
committed
Fix build-docs CI: Setup proper Sphinx documentation
- Created docs/ directory with proper Sphinx configuration - Added conf.py with autodoc, napoleon, and RTD theme settings - Created index.rst with project overview and module structure - Added sphinx-rtd-theme to requirements-docs.txt - Created required _static and _templates directories - Added docs/_build/ to .gitignore (don't version control built docs) - Auto-generates API docs from src/ Python modules using sphinx-apidoc - Tested successful documentation build locally without warnings - CI build-docs workflow should now complete successfully
1 parent f1bfca7 commit af3d063

File tree

10 files changed

+282
-0
lines changed

10 files changed

+282
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,3 +297,4 @@ coverage.xml
297297

298298
#Ignore vscode AI rules
299299
.github/instructions/codacy.instructions.md
300+
docs/_build/

docs/app.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
app module
2+
==========
3+
4+
.. automodule:: app
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/conf.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
3+
4+
import os
5+
import sys
6+
7+
# Add the project root to Python path
8+
sys.path.insert(0, os.path.abspath('../src'))
9+
10+
# -- Project information -----------------------------------------------------
11+
project = 'unstructuredDataHandler'
12+
copyright = '2024, SoftwareDevLabs'
13+
author = 'SoftwareDevLabs'
14+
release = '1.0.0'
15+
16+
# -- General configuration ---------------------------------------------------
17+
extensions = [
18+
'sphinx.ext.autodoc',
19+
'sphinx.ext.viewcode',
20+
'sphinx.ext.napoleon',
21+
'sphinx.ext.intersphinx',
22+
'sphinx_autodoc_typehints',
23+
]
24+
25+
templates_path = ['_templates']
26+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
27+
28+
# -- Options for HTML output ------------------------------------------------
29+
html_theme = 'sphinx_rtd_theme'
30+
html_static_path = ['_static']
31+
32+
# -- Extension configuration ------------------------------------------------
33+
34+
# Napoleon settings (for Google/NumPy docstring style)
35+
napoleon_google_docstring = True
36+
napoleon_numpy_docstring = True
37+
napoleon_include_init_with_doc = False
38+
napoleon_include_private_with_doc = False
39+
napoleon_include_special_with_doc = True
40+
napoleon_use_admonition_for_examples = False
41+
napoleon_use_admonition_for_notes = False
42+
napoleon_use_admonition_for_references = False
43+
napoleon_use_ivar = False
44+
napoleon_use_param = True
45+
napoleon_use_rtype = True
46+
47+
# Autodoc settings
48+
autodoc_default_options = {
49+
'members': True,
50+
'member-order': 'bysource',
51+
'special-members': '__init__',
52+
'undoc-members': True,
53+
'exclude-members': '__weakref__'
54+
}
55+
56+
# Intersphinx mapping
57+
intersphinx_mapping = {
58+
'python': ('https://docs.python.org/3/', None),
59+
}
60+
61+
# Type hints configuration
62+
typehints_fully_qualified = False
63+
always_document_param_types = True

docs/index.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
unstructuredDataHandler Documentation
2+
=====================================
3+
4+
Welcome to the unstructuredDataHandler documentation! This is a Python-based Software Development Life Cycle core project that provides AI/ML capabilities for software development workflows.
5+
6+
The repository contains modules for:
7+
8+
* LLM clients and intelligent agents
9+
* Memory management (short-term and long-term)
10+
* Prompt engineering and template management
11+
* Document retrieval and vector search
12+
* Skill execution and web search capabilities
13+
* Multimodal processing (vision/audio)
14+
* Guardrails for PII filtering and output validation
15+
* Various utilities for logging, caching, and rate limiting
16+
17+
.. toctree::
18+
:maxdepth: 2
19+
:caption: Contents:
20+
21+
modules
22+
23+
Indices and tables
24+
==================
25+
26+
* :ref:`genindex`
27+
* :ref:`modindex`
28+
* :ref:`search`

docs/llm.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
llm package
2+
===========
3+
4+
Submodules
5+
----------
6+
7+
llm.base module
8+
---------------
9+
10+
.. automodule:: llm.base
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
llm.llm\_router module
16+
----------------------
17+
18+
.. automodule:: llm.llm_router
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
llm.schemas module
24+
------------------
25+
26+
.. automodule:: llm.schemas
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
llm.utils module
32+
----------------
33+
34+
.. automodule:: llm.utils
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
Module contents
40+
---------------
41+
42+
.. automodule:: llm
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:

docs/modules.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
src
2+
===
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
app
8+
llm
9+
parsers
10+
utils

docs/parsers.database.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
parsers.database package
2+
========================
3+
4+
Submodules
5+
----------
6+
7+
parsers.database.models module
8+
------------------------------
9+
10+
.. automodule:: parsers.database.models
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
parsers.database.utils module
16+
-----------------------------
17+
18+
.. automodule:: parsers.database.utils
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
Module contents
24+
---------------
25+
26+
.. automodule:: parsers.database
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:

docs/parsers.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
parsers package
2+
===============
3+
4+
Subpackages
5+
-----------
6+
7+
.. toctree::
8+
:maxdepth: 4
9+
10+
parsers.database
11+
12+
Submodules
13+
----------
14+
15+
parsers.base\_parser module
16+
---------------------------
17+
18+
.. automodule:: parsers.base_parser
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
parsers.drawio\_parser module
24+
-----------------------------
25+
26+
.. automodule:: parsers.drawio_parser
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
parsers.mermaid\_parser module
32+
------------------------------
33+
34+
.. automodule:: parsers.mermaid_parser
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
parsers.plantuml\_parser module
40+
-------------------------------
41+
42+
.. automodule:: parsers.plantuml_parser
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
Module contents
48+
---------------
49+
50+
.. automodule:: parsers
51+
:members:
52+
:undoc-members:
53+
:show-inheritance:

docs/utils.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
utils package
2+
=============
3+
4+
Submodules
5+
----------
6+
7+
utils.cache module
8+
------------------
9+
10+
.. automodule:: utils.cache
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
utils.logger module
16+
-------------------
17+
18+
.. automodule:: utils.logger
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
utils.rate\_limiter module
24+
--------------------------
25+
26+
.. automodule:: utils.rate_limiter
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
utils.token\_counter module
32+
---------------------------
33+
34+
.. automodule:: utils.token_counter
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
Module contents
40+
---------------
41+
42+
.. automodule:: utils
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:

requirements-docs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
sphinx==7.3.7
22
sphinx-autodoc-typehints==2.2.0
3+
sphinx-rtd-theme==2.0.0

0 commit comments

Comments
 (0)