Skip to content

Commit 6619de6

Browse files
committed
Merge remote-tracking branch 'origin/main' into meta
Merge branch 'main' into meta
2 parents 194f8d4 + 044ce70 commit 6619de6

File tree

1,013 files changed

+28728
-31286
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,013 files changed

+28728
-31286
lines changed

.devcontainer/Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#-------------------------------------------------------------------------------------------------------------
2+
# Copyright (c) 2023 - 2024, Owners of https://github.com/autogenhub
3+
# SPDX-License-Identifier: Apache-2.0
4+
# Contributions to this project, i.e., https://github.com/autogenhub/autogen, are licensed under the Apache License, Version 2.0 (Apache-2.0).
5+
6+
# Portions derived from https://github.com/microsoft/autogen under the MIT License.
7+
# SPDX-License-Identifier: MIT
28
# Copyright (c) Microsoft Corporation. All rights reserved.
39
# Licensed under the MIT License. See LICENSE file in the project root for license information.
410
#-------------------------------------------------------------------------------------------------------------

.devcontainer/README.md

+5-14
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,23 @@ These configurations can be used with Codespaces and locally.
1010

1111
- **Purpose**: This Dockerfile, i.e., `./Dockerfile`, is designed for basic setups. It includes common Python libraries and essential dependencies required for general usage of AutoGen.
1212
- **Usage**: Ideal for those just starting with AutoGen or for general-purpose applications.
13-
- **Building the Image**: Run `docker build -f ./Dockerfile -t autogen_base_img .` in this directory.
13+
- **Building the Image**: Run `docker build -f ./Dockerfile -t autogenhub_base_img .` in this directory.
1414
- **Using with Codespaces**: `Code > Codespaces > Click on +` By default + creates a Codespace on the current branch.
1515

1616
### full
1717

1818
- **Purpose**: This Dockerfile, i.e., `./full/Dockerfile` is for advanced features. It includes additional dependencies and is configured for more complex or feature-rich AutoGen applications.
1919
- **Usage**: Suited for advanced users who need the full range of AutoGen's capabilities.
20-
- **Building the Image**: Execute `docker build -f full/Dockerfile -t autogen_full_img .`.
20+
- **Building the Image**: Execute `docker build -f full/Dockerfile -t autogenhub_full_img .`.
2121
- **Using with Codespaces**: `Code > Codespaces > Click on ...> New with options > Choose "full" as devcontainer configuration`. This image may require a Codespace with at least 64GB of disk space.
2222

2323
### dev
2424

2525
- **Purpose**: Tailored for AutoGen project developers, this Dockerfile, i.e., `./dev/Dockerfile` includes tools and configurations aiding in development and contribution.
2626
- **Usage**: Recommended for developers who are contributing to the AutoGen project.
27-
- **Building the Image**: Run `docker build -f dev/Dockerfile -t autogen_dev_img .`.
27+
- **Building the Image**: Run `docker build -f dev/Dockerfile -t autogenhub_dev_img .`.
2828
- **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.
29-
- **Before using**: We highly encourage all potential contributors to read the [AutoGen Contributing](https://microsoft.github.io/autogen/docs/Contribute) page prior to submitting any pull requests.
30-
31-
32-
### studio
33-
34-
- **Purpose**: Tailored for AutoGen project developers, this Dockerfile, i.e., `./studio/Dockerfile`, includes tools and configurations aiding in development and contribution.
35-
- **Usage**: Recommended for developers who are contributing to the AutoGen project.
36-
- **Building the Image**: Run `docker build -f studio/Dockerfile -t autogen_studio_img .`.
37-
- **Using with Codespaces**: `Code > Codespaces > Click on ...> New with options > Choose "studio" as devcontainer configuration`.
38-
- **Before using**: We highly encourage all potential contributors to read the [AutoGen Contributing](https://microsoft.github.io/autogen/docs/Contribute) page prior to submitting any pull requests.
29+
- **Before using**: We highly encourage all potential contributors to read the [AutoGen Contributing](https://autogenhub.github.io/autogen/docs/Contribute) page prior to submitting any pull requests.
3930

4031

4132
## Customizing Dockerfiles
@@ -49,7 +40,7 @@ Feel free to modify these Dockerfiles for your specific project needs. Here are
4940
- **Setting Environment Variables**: Add environment variables using the `ENV` command for any application-specific configurations. We have prestaged the line needed to inject your OpenAI_key into the docker environment as a environmental variable. Others can be staged in the same way. Just uncomment the line.
5041
`# ENV OPENAI_API_KEY="{OpenAI-API-Key}"` to `ENV OPENAI_API_KEY="{OpenAI-API-Key}"`
5142
- **Need a less "Advanced" Autogen build**: If the `./full/Dockerfile` is to much but you need more than advanced then update this line in the Dockerfile file.
52-
`RUN pip install pyautogen[teachable,lmm,retrievechat,mathchat,blendsearch] autogenra` to install just what you need. `RUN pip install pyautogen[retrievechat,blendsearch] autogenra`
43+
`RUN pip install autogen[teachable,lmm,retrievechat,mathchat,blendsearch] autogenra` to install just what you need. `RUN pip install autogen[retrievechat,blendsearch] autogenra`
5344
- **Can't Dev without your favorite CLI tool**: if you need particular OS tools to be installed in your Docker container you can add those packages here right after the sudo for the `./base/Dockerfile` and `./full/Dockerfile` files. In the example below we are installing net-tools and vim to the environment.
5445

5546
```code

.devcontainer/dev/Dockerfile

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Basic setup
22
FROM python:3.11-slim-bookworm
33

4-
# add git lhs to apt
4+
# add git lfs to apt
55
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
66

77
# Update and install necessary packages
@@ -10,21 +10,23 @@ RUN apt-get update && apt-get -y update
1010
RUN apt-get install -y sudo git npm vim nano curl wget git-lfs
1111

1212
# Setup a non-root user 'autogen' with sudo access
13-
RUN adduser --disabled-password --gecos '' autogen
13+
RUN adduser --home /home/autogenhub --disabled-password --gecos '' autogen
1414
RUN adduser autogen sudo
1515
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
1616
USER autogen
17-
WORKDIR /home/autogen
17+
WORKDIR /home/autogenhub
1818

1919
# Set environment variable
2020
# ENV OPENAI_API_KEY="{OpenAI-API-Key}"
2121

2222
# Clone the AutoGen repository
23-
RUN git clone https://github.com/microsoft/autogen.git /home/autogen/autogen
24-
WORKDIR /home/autogen/autogen
23+
RUN git clone https://github.com/autogenhub/autogen.git /home/autogenhub/autogen
24+
WORKDIR /home/autogenhub/autogen
2525

2626
# Install AutoGen in editable mode with extra components
27-
RUN sudo pip install -e .[test,teachable,lmm,retrievechat,mathchat,blendsearch]
27+
RUN sudo pip install --upgrade pip && \
28+
sudo pip install -e .[test,teachable,lmm,retrievechat,mathchat,blendsearch] && \
29+
pip install pytest-xdist pytest-cov
2830

2931
# Install pre-commit hooks
3032
RUN pre-commit install
@@ -37,17 +39,16 @@ RUN yarn install --frozen-lockfile --ignore-engines
3739

3840
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
3941
wget -q https://github.com/quarto-dev/quarto-cli/releases/download/v1.5.23/quarto-1.5.23-linux-${arch}.tar.gz && \
40-
mkdir -p /home/autogen/quarto/ && \
41-
tar -xzf quarto-1.5.23-linux-${arch}.tar.gz --directory /home/autogen/quarto/ && \
42+
mkdir -p /home/autogenhub/quarto/ && \
43+
tar -xzf quarto-1.5.23-linux-${arch}.tar.gz --directory /home/autogenhub/quarto/ && \
4244
rm quarto-1.5.23-linux-${arch}.tar.gz
4345

44-
ENV PATH="${PATH}:/home/autogen/quarto/quarto-1.5.23/bin/"
46+
ENV PATH="${PATH}:/home/autogenhub/quarto/quarto-1.5.23/bin/"
4547

4648
# Exposes the Yarn port for Docusaurus
4749
EXPOSE 3000
4850

4951
# Pre-load popular Python packages
50-
RUN pip install --upgrade pip
5152
RUN pip install numpy pandas matplotlib seaborn scikit-learn requests urllib3 nltk pillow pytest beautifulsoup4
5253

5354
# Set the default command to bash

.devcontainer/full/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ RUN apt-get update \
1111
&& rm -rf /var/lib/apt/lists/*
1212

1313
# Setup a non-root user 'autogen' with sudo access
14-
RUN adduser --disabled-password --gecos '' autogen
14+
RUN adduser --home /home/autogenhub --disabled-password --gecos '' autogen
1515
RUN adduser autogen sudo
1616
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
1717
USER autogen
18-
WORKDIR /home/autogen
18+
WORKDIR /home/autogenhub
1919

2020
# Set environment variable if needed
2121
# ENV OPENAI_API_KEY="{OpenAI-API-Key}"
2222

2323
# Install Python packages
2424
RUN pip install --upgrade pip
25-
RUN pip install pyautogen[teachable,lmm,retrievechat,mathchat,blendsearch] autogenra
26-
RUN pip install numpy pandas matplotlib seaborn scikit-learn requests urllib3 nltk pillow pytest beautifulsoup4
25+
RUN pip install autogen[teachable,lmm,retrievechat,mathchat,blendsearch] autogenra
26+
RUN pip install numpy pandas matplotlib seaborn scikit-learn requests urllib3 nltk pillow pytest beautifulsoup4 pytest-xdist pytest-cov
2727

2828
# Expose port
2929
EXPOSE 8081

.devcontainer/studio/Dockerfile

-27
This file was deleted.

.devcontainer/studio/devcontainer.json

-21
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Thank you for your contribution! Please review https://microsoft.github.io/autogen/docs/Contribute before opening a pull request. -->
1+
<!-- Thank you for your contribution! Please review https://autogenhub.github.io/autogen/docs/Contribute before opening a pull request. -->
22

33
<!-- 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. -->
44

@@ -12,6 +12,6 @@
1212

1313
## Checks
1414

15-
- [ ] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
15+
- [ ] I've included any doc changes needed for https://autogenhub.github.io/autogen/. See https://autogenhub.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
1616
- [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR.
1717
- [ ] I've made sure all auto checks have passed.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: ContribGraphRagTests
5+
6+
on:
7+
pull_request:
8+
branches: ["main"]
9+
paths:
10+
- "autogen/agentchat/contrib/graph_rag/**"
11+
- "test/agentchat/contrib/graph_rag/**"
12+
- ".github/workflows/contrib-tests.yml"
13+
- "setup.py"
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
17+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
18+
permissions:
19+
{}
20+
# actions: read
21+
# checks: read
22+
# contents: read
23+
# deployments: read
24+
jobs:
25+
GraphRagIntegrationTest-FalkorDB-Ubuntu:
26+
runs-on: ubuntu-latest
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
python-version: ["3.10", "3.11"]
31+
services:
32+
falkordb:
33+
image: falkordb/falkordb:edge
34+
ports:
35+
- 6379:6379
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Set up Python ${{ matrix.python-version }}
39+
uses: actions/setup-python@v5
40+
with:
41+
python-version: ${{ matrix.python-version }}
42+
- name: Install packages and dependencies for all tests
43+
run: |
44+
python -m pip install --upgrade pip wheel
45+
pip install pytest
46+
- name: Install Falkor DB SDK when on linux
47+
run: |
48+
pip install -e .[graph_rag_falkor_db]
49+
- name: Set AUTOGEN_USE_DOCKER based on OS
50+
shell: bash
51+
run: |
52+
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
53+
- name: Coverage
54+
env:
55+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
56+
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
57+
AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }}
58+
OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }}
59+
run: |
60+
pip install pytest-cov>=5
61+
pytest test/agentchat/contrib/graph_rag/test_falkor_graph_rag.py --skip-openai
62+
- name: Upload coverage to Codecov
63+
uses: codecov/codecov-action@v3
64+
with:
65+
file: ./coverage.xml
66+
flags: unittests

0 commit comments

Comments
 (0)