55
66import os
77import sys
8-
9- sys .path .insert (0 , os .path .abspath ("../.." ))
8+ sys .path .insert (0 , os .path .abspath ('../..' ))
109
1110# -- Project information -----------------------------------------------------
1211# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
1312
14- project = " ArchiPy"
15- copyright = " 2024, Mehdi Einali, Hossein Nejati"
16- author = " Mehdi Einali, Hossein Nejati"
17- version = " 0.1.0"
18- release = " 0.1.0"
13+ project = ' ArchiPy'
14+ copyright = ' 2024, Mehdi Einali, Hossein Nejati'
15+ author = ' Mehdi Einali, Hossein Nejati'
16+ version = ' 0.1.0'
17+ release = ' 0.1.0'
1918
2019# -- General configuration ---------------------------------------------------
2120# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
2221
2322extensions = [
24- "sphinx.ext.autodoc" ,
25- "sphinx.ext.viewcode" ,
26- "sphinx.ext.napoleon" ,
27- "sphinx_autodoc_typehints" ,
28- "sphinx.ext.intersphinx" ,
29- "sphinx.ext.autosectionlabel" ,
23+ 'sphinx.ext.autodoc' ,
24+ 'sphinx.ext.viewcode' ,
25+ 'sphinx.ext.napoleon' ,
26+ 'sphinx_autodoc_typehints' ,
27+ 'sphinx.ext.intersphinx' ,
28+ 'sphinx.ext.autosectionlabel' ,
29+ 'sphinx.ext.coverage' ,
30+ 'sphinx.ext.inheritance_diagram' ,
31+ 'sphinx.ext.todo' ,
32+ 'sphinx.ext.autosummary' ,
33+ 'autoapi.extension' ,
34+ 'autodocsumm' ,
35+ ]
36+
37+ # AutoAPI settings for better code extraction
38+ autoapi_type = 'python'
39+ autoapi_dirs = ['../../archipy' ]
40+ autoapi_options = [
41+ 'members' ,
42+ 'undoc-members' ,
43+ 'private-members' ,
44+ 'special-members' ,
45+ 'inherited-members' ,
46+ 'show-inheritance' ,
47+ 'show-module-summary' ,
48+ 'imported-members' ,
3049]
50+ autoapi_python_class_content = 'both'
51+ autoapi_member_order = 'groupwise'
52+ autoapi_add_toctree_entry = False # We'll handle this in our own index
3153
32- templates_path = [" _templates" ]
54+ templates_path = [' _templates' ]
3355exclude_patterns = []
3456
3557# -- Options for autodoc -----------------------------------------------------
36- autodoc_member_order = " bysource"
37- autodoc_typehints = " description"
38- autoclass_content = " both"
58+ autodoc_member_order = ' bysource'
59+ autodoc_typehints = ' description'
60+ autoclass_content = ' both'
3961autodoc_default_options = {
40- "members" : True ,
41- "show-inheritance" : True ,
42- "undoc-members" : True ,
62+ 'members' : True ,
63+ 'member-order' : 'bysource' ,
64+ 'special-members' : True ,
65+ 'inherited-members' : True ,
66+ 'show-inheritance' : True ,
67+ 'undoc-members' : True ,
68+ 'private-members' : True , # Include private members with leading underscore
69+ 'ignore-module-all' : True ,
4370}
4471
72+ # Enable auto-summary generation
73+ autosummary_generate = True
74+
75+ # Include __init__ method docstring in class docstring
76+ autoclass_content = 'both'
77+
78+ # Enable todos
79+ todo_include_todos = True
80+
81+ # Inheritance diagrams
82+ inheritance_graph_attrs = dict (rankdir = "TB" , size = '"12.0, 12.0"' , fontsize = 14 , ratio = 'compress' )
83+ inheritance_node_attrs = dict (shape = 'rect' , fontsize = 14 , height = 0.75 , margin = '"0.08, 0.05"' )
84+
85+ # Enable documenting typehints
86+ autodoc_typehints = 'description'
87+ typehints_fully_qualified = False
88+ always_document_param_types = True
89+
4590# -- Options for napoleon ----------------------------------------------------
4691napoleon_google_docstring = True
4792napoleon_numpy_docstring = False
60105# -- Options for HTML output -------------------------------------------------
61106# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
62107
63- html_theme = " sphinx_rtd_theme"
64- html_static_path = [" _static" ]
108+ html_theme = ' sphinx_rtd_theme'
109+ html_static_path = [' _static' ]
65110html_logo = None
66111html_favicon = None
67112html_title = f"{ project } { version } Documentation"
68113html_short_title = project
69114
70115# -- Options for intersphinx -------------------------------------------------
71116intersphinx_mapping = {
72- " python" : (" https://docs.python.org/3" , None ),
73- " sqlalchemy" : (" https://docs.sqlalchemy.org/en/14/" , None ),
74- " pydantic" : (" https://docs.pydantic.dev/" , None ),
117+ ' python' : (' https://docs.python.org/3' , None ),
118+ ' sqlalchemy' : (' https://docs.sqlalchemy.org/en/14/' , None ),
119+ ' pydantic' : (' https://docs.pydantic.dev/' , None ),
75120}
76121
77122# -- Options for autosectionlabel --------------------------------------------
82127
83128# -- Options for LaTeX output ------------------------------------------------
84129latex_elements = {
85- " papersize" : " a4paper" ,
86- " pointsize" : " 11pt" ,
87- " preamble" : "" ,
88- " figure_align" : " htbp" ,
130+ ' papersize' : ' a4paper' ,
131+ ' pointsize' : ' 11pt' ,
132+ ' preamble' : '' ,
133+ ' figure_align' : ' htbp' ,
89134}
90135
91136# Define master_doc (the main document)
92- master_doc = " index"
137+ master_doc = ' index'
93138
94139latex_documents = [
95- (master_doc , "ArchiPy.tex" , "ArchiPy Documentation" , author , "manual" ),
96- ]
140+ (master_doc , 'ArchiPy.tex' , 'ArchiPy Documentation' ,
141+ author , 'manual' ),
142+ ]
0 commit comments