Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into swarmmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
yiranwu0 committed Dec 26, 2024
2 parents e0eaa15 + 6d888b2 commit 33b809c
Show file tree
Hide file tree
Showing 474 changed files with 20,958 additions and 5,453 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ These configurations can be used with Codespaces and locally.
- **Usage**: Recommended for developers who are contributing to the AutoGen project.
- **Building the Image**: Run `docker build -f dev/Dockerfile -t ag2_dev_img .`.
- **Using with Codespaces**: `Code > Codespaces > Click on ...> New with options > Choose "dev" as devcontainer configuration`. This image may require a Codespace with at least 64GB of disk space.
- **Before using**: We highly encourage all potential contributors to read the [AutoGen Contributing](https://ag2ai.github.io/ag2/docs/Contribute) page prior to submitting any pull requests.
- **Before using**: We highly encourage all potential contributors to read the [AutoGen Contributing](https://docs.ag2.ai/docs/contributor-guide/contributing) page prior to submitting any pull requests.


## Customizing Dockerfiles
Expand Down
7 changes: 3 additions & 4 deletions .devcontainer/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ RUN sudo pip install --upgrade pip && \
# Install pre-commit hooks
RUN pre-commit install

# Setup Docusaurus and Yarn for the documentation website
RUN sudo npm install --global yarn
RUN sudo pip install pydoc-markdown
# Setup Mintlify for the documentation website
RUN sudo pip install pydoc-markdown pyyaml termcolor nbclient
RUN cd website
RUN yarn install --frozen-lockfile --ignore-engines
RUN npm install

RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
wget -q https://github.com/quarto-dev/quarto-cli/releases/download/v1.5.23/quarto-1.5.23-linux-${arch}.tar.gz && \
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

### Environment
- AutoGen version: <!-- Specify the AutoGen version (e.g., v0.2.0) -->
- Python version: <!-- Specify the Python version (e.g., 3.8) -->
- Python version: <!-- Specify the Python version (e.g., 3.9) -->
- Operating System: <!-- Specify the OS (e.g., Windows 10, Ubuntu 20.04) -->

### Steps to Reproduce (for bugs)
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ body:
description: |
- AutoGen Version: <!-- Specify the AutoGen version (e.g., v0.2.0) -->
- Operating System: <!-- Specify the OS (e.g., Windows 10, Ubuntu 20.04) -->
- Python Version: <!-- Specify the Python version (e.g., 3.8) -->
- Python Version: <!-- Specify the Python version (e.g., 3.9) -->
- Related Issues: <!-- Link to any related issues here (e.g., #1) -->
- Any other relevant information.
placeholder: Any additional details
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/general_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ body:
description: |
- AutoGen Version: <!-- Specify the AutoGen version (e.g., v0.2.0) -->
- Operating System: <!-- Specify the OS (e.g., Windows 10, Ubuntu 20.04) -->
- Python Version: <!-- Specify the Python version (e.g., 3.8) -->
- Python Version: <!-- Specify the Python version (e.g., 3.9) -->
- Related Issues: <!-- Link to any related issues here (e.g., #1) -->
- Any other relevant information.
placeholder: Any additional details
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Thank you for your contribution! Please review https://ag2ai.github.io/ag2/docs/Contribute before opening a pull request. -->
<!-- Thank you for your contribution! Please review https://docs.ag2.ai/docs/contributor-guide/contributing before opening a pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. -->

Expand All @@ -12,6 +12,6 @@

## Checks

- [ ] I've included any doc changes needed for https://ag2ai.github.io/ag2/. See https://ag2ai.github.io/ag2/docs/Contribute#documentation to build and test documentation locally.
- [ ] I've included any doc changes needed for https://docs.ag2.ai/. See https://docs.ag2.ai/docs/contributor-guide/documentation to build and test documentation locally.
- [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR.
- [ ] I've made sure all auto checks have passed.
11 changes: 4 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
exclude:
- os: macos-latest
python-version: "3.8"
- os: macos-latest
python-version: "3.9"
steps:
Expand All @@ -71,14 +69,14 @@ jobs:
- name: Install packages and dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -e .[cosmosdb]
pip install -e .[test,cosmosdb,interop]
python -c "import autogen"
pip install pytest-cov>=5 mock
- name: Install optional dependencies for code executors
# code executors and udfs auto skip without deps, so only run for python 3.11
if: matrix.python-version == '3.11'
run: |
pip install -e ".[jupyter-executor,test]"
pip install -e ".[jupyter-executor]"
python -m ipykernel install --user --name python3
- name: Set AUTOGEN_USE_DOCKER based on OS
shell: bash
Expand All @@ -99,11 +97,10 @@ jobs:
- name: Coverage with Redis
if: matrix.python-version == '3.10'
run: |
pip install -e .[test,redis,websockets]
pip install -e .[redis,websockets]
pytest test --ignore=test/agentchat/contrib --skip-openai --durations=10 --durations-min=1.0
- name: Test with Cosmos DB
run: |
pip install -e .[test,cosmosdb]
pytest test/cache/test_cosmos_db_cache.py --skip-openai --durations=10 --durations-min=1.0
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10'
Expand Down
119 changes: 119 additions & 0 deletions .github/workflows/deploy-website-mintlify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: mintlify docs

on:
pull_request:
branches: [main]
paths:
- "autogen/**"
- "website/**"
- ".github/workflows/deploy-website-mintlify.yml"
push:
branches: [main]
paths:
- "autogen/**"
- "website/**"
- ".github/workflows/deploy-website-mintlify.yml"
workflow_dispatch:
merge_group:
types: [checks_requested]
permissions:
contents: write
jobs:
checks:
if: github.event_name != 'push'
runs-on: ubuntu-latest
defaults:
run:
working-directory: website
steps:
- uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18.x
- name: setup python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pydoc-markdown pyyaml termcolor nbclient
# Pin databind packages as version 4.5.0 is not compatible with pydoc-markdown.
pip install databind.core==4.4.2 databind.json==4.4.2
- name: Install quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Generate API documentation
run: |
python ./process_api_reference.py
working-directory: website

- name: Convert Jupyter notebooks to MDX
run: |
python ./process_notebooks.py render
working-directory: website

- name: Prepare website content
run: |
# Create a temporary directory for filtered content
mkdir -p temp_website
# Copy files except .ipynb, node_modules, .quarto, .gitignore, and temp_website
find . -type f -not -path "*/node_modules/*" -not -path "*/.quarto/*" -not -path "./temp_website/*" -not -name "*.ipynb" -not -name ".gitignore" -exec cp --parents {} temp_website/ \;
mintlify-release:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
defaults:
run:
working-directory: website
steps:
- uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18.x
- name: setup python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pydoc-markdown pyyaml termcolor nbclient
# Pin databind packages as version 4.5.0 is not compatible with pydoc-markdown.
pip install databind.core==4.4.2 databind.json==4.4.2
- name: Install quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Generate API documentation
run: |
python ./process_api_reference.py
working-directory: website

- name: Convert Jupyter notebooks to MDX
run: |
python ./process_notebooks.py render
working-directory: website

- name: Prepare website content
run: |
# Create a temporary directory for filtered content
mkdir -p temp_website
# Copy files except .ipynb, node_modules, .quarto, .gitignore, and temp_website
find . -type f -not -path "*/node_modules/*" -not -path "*/.quarto/*" -not -path "./temp_website/*" -not -name "*.ipynb" -not -name ".gitignore" -exec cp --parents {} temp_website/ \;
- name: Deploy to Mintlify
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: mintlify-pages
publish_dir: ./website/temp_website
Loading

0 comments on commit 33b809c

Please sign in to comment.