@@ -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 ---------------------------------------------------
@@ -102,7 +102,7 @@ def read_version_from_pyproject():
102102 'sphinx_togglebutton' ,
103103 'sphinxcontrib.datatemplates' ,
104104 # Custom extensions, see `_ext` directory.
105- # 'plugin_markup',
105+ 'plugin_markup' ,
106106]
107107
108108language = 'en'
@@ -131,6 +131,9 @@ def read_version_from_pyproject():
131131autoapi_dirs = ["../../src" ]
132132autoapi_root = "api"
133133autoapi_ignore = ["*__main__*" ]
134+ autoapi_options = [
135+ "members" , "undoc-members" , "private-members" , "special-members" , "show-inheritance" , "show-module-summary"
136+ ]
134137
135138# -- Options for HTML output -------------------------------------------------
136139
@@ -161,6 +164,7 @@ def read_version_from_pyproject():
161164 "repository_url" : "https://github.com/hermes-hmc/hermes" ,
162165 "use_repository_button" : True ,
163166 "navigation_with_keys" : False ,
167+ "max_navbar_depth" : - 1
164168}
165169
166170html_css_files = [
@@ -182,3 +186,20 @@ def read_version_from_pyproject():
182186# -- Options for sphinx-togglebutton -----------------------------------------
183187
184188togglebutton_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+ "Collect" , "HermesCache" , "HermesContext" , "HermesMergeError" , "ld_container" , "ld_context" , "ld_dict" ,
198+ "ld_list" , "ld_merge_dict" , "ld_merge_list" , "MergeSet"
199+ ]):
200+ return True
201+
202+ return skip
203+
204+ def setup (app ):
205+ app .connect ("autoapi-skip-member" , autoapi_skip_member )
0 commit comments