Skip to content

Commit 42c7a59

Browse files
Python: updated doc generation setup and some slight api enhancements (microsoft#267)
* updated doc generation setup and some slight api enhancements * small fix in index
1 parent 139f033 commit 42c7a59

28 files changed

Lines changed: 216 additions & 251 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ cython_debug/
173173
# PyPI configuration file
174174
.pypirc
175175

176+
**/.DS_Store
176177
.DS_Store
177178

178179
# Visual Studio 2015/2017 cache/options directory

python/docs/agent-framework/conf.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# -- Project information -----------------------------------------------------
1616
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
1717
import agent_framework
18+
import agent_framework_foundry
19+
import agent_framework_azure
1820

1921
project = "agent_framework"
2022
copyright = "2025, Microsoft"
@@ -35,6 +37,7 @@
3537
extensions = [
3638
"sphinx.ext.napoleon",
3739
"sphinx.ext.autodoc",
40+
"sphinx.ext.coverage",
3841
"sphinx.ext.autosummary",
3942
"sphinx.ext.todo",
4043
"sphinx.ext.viewcode",
@@ -50,13 +53,16 @@
5053
]
5154
suppress_warnings = ["myst.header"]
5255

53-
napoleon_custom_sections = [("Returns", "params_style")]
56+
# Napoleon settings
57+
napoleon_google_docstring = True
58+
napoleon_use_admonition_for_examples = False
59+
napoleon_include_init_with_doc = True
60+
napoleon_custom_sections = [("returns_style", "params_style")]
5461

5562
templates_path = ["_templates"]
5663

57-
autoclass_content = "class"
5864

59-
# TODO: incldue all notebooks excluding those requiring remote API access.
65+
# TODO: include all notebooks excluding those requiring remote API access.
6066
nb_execution_mode = "off"
6167

6268
# Guides and tutorials must succeed.
@@ -134,11 +140,15 @@
134140
"doc_path": "python/docs/agent-framework/",
135141
}
136142

143+
autoclass_content = "both"
137144
autodoc_default_options = {
138145
"members": True,
146+
"member-order": "alphabetical",
139147
"undoc-members": True,
148+
"show-inheritance": True,
149+
"imported-members": True,
140150
}
141-
151+
autodoc_pydantic_model_show_json = False
142152
autodoc_pydantic_model_show_config_summary = False
143153
autodoc_pydantic_model_show_json_error_strategy = "coerce"
144154
python_use_unqualified_type_names = True

python/docs/agent-framework/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ Get Started
7676

7777
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.
7878

79-
* {py:class}`~agent-framework-openai` for using OpenAI models.
80-
* {py:class}`~agent-framework-azure` for using Azure services.
79+
* {py:mod}`~agent-framework.azure` for using Azure services.
80+
* {py:mod}`~agent-framework.foundry` for using Foundry models.
81+
* {py:mod}`~agent-framework.openai` for using OpenAI models.
8182
+++
8283

8384
:::

python/docs/agent-framework/reference/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ myst:
1414
python/agent_framework
1515
python/agent_framework.exceptions
1616
python/agent_framework.openai
17+
python/agent_framework.azure
18+
python/agent_framework.foundry
1719
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
agent_framework.azure
2+
==========================
3+
4+
.. automodule:: agent_framework.azure

python/docs/agent-framework/reference/python/agent_framework.exceptions.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@ agent_framework.exceptions
22
==========================
33

44
.. automodule:: agent_framework.exceptions
5-
:members:
6-
:undoc-members:
7-
:show-inheritance:
8-
:member-order: bysource
5+
:member-order: bysource
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
agent_framework.foundry
2+
==========================
3+
4+
.. automodule:: agent_framework.foundry
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
agent_framework.openai
2+
==========================
3+
4+
.. automodule:: agent_framework.openai

python/docs/agent-framework/reference/python/agent_framework.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,3 @@ agent_framework
22
===============
33

44
.. automodule:: agent_framework
5-
:members:
6-
:undoc-members:
7-
:imported-members:
8-
:show-inheritance:
9-
:member-order: groupwise

python/packages/azure/agent_framework_azure/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from ._chat_client import AzureChatClient
66
from ._entra_id_authentication import get_entra_auth_token
7+
from ._shared import AzureOpenAISettings
78

89
try:
910
__version__ = importlib.metadata.version(__name__)
@@ -12,6 +13,7 @@
1213

1314
__all__ = [
1415
"AzureChatClient",
16+
"AzureOpenAISettings",
1517
"__version__",
1618
"get_entra_auth_token",
1719
]

0 commit comments

Comments
 (0)