Skip to content

Commit f261c92

Browse files
sonichiafourney
authored andcommitted
bump version to 0.2.9 (microsoft#1430)
* Fixed rounding bug. * bump version to 0.2.9 * fix format error * simplify contrib tests --------- Co-authored-by: Adam Fourney <[email protected]>
1 parent a08c26d commit f261c92

File tree

7 files changed

+15
-47
lines changed

7 files changed

+15
-47
lines changed

.github/workflows/contrib-tests.yml

+10-41
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
os: [ubuntu-latest, macos-latest, windows-2019]
30-
python-version: ["3.8", "3.9", "3.10", "3.11"]
30+
python-version: ["3.9", "3.10", "3.11"]
3131
steps:
3232
- uses: actions/checkout@v3
3333
- name: Set up Python ${{ matrix.python-version }}
@@ -38,12 +38,12 @@ jobs:
3838
run: |
3939
python -m pip install --upgrade pip wheel
4040
pip install pytest
41-
- name: Install qdrant_client when python-version is 3.8 and 3.10
42-
if: matrix.python-version == '3.8' || matrix.python-version == '3.10'
41+
- name: Install qdrant_client when python-version is 3.10
42+
if: matrix.python-version == '3.10'
4343
run: |
4444
pip install qdrant_client[fastembed]
45-
- name: Install unstructured when python-version is 3.9 and 3.11 and not windows
46-
if: (matrix.python-version == '3.9' || matrix.python-version == '3.11') && matrix.os != 'windows-2019'
45+
- name: Install unstructured when python-version is 3.9 and not windows
46+
if: matrix.python-version == '3.9' && matrix.os != 'windows-2019'
4747
run: |
4848
pip install unstructured[all-docs]
4949
- name: Install packages and dependencies for RetrieveChat
@@ -59,13 +59,11 @@ jobs:
5959
run: |
6060
pytest test/test_retrieve_utils.py test/agentchat/contrib/test_retrievechat.py test/agentchat/contrib/test_qdrant_retrievechat.py --skip-openai
6161
- name: Coverage
62-
if: matrix.python-version == '3.10'
6362
run: |
6463
pip install coverage>=5.3
6564
coverage run -a -m pytest test/test_retrieve_utils.py test/agentchat/contrib/test_retrievechat.py test/agentchat/contrib/test_qdrant_retrievechat.py --skip-openai
6665
coverage xml
6766
- name: Upload coverage to Codecov
68-
if: matrix.python-version == '3.10'
6967
uses: codecov/codecov-action@v3
7068
with:
7169
file: ./coverage.xml
@@ -77,7 +75,7 @@ jobs:
7775
fail-fast: false
7876
matrix:
7977
os: [ubuntu-latest, macos-latest, windows-2019]
80-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
78+
python-version: ["3.8"]
8179
steps:
8280
- uses: actions/checkout@v3
8381
- name: Set up Python ${{ matrix.python-version }}
@@ -97,18 +95,12 @@ jobs:
9795
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
9896
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
9997
fi
100-
- name: Test Compression
101-
if: matrix.python-version != '3.10' # diversify the python versions
102-
run: |
103-
pytest test/agentchat/contrib/test_compressible_agent.py --skip-openai
10498
- name: Coverage
105-
if: matrix.python-version == '3.10'
10699
run: |
107100
pip install coverage>=5.3
108101
coverage run -a -m pytest test/agentchat/contrib/test_compressible_agent.py --skip-openai
109102
coverage xml
110103
- name: Upload coverage to Codecov
111-
if: matrix.python-version == '3.10'
112104
uses: codecov/codecov-action@v3
113105
with:
114106
file: ./coverage.xml
@@ -120,7 +112,7 @@ jobs:
120112
fail-fast: false
121113
matrix:
122114
os: [ubuntu-latest, macos-latest, windows-2019]
123-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
115+
python-version: ["3.10"]
124116
steps:
125117
- uses: actions/checkout@v3
126118
- name: Set up Python ${{ matrix.python-version }}
@@ -140,18 +132,12 @@ jobs:
140132
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
141133
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
142134
fi
143-
- name: Test GPTAssistantAgent
144-
if: matrix.python-version != '3.11' # diversify the python versions
145-
run: |
146-
pytest test/agentchat/contrib/test_gpt_assistant.py --skip-openai
147135
- name: Coverage
148-
if: matrix.python-version == '3.11'
149136
run: |
150137
pip install coverage>=5.3
151138
coverage run -a -m pytest test/agentchat/contrib/test_gpt_assistant.py --skip-openai
152139
coverage xml
153140
- name: Upload coverage to Codecov
154-
if: matrix.python-version == '3.11'
155141
uses: codecov/codecov-action@v3
156142
with:
157143
file: ./coverage.xml
@@ -163,7 +149,7 @@ jobs:
163149
fail-fast: false
164150
matrix:
165151
os: [ubuntu-latest, macos-latest, windows-2019]
166-
python-version: ["3.8", "3.9", "3.10", "3.11"]
152+
python-version: ["3.11"]
167153
steps:
168154
- uses: actions/checkout@v3
169155
- name: Set up Python ${{ matrix.python-version }}
@@ -183,18 +169,12 @@ jobs:
183169
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
184170
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
185171
fi
186-
- name: Test TeachableAgent
187-
if: matrix.python-version != '3.9' # diversify the python versions
188-
run: |
189-
pytest test/agentchat/contrib/test_teachable_agent.py --skip-openai
190172
- name: Coverage
191-
if: matrix.python-version == '3.9'
192173
run: |
193174
pip install coverage>=5.3
194175
coverage run -a -m pytest test/agentchat/contrib/test_teachable_agent.py --skip-openai
195176
coverage xml
196177
- name: Upload coverage to Codecov
197-
if: matrix.python-version == '3.9'
198178
uses: codecov/codecov-action@v3
199179
with:
200180
file: ./coverage.xml
@@ -206,7 +186,7 @@ jobs:
206186
fail-fast: false
207187
matrix:
208188
os: [ubuntu-latest, macos-latest, windows-2019]
209-
python-version: ["3.8", "3.9", "3.10", "3.11"]
189+
python-version: ["3.12"]
210190
steps:
211191
- uses: actions/checkout@v3
212192
- name: Set up Python ${{ matrix.python-version }}
@@ -226,18 +206,12 @@ jobs:
226206
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
227207
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
228208
fi
229-
- name: Test WebSurfer
230-
if: matrix.python-version != '3.10' # diversify the python versions
231-
run: |
232-
pytest test/test_browser_utils.py test/agentchat/contrib/test_web_surfer.py --skip-openai
233209
- name: Coverage
234-
if: matrix.python-version == '3.10'
235210
run: |
236211
pip install coverage>=5.3
237212
coverage run -a -m pytest test/test_browser_utils.py test/agentchat/contrib/test_web_surfer.py --skip-openai
238213
coverage xml
239214
- name: Upload coverage to Codecov
240-
if: matrix.python-version == '3.10'
241215
uses: codecov/codecov-action@v3
242216
with:
243217
file: ./coverage.xml
@@ -249,7 +223,7 @@ jobs:
249223
fail-fast: false
250224
matrix:
251225
os: [ubuntu-latest, macos-latest, windows-2019]
252-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
226+
python-version: ["3.12"]
253227
steps:
254228
- uses: actions/checkout@v3
255229
- name: Set up Python ${{ matrix.python-version }}
@@ -269,17 +243,12 @@ jobs:
269243
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
270244
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
271245
fi
272-
- name: Test LMM and LLaVA
273-
run: |
274-
pytest test/agentchat/contrib/test_img_utils.py test/agentchat/contrib/test_lmm.py test/agentchat/contrib/test_llava.py --skip-openai
275246
- name: Coverage
276-
if: matrix.python-version == '3.10'
277247
run: |
278248
pip install coverage>=5.3
279249
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
280250
coverage xml
281251
- name: Upload coverage to Codecov
282-
if: matrix.python-version == '3.10'
283252
uses: codecov/codecov-action@v3
284253
with:
285254
file: ./coverage.xml

autogen/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.8"
1+
__version__ = "0.2.9"

notebook/agentchat_cost_token_tracking.ipynb

-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@
356356
}
357357
],
358358
"source": [
359-
"\n",
360359
"assistant = AssistantAgent(\n",
361360
" \"assistant\",\n",
362361
" system_message=\"You are a helpful assistant.\",\n",

notebook/agentchat_function_call_currency_calculator.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
" quote_currency: Annotated[CurrencySymbol, \"Quote currency\"] = \"EUR\",\n",
168168
") -> str:\n",
169169
" quote_amount = exchange_rate(base_currency, quote_currency) * base_amount\n",
170-
" return f\"{quote_amount} {quote_currency}\"\n"
170+
" return f\"{quote_amount} {quote_currency}\""
171171
]
172172
},
173173
{

notebook/agentchat_oai_assistant_retrieval.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
" \"config_list\": config_list,\n",
102102
" \"assistant_id\": assistant_id,\n",
103103
" \"tools\": [{\"type\": \"retrieval\"}],\n",
104-
" \"file_ids\": [\"file-CmlT0YKLB3ZCdHmslF9FOv69\"]\n",
104+
" \"file_ids\": [\"file-CmlT0YKLB3ZCdHmslF9FOv69\"],\n",
105105
" # add id of an existing file in your openai account\n",
106106
" # in this case I added the implementation of conversable_agent.py\n",
107107
"}\n",

samples/apps/autogen-studio/notebooks/tutorial.ipynb

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
}
5050
],
5151
"source": [
52-
"\n",
5352
"# load an agent specification in JSON\n",
5453
"agent_spec = json.load(open(\"agent_spec.json\"))\n",
5554
"\n",

test/test_browser_utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import requests
55
import hashlib
66
import re
7+
import math
78

89
from agentchat.test_assistant_agent import KEY_LOC # noqa: E402
910

@@ -78,7 +79,7 @@ def test_simple_text_browser():
7879
assert BLOG_POST_STRING in browser.page_content
7980

8081
# Check if page splitting works
81-
approx_pages = int(len(browser.page_content) / viewport_size + 0.5) # May be fewer, since it aligns to word breaks
82+
approx_pages = math.ceil(len(browser.page_content) / viewport_size) # May be fewer, since it aligns to word breaks
8283
assert len(browser.viewport_pages) <= approx_pages
8384
assert abs(len(browser.viewport_pages) - approx_pages) <= 1 # allow only a small deviation
8485
assert browser.viewport_pages[0][0] == 0

0 commit comments

Comments
 (0)