Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Generate Documentation from live objects instead of parsing the source code #539

Open
wants to merge 36 commits into
base: main
Choose a base branch
from

Conversation

harishmohanraj
Copy link
Collaborator

Why are these changes needed?

The initial implementation of API reference documentation generation relied on source code parsing. This PR introduces the following improvements:

Dynamic Documentation Generation: Python modules are now loaded, and documentation is generated from live objects, ensuring all symbols, including those exported to other modules, are accurately documented.
Enhanced UI Customization: The API documentation UI has been updated to meet industry standards, improving both readability and user experience.
These changes result in more accurate documentation and a professional, polished appearance.

Related issue number

Closes #425

Checks

@harishmohanraj harishmohanraj marked this pull request as ready for review January 17, 2025 15:50
@@ -8,6 +8,8 @@ RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.d
RUN apt-get update && apt-get -y update
# added vim and nano for convenience
RUN apt-get install -y sudo git npm vim nano curl wget git-lfs
# need the below packages for the documentation
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This devcontainer should not be used for anything, it will get deleted soon. You should only use container named after different Python versions.

@@ -8,6 +8,8 @@ RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.d
RUN apt-get update && apt-get -y update
# added vim and nano for convenience
RUN apt-get install -y sudo git npm vim nano curl wget git-lfs
# need the below packages for the documentation
RUN apt-get install -y sudo libpq-dev postgresql-server-dev-all
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would you need anything related to postgresql for loading a library?

- name: Install Python dependencies
run: |
uv pip install --system pydoc-markdown pyyaml termcolor nbclient
python -m pip install --upgrade pip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use uv?

# Pin databind packages as version 4.5.0 is not compatible with pydoc-markdown.
uv pip install --system databind.core==4.4.2 databind.json==4.4.2

- name: Install quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Build documentation
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need OPENAI_API_KEY for building docs?

"pyyaml>=6.0.2",
"termcolor>=2.5.0",
"nbclient>=0.10.2",
"arxiv>=2.1.3",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a PR that will remove any additional dependency, it is created by Kumaran and will be merged soon. We cannot possibly include dependencies for all submodules because the dependencies will conflict.

@@ -206,7 +212,7 @@ lint = [
]

dev = [
"pyautogen[lint,test,types,docs]",
"pyautogen[lint,test,types]",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dev must include docs, that's the standard setup

Then, install the required packages by running the following commands:

```bash
pip install pydoc-markdown pyyaml termcolor nbclient
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do we install [docs] dependencies?

@@ -14,22 +14,12 @@ See [here](https://github.com/ag2ai/ag2/blob/main/notebook/contributing.md#how-t
nvm install --lts
```

Then, install the required packages by running the following commands:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davorrunje davorrunje Pending
how do we install [docs] dependencies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs] Generate Documentation from live objects instead of parsing the source code
2 participants