-
Notifications
You must be signed in to change notification settings - Fork 179
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
base: main
Are you sure you want to change the base?
Conversation
Fix broken links
[Docs] Generate Documentation from live objects instead of parsing the source code
Update python version in workflow file
@@ -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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 }} |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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]", |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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?
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