Skip to content

Commit

Permalink
Finish debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
DavdGao committed Jan 7, 2025
1 parent d8d5d29 commit b03126c
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/tutorial/en/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/bin/bash

set -e

# Generate the API rst files
sphinx-apidoc -o source/build_api ../../../src/agentscope -t source/_templates -e

# Build the html
sphinx-build -M html source build
5 changes: 5 additions & 0 deletions docs/tutorial/en/source/_templates/module.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ basename | heading }}
.. automodule:: {{ qualname }}
{%- for option in automodule_options %}
:{{ option }}:
{%- endfor %}
10 changes: 10 additions & 0 deletions docs/tutorial/en/source/_templates/package.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{%- macro automodule(modname, options) -%}
.. automodule:: {{ modname }}
{%- for option in options %}
:{{ option }}:
{%- endfor %}
{%- endmacro %}

{{- pkgname | heading }}

{{ automodule(pkgname, automodule_options) }}
25 changes: 24 additions & 1 deletion docs/tutorial/en/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "AgentScope Doc"
copyright = "2024, Alibaba"
copyright = "2025, Alibaba"
author = "Alibaba Tongyi Lab"

# -- General configuration ---------------------------------------------------
Expand All @@ -17,6 +17,9 @@
extensions = [
"myst_parser",
"sphinx_gallery.gen_gallery",
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
]

myst_enable_extensions = [
Expand Down Expand Up @@ -52,3 +55,23 @@
]

source_suffix = [".md", ".rst"]


# -- Options for API documentation -------------------------------------------

autodoc_member_order = "groupwise"


def skip_member(app, what, name, obj, skip, options):
if name in [
"Operator",
"ServiceFactory",
"",
]:
return True

return skip


def setup(app):
app.connect("autodoc-skip-member", skip_member)
16 changes: 16 additions & 0 deletions docs/tutorial/en/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,19 @@ Welcome to AgentScope's documentation!
:caption: Examples

build_tutorial/examples

.. toctree::
:maxdepth: 1
:caption: API Docs

build_api/agentscope
build_api/agentscope.message
build_api/agentscope.models
build_api/agentscope.agents
build_api/agentscope.memory
build_api/agentscope.parsers
build_api/agentscope.rag
build_api/agentscope.service
build_api/agentscope.prompt
build_api/agentscope.tokens
build_api/agentscope.exception

0 comments on commit b03126c

Please sign in to comment.