Python: updated doc generation setup and some slight api enhancements (#267)

* updated doc generation setup and some slight api enhancements

* small fix in index
This commit is contained in:
Eduard van Valkenburg
2025-07-31 17:04:22 +02:00
committed by GitHub
Unverified
parent 139f033b05
commit 42c7a59640
28 changed files with 216 additions and 251 deletions
+14 -4
View File
@@ -15,6 +15,8 @@ from sphinx.application import Sphinx
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import agent_framework
import agent_framework_foundry
import agent_framework_azure
project = "agent_framework"
copyright = "2025, Microsoft"
@@ -35,6 +37,7 @@ sys.path.append(str(Path(".").resolve()))
extensions = [
"sphinx.ext.napoleon",
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.autosummary",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
@@ -50,13 +53,16 @@ extensions = [
]
suppress_warnings = ["myst.header"]
napoleon_custom_sections = [("Returns", "params_style")]
# Napoleon settings
napoleon_google_docstring = True
napoleon_use_admonition_for_examples = False
napoleon_include_init_with_doc = True
napoleon_custom_sections = [("returns_style", "params_style")]
templates_path = ["_templates"]
autoclass_content = "class"
# TODO: incldue all notebooks excluding those requiring remote API access.
# TODO: include all notebooks excluding those requiring remote API access.
nb_execution_mode = "off"
# Guides and tutorials must succeed.
@@ -134,11 +140,15 @@ html_context = {
"doc_path": "python/docs/agent-framework/",
}
autoclass_content = "both"
autodoc_default_options = {
"members": True,
"member-order": "alphabetical",
"undoc-members": True,
"show-inheritance": True,
"imported-members": True,
}
autodoc_pydantic_model_show_json = False
autodoc_pydantic_model_show_config_summary = False
autodoc_pydantic_model_show_json_error_strategy = "coerce"
python_use_unqualified_type_names = True
+3 -2
View File
@@ -76,8 +76,9 @@ Get Started
Implementations of connectors and other external components for the Agent Framework. These extensions allow you to connect to various AI models, services, and tools, enhancing the capabilities of your agents.
* {py:class}`~agent-framework-openai` for using OpenAI models.
* {py:class}`~agent-framework-azure` for using Azure services.
* {py:mod}`~agent-framework.azure` for using Azure services.
* {py:mod}`~agent-framework.foundry` for using Foundry models.
* {py:mod}`~agent-framework.openai` for using OpenAI models.
+++
:::
@@ -14,4 +14,6 @@ myst:
python/agent_framework
python/agent_framework.exceptions
python/agent_framework.openai
python/agent_framework.azure
python/agent_framework.foundry
```
@@ -0,0 +1,4 @@
agent_framework.azure
==========================
.. automodule:: agent_framework.azure
@@ -2,7 +2,4 @@ agent_framework.exceptions
==========================
.. automodule:: agent_framework.exceptions
:members:
:undoc-members:
:show-inheritance:
:member-order: bysource
:member-order: bysource
@@ -0,0 +1,4 @@
agent_framework.foundry
==========================
.. automodule:: agent_framework.foundry
@@ -0,0 +1,4 @@
agent_framework.openai
==========================
.. automodule:: agent_framework.openai
@@ -2,8 +2,3 @@ agent_framework
===============
.. automodule:: agent_framework
:members:
:undoc-members:
:imported-members:
:show-inheritance:
:member-order: groupwise