Skip to content
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

[Core] Extending inline docs for openai_utils.py, boosting coverage in test_utils.py, fixing #762 #1046

Merged
merged 16 commits into from
Dec 30, 2023

Conversation

maxim-saplin
Copy link
Collaborator

@maxim-saplin maxim-saplin commented Dec 22, 2023

Why are these changes needed?

  • Improved docstrings for all config_list creation functions declared in openai_utils.py
  • test_utils.py has more cases tested ramping up coverage
  • test_utils.py no longer depends on files that are part of .gitignore (and hence not downloaded when cloning), utilises temp files and fake data
  • openai_utils.get_config_list() has an assertion verifying that number of items in files is equal (replacing the current behaviour with out of index being thrown)

Related issue number

Closes #762

Checks

@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9388bae) 30.14% compared to head (857e955) 40.96%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1046       +/-   ##
===========================================
+ Coverage   30.14%   40.96%   +10.81%     
===========================================
  Files          30       30               
  Lines        4020     4028        +8     
  Branches      908      960       +52     
===========================================
+ Hits         1212     1650      +438     
+ Misses       2729     2252      -477     
- Partials       79      126       +47     
Flag Coverage Δ
unittests 40.91% <100.00%> (+10.81%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ekzhu ekzhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

test/oai/test_utils.py Show resolved Hide resolved
@ekzhu ekzhu added this pull request to the merge queue Dec 30, 2023
Merged via the queue into microsoft:main with commit 16b1723 Dec 30, 2023
76 of 84 checks passed
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
… in `test_utils.py`, fixing microsoft#762 (microsoft#1046)

* fix for microsoft#762 ,get_config_list/oia assetion, docs, test

* Improved docstrings

* test_utils using fake data and temp files

* "Black" formatting applied

* Fix build (KEY_LOC and OAI_CONFIG_LIST as consts in test_client)

* Ramping up openai_utils coverage

* Missing parameter doc.

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support custom openai base url in config_list_openai_aoai
4 participants