@@ -39,7 +39,7 @@ def read_from_pyproject(file_path="../../pyproject.toml"):
3939 data = toml .load (file_path )
4040
4141 # Navigate to the authors metadata
42- metadata = data .get ("tool" , {}). get ( "poetry " , {})
42+ metadata = data .get ("project " , {})
4343 if not metadata :
4444 return "No metadata found in pyproject.toml"
4545 return metadata
@@ -56,7 +56,7 @@ def read_authors_from_pyproject():
5656 if not authors :
5757 return "No authors metadata found in pyproject.toml"
5858 # Convert the list of authors to a comma-separated string
59- return ", " .join ([a . split ( " <" )[ 0 ] for a in authors ])
59+ return ", " .join ([author [ "name" ] for author in authors ])
6060
6161def read_version_from_pyproject ():
6262 metadata = read_from_pyproject ()
@@ -73,7 +73,7 @@ def read_version_from_pyproject():
7373author = read_authors_from_pyproject ()
7474
7575# The full version, including alpha/beta/rc tags
76- release = read_version_from_pyproject ()
76+ version = release = read_version_from_pyproject ()
7777
7878
7979# -- General configuration ---------------------------------------------------
@@ -132,7 +132,7 @@ def read_version_from_pyproject():
132132autoapi_root = "api"
133133autoapi_ignore = ["*__main__*" ]
134134autoapi_options = [
135- "members" , "undoc-members" , "private-members" , "show-inheritance " , "show-module-summary " , "special-members "
135+ "members" , "undoc-members" , "private-members" , "special-members " , "show-inheritance " , "show-module-summary "
136136]
137137
138138# -- Options for HTML output -------------------------------------------------
@@ -164,6 +164,7 @@ def read_version_from_pyproject():
164164 "repository_url" : "https://github.com/hermes-hmc/hermes" ,
165165 "use_repository_button" : True ,
166166 "navigation_with_keys" : False ,
167+ "max_navbar_depth" : - 1
167168}
168169
169170html_css_files = [
@@ -185,3 +186,19 @@ def read_version_from_pyproject():
185186# -- Options for sphinx-togglebutton -----------------------------------------
186187
187188togglebutton_hint = "Click to show screenshot"
189+
190+
191+ # TODO: remove this workaround and remove "undoc-members" from autoapi_options once everything is documented
192+ # This removes all generated entries for known documented classes (because autoapi will add all attributes
193+ # it finds in the code no matter if they are described in a class doc string or not).
194+ def autoapi_skip_member (app , obj_type , name , obj , skip , options ):
195+ if obj_type == "attribute" :
196+ if any (documented_type in obj .id for documented_type in [
197+ "ld_container" , "ld_dict" , "ld_list" , "ld_merge_container" , "ld_merge_dict" , "ld_merge_list" , "ld_context"
198+ ]):
199+ return True
200+
201+ return skip
202+
203+ def setup (app ):
204+ app .connect ("autoapi-skip-member" , autoapi_skip_member )
0 commit comments