Skip to content

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

Merged
ekzhu merged 16 commits into
microsoft:mainfrom
maxim-saplin:main
Dec 30, 2023
Merged

[Core] Extending inline docs for openai_utils.py, boosting coverage in test_utils.py, fixing #762#1046
ekzhu merged 16 commits into
microsoft:mainfrom
maxim-saplin:main

Conversation

@maxim-saplin

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

Copy link
Copy Markdown
Contributor

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

codecov-commenter commented Dec 22, 2023

Copy link
Copy Markdown

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.

@maxim-saplin

Copy link
Copy Markdown
Contributor Author

@ekzhu - I've fixed Codecov warnings, should be good

@maxim-saplin maxim-saplin requested a review from ekzhu December 28, 2023 18:54
Comment thread autogen/oai/openai_utils.py

@ekzhu ekzhu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok

Comment thread test/oai/test_utils.py
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