-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Streamline Testing with pytest-cov
and pytest
Defaults
#2490
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@sonichi we're almost there! |
@WaelKarkoub Thanks. There is some notebook test failure which I will fix. |
sonichi
approved these changes
Apr 29, 2024
jayralencar
pushed a commit
to jayralencar/autogen
that referenced
this pull request
May 28, 2024
…#2490) * done * update docs * try fix * update workflows * undo minor fix * resolve comments * adds back pytest-asyncio * minor fix * add branch coverage * restore pip install e. * test with coverage * fix mypy * fix coverage + docker + windows combo * fix bash command * formatter * formatter * one last fix * I lied, last fix * fix * fix retrieve chat test * fix windows paths * change cache seed * down grade openai version * fix openai mypy * better error type * fix image gen cache test * fix * experimenting * fix lmm * skip cosmos test * remove cosmos db * unused imports * handle more cosmosdb skips * fix flaky test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
This PR aims to simplify the testing process and reduce redundancy in the GitHub workflows.
This PR does the following:
pytest-cov
: Instead of relying on the coverage package, this PR addspytest-cov
plugin.pytest-cov
works well withpytest-xdist
, allowing us to run tests concurrently if the CI environment supports it.pytest
command directly, replacing the previouscoverage -a -m
invocation. This unifies the testing process and simplifies the workflows.Update 1:
Copy pasting from discord:
There's seems to be a silent failure in master:
The environment variable
AUTOGEN_USE_DOCKER
was not being used properly in these tests, so I added some fixes:test_commandline_code_executor.py
,test/test_code_utils.py
Update 2:
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpcq4z30pm\\42\\cache.db'
, for windows-2019 and python 3.12 for image gen cache test. I added a skip for that condition till I figure out the env.Update 3:
openai>=1.3
openai_utils
.Related issue number
Checks