Skip to content

Commit e07b06b

Browse files
authored
Merge branch 'microsoft:main' into main
2 parents df44ed8 + af9b300 commit e07b06b

File tree

214 files changed

+17953
-4570
lines changed

Some content is hidden

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

214 files changed

+17953
-4570
lines changed

.devcontainer/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:3.10
99
# Update the OS and maybe install packages
1010
#
1111
ENV DEBIAN_FRONTEND=noninteractive
12+
13+
# add git lhs to apt
14+
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
15+
1216
RUN apt-get update \
1317
&& apt-get upgrade -y \
14-
&& apt-get -y install --no-install-recommends build-essential npm \
18+
&& apt-get -y install --no-install-recommends build-essential npm git-lfs \
1519
&& apt-get autoremove -y \
1620
&& apt-get clean -y \
1721
&& arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
@@ -22,6 +26,7 @@ ENV DEBIAN_FRONTEND=dialog
2226

2327
# For docs
2428
RUN npm install --global yarn
29+
RUN pip install --upgrade pip
2530
RUN pip install pydoc-markdown
2631
RUN pip install pyyaml
2732
RUN pip install colored

.devcontainer/dev/Dockerfile

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

4+
# add git lhs to apt
5+
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
6+
47
# Update and install necessary packages
58
RUN apt-get update && apt-get -y update
69
# added vim and nano for convenience
7-
RUN apt-get install -y sudo git npm vim nano curl wget
10+
RUN apt-get install -y sudo git npm vim nano curl wget git-lfs
811

912
# Setup a non-root user 'autogen' with sudo access
1013
RUN adduser --disabled-password --gecos '' autogen
@@ -44,6 +47,7 @@ ENV PATH="${PATH}:/home/autogen/quarto/quarto-1.5.23/bin/"
4447
EXPOSE 3000
4548

4649
# Pre-load popular Python packages
50+
RUN pip install --upgrade pip
4751
RUN pip install numpy pandas matplotlib seaborn scikit-learn requests urllib3 nltk pillow pytest beautifulsoup4
4852

4953
# Set the default command to bash

.devcontainer/full/Dockerfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
FROM python:3.11-slim-bookworm
22

3+
# add git lhs to apt
4+
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
5+
36
# Update and install dependencies
47
RUN apt-get update \
58
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
6-
software-properties-common sudo\
9+
software-properties-common sudo git-lfs \
710
&& apt-get clean \
811
&& rm -rf /var/lib/apt/lists/*
912

.devcontainer/studio/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:3.10
99
# Update the OS and maybe install packages
1010
#
1111
ENV DEBIAN_FRONTEND=noninteractive
12+
13+
# add git lhs to apt
14+
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
15+
1216
RUN apt-get update \
1317
&& apt-get upgrade -y \
14-
&& apt-get -y install --no-install-recommends build-essential npm \
18+
&& apt-get -y install --no-install-recommends build-essential npm git-lfs \
1519
&& apt-get autoremove -y \
1620
&& apt-get clean -y \
1721
&& rm -rf /var/lib/apt/lists/*
1822
ENV DEBIAN_FRONTEND=dialog
1923

2024
# For docs
2125
RUN npm install --global yarn
26+
RUN pip install --upgrade pip
2227
RUN pip install pydoc-markdown

.gitattributes

Whitespace-only changes.

.github/workflows/build.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
os: [ubuntu-latest, macos-latest, windows-latest]
3232
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
3333
steps:
34-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3535
- name: Set up Python ${{ matrix.python-version }}
36-
uses: actions/setup-python@v4
36+
uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
3939
- name: Install packages and dependencies
@@ -57,16 +57,16 @@ jobs:
5757
- name: Test with pytest skipping openai tests
5858
if: matrix.python-version != '3.10' && matrix.os == 'ubuntu-latest'
5959
run: |
60-
pytest test --skip-openai
60+
pytest test --skip-openai --durations=10 --durations-min=1.0
6161
- name: Test with pytest skipping openai and docker tests
6262
if: matrix.python-version != '3.10' && matrix.os != 'ubuntu-latest'
6363
run: |
64-
pytest test --skip-openai --skip-docker
64+
pytest test --skip-openai --skip-docker --durations=10 --durations-min=1.0
6565
- name: Coverage
6666
if: matrix.python-version == '3.10'
6767
run: |
6868
pip install -e .[test,redis]
69-
coverage run -a -m pytest test --ignore=test/agentchat/contrib --skip-openai
69+
coverage run -a -m pytest test --ignore=test/agentchat/contrib --skip-openai --durations=10 --durations-min=1.0
7070
coverage xml
7171
- name: Upload coverage to Codecov
7272
if: matrix.python-version == '3.10'

.github/workflows/contrib-openai.yml

+49-14
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
steps:
2828
# checkout to pr branch
2929
- name: Checkout
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131
with:
3232
ref: ${{ github.event.pull_request.head.sha }}
3333
- name: Set up Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v4
34+
uses: actions/setup-python@v5
3535
with:
3636
python-version: ${{ matrix.python-version }}
3737
- name: Install packages and dependencies
@@ -70,11 +70,11 @@ jobs:
7070
steps:
7171
# checkout to pr branch
7272
- name: Checkout
73-
uses: actions/checkout@v3
73+
uses: actions/checkout@v4
7474
with:
7575
ref: ${{ github.event.pull_request.head.sha }}
7676
- name: Set up Python ${{ matrix.python-version }}
77-
uses: actions/setup-python@v4
77+
uses: actions/setup-python@v5
7878
with:
7979
python-version: ${{ matrix.python-version }}
8080
- name: Install packages and dependencies
@@ -111,11 +111,11 @@ jobs:
111111
steps:
112112
# checkout to pr branch
113113
- name: Checkout
114-
uses: actions/checkout@v3
114+
uses: actions/checkout@v4
115115
with:
116116
ref: ${{ github.event.pull_request.head.sha }}
117117
- name: Set up Python ${{ matrix.python-version }}
118-
uses: actions/setup-python@v4
118+
uses: actions/setup-python@v5
119119
with:
120120
python-version: ${{ matrix.python-version }}
121121
- name: Install packages and dependencies
@@ -152,11 +152,11 @@ jobs:
152152
steps:
153153
# checkout to pr branch
154154
- name: Checkout
155-
uses: actions/checkout@v3
155+
uses: actions/checkout@v4
156156
with:
157157
ref: ${{ github.event.pull_request.head.sha }}
158158
- name: Set up Python ${{ matrix.python-version }}
159-
uses: actions/setup-python@v4
159+
uses: actions/setup-python@v5
160160
with:
161161
python-version: ${{ matrix.python-version }}
162162
- name: Install packages and dependencies
@@ -190,11 +190,11 @@ jobs:
190190
steps:
191191
# checkout to pr branch
192192
- name: Checkout
193-
uses: actions/checkout@v3
193+
uses: actions/checkout@v4
194194
with:
195195
ref: ${{ github.event.pull_request.head.sha }}
196196
- name: Set up Python ${{ matrix.python-version }}
197-
uses: actions/setup-python@v4
197+
uses: actions/setup-python@v5
198198
with:
199199
python-version: ${{ matrix.python-version }}
200200
- name: Install packages and dependencies
@@ -231,11 +231,11 @@ jobs:
231231
steps:
232232
# checkout to pr branch
233233
- name: Checkout
234-
uses: actions/checkout@v3
234+
uses: actions/checkout@v4
235235
with:
236236
ref: ${{ github.event.pull_request.head.sha }}
237237
- name: Set up Python ${{ matrix.python-version }}
238-
uses: actions/setup-python@v4
238+
uses: actions/setup-python@v5
239239
with:
240240
python-version: ${{ matrix.python-version }}
241241
- name: Install packages and dependencies
@@ -270,11 +270,11 @@ jobs:
270270
steps:
271271
# checkout to pr branch
272272
- name: Checkout
273-
uses: actions/checkout@v3
273+
uses: actions/checkout@v4
274274
with:
275275
ref: ${{ github.event.pull_request.head.sha }}
276276
- name: Set up Python ${{ matrix.python-version }}
277-
uses: actions/setup-python@v4
277+
uses: actions/setup-python@v5
278278
with:
279279
python-version: ${{ matrix.python-version }}
280280
- name: Install packages and dependencies
@@ -299,3 +299,38 @@ jobs:
299299
with:
300300
file: ./coverage.xml
301301
flags: unittests
302+
ImageGen:
303+
strategy:
304+
matrix:
305+
os: [ubuntu-latest]
306+
python-version: ["3.12"]
307+
runs-on: ${{ matrix.os }}
308+
environment: openai1
309+
steps:
310+
# checkout to pr branch
311+
- name: Checkout
312+
uses: actions/checkout@v4
313+
with:
314+
ref: ${{ github.event.pull_request.head.sha }}
315+
- name: Set up Python ${{ matrix.python-version }}
316+
uses: actions/setup-python@v5
317+
with:
318+
python-version: ${{ matrix.python-version }}
319+
- name: Install packages and dependencies
320+
run: |
321+
docker --version
322+
python -m pip install --upgrade pip wheel
323+
pip install -e .[lmm]
324+
python -c "import autogen"
325+
pip install coverage pytest
326+
- name: Coverage
327+
env:
328+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
329+
run: |
330+
coverage run -a -m pytest test/agentchat/contrib/capabilities/test_image_generation_capability.py
331+
coverage xml
332+
- name: Upload coverage to Codecov
333+
uses: codecov/codecov-action@v3
334+
with:
335+
file: ./coverage.xml
336+
flags: unittests

.github/workflows/contrib-tests.yml

+18-17
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ on:
1515
concurrency:
1616
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
1717
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
18-
permissions: {}
19-
# actions: read
18+
permissions:
19+
{}
20+
# actions: read
2021
# checks: read
2122
# contents: read
2223
# deployments: read
@@ -29,9 +30,9 @@ jobs:
2930
os: [ubuntu-latest, macos-latest, windows-2019]
3031
python-version: ["3.9", "3.10", "3.11"]
3132
steps:
32-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
3334
- name: Set up Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v4
35+
uses: actions/setup-python@v5
3536
with:
3637
python-version: ${{ matrix.python-version }}
3738
- name: Install packages and dependencies for all tests
@@ -77,9 +78,9 @@ jobs:
7778
os: [ubuntu-latest, macos-latest, windows-2019]
7879
python-version: ["3.8"]
7980
steps:
80-
- uses: actions/checkout@v3
81+
- uses: actions/checkout@v4
8182
- name: Set up Python ${{ matrix.python-version }}
82-
uses: actions/setup-python@v4
83+
uses: actions/setup-python@v5
8384
with:
8485
python-version: ${{ matrix.python-version }}
8586
- name: Install packages and dependencies for all tests
@@ -114,9 +115,9 @@ jobs:
114115
os: [ubuntu-latest, macos-latest, windows-2019]
115116
python-version: ["3.10"]
116117
steps:
117-
- uses: actions/checkout@v3
118+
- uses: actions/checkout@v4
118119
- name: Set up Python ${{ matrix.python-version }}
119-
uses: actions/setup-python@v4
120+
uses: actions/setup-python@v5
120121
with:
121122
python-version: ${{ matrix.python-version }}
122123
- name: Install packages and dependencies for all tests
@@ -151,9 +152,9 @@ jobs:
151152
os: [ubuntu-latest, macos-latest, windows-2019]
152153
python-version: ["3.11"]
153154
steps:
154-
- uses: actions/checkout@v3
155+
- uses: actions/checkout@v4
155156
- name: Set up Python ${{ matrix.python-version }}
156-
uses: actions/setup-python@v4
157+
uses: actions/setup-python@v5
157158
with:
158159
python-version: ${{ matrix.python-version }}
159160
- name: Install packages and dependencies for all tests
@@ -188,9 +189,9 @@ jobs:
188189
os: [ubuntu-latest, macos-latest, windows-2019]
189190
python-version: ["3.12"]
190191
steps:
191-
- uses: actions/checkout@v3
192+
- uses: actions/checkout@v4
192193
- name: Set up Python ${{ matrix.python-version }}
193-
uses: actions/setup-python@v4
194+
uses: actions/setup-python@v5
194195
with:
195196
python-version: ${{ matrix.python-version }}
196197
- name: Install packages and dependencies for all tests
@@ -225,9 +226,9 @@ jobs:
225226
os: [ubuntu-latest, macos-latest, windows-2019]
226227
python-version: ["3.12"]
227228
steps:
228-
- uses: actions/checkout@v3
229+
- uses: actions/checkout@v4
229230
- name: Set up Python ${{ matrix.python-version }}
230-
uses: actions/setup-python@v4
231+
uses: actions/setup-python@v5
231232
with:
232233
python-version: ${{ matrix.python-version }}
233234
- name: Install packages and dependencies for all tests
@@ -246,7 +247,7 @@ jobs:
246247
- name: Coverage
247248
run: |
248249
pip install coverage>=5.3
249-
coverage run -a -m pytest test/agentchat/contrib/test_img_utils.py test/agentchat/contrib/test_lmm.py test/agentchat/contrib/test_llava.py --skip-openai
250+
coverage run -a -m pytest test/agentchat/contrib/test_img_utils.py test/agentchat/contrib/test_lmm.py test/agentchat/contrib/test_llava.py test/agentchat/contrib/capabilities/test_image_generation_capability.py test/agentchat/contrib/capabilities/test_vision_capability.py --skip-openai
250251
coverage xml
251252
- name: Upload coverage to Codecov
252253
uses: codecov/codecov-action@v3
@@ -262,9 +263,9 @@ jobs:
262263
os: [ubuntu-latest, macos-latest, windows-2019]
263264
python-version: ["3.11"]
264265
steps:
265-
- uses: actions/checkout@v3
266+
- uses: actions/checkout@v4
266267
- name: Set up Python ${{ matrix.python-version }}
267-
uses: actions/setup-python@v4
268+
uses: actions/setup-python@v5
268269
with:
269270
python-version: ${{ matrix.python-version }}
270271
- name: Install packages and dependencies for all tests

0 commit comments

Comments
 (0)