-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Howie/sample recording 6 #44533
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
base: main
Are you sure you want to change the base?
Howie/sample recording 6 #44533
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the sample test infrastructure for the Azure AI Projects Python SDK in preparation for moving test executor classes to dev tools. The changes separate concerns between helper functions, executor classes, and documentation.
Key changes:
- Extracted test executor classes (
SyncSampleExecutor,AsyncSampleExecutor) intosample_executor.py - Created
test_samples_helpers.pyfor helper functions not destined for dev tools - Separated LLM validation into dedicated methods (
validate_print_calls_by_llm,validate_print_calls_by_llm_async) - Added
AdditionalTestsWithEnvironmentVariablesdecorator for recording samples with optional environment variables - Added comprehensive README documentation with usage examples
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/ai/azure-ai-projects/tests/samples/test_samples_helpers.py | New file containing shared helper functions including LLM validation instructions and environment variable mapping |
| sdk/ai/azure-ai-projects/tests/samples/sample_executor.py | New file with executor classes and helper functions, including the new decorator for optional environment variables |
| sdk/ai/azure-ai-projects/tests/samples/sample_executor_helpers.py | Deleted file - content moved to sample_executor.py and test_samples_helpers.py |
| sdk/ai/azure-ai-projects/tests/samples/test_samples.py | Updated imports and separated LLM validation into a separate method call |
| sdk/ai/azure-ai-projects/tests/samples/test_samples_async.py | Updated imports, separated LLM validation, and added decorator usage for optional env vars |
| sdk/ai/azure-ai-projects/tests/samples/README.md | New comprehensive documentation for using the sample testing infrastructure |
224a33c to
b0117d5
Compare
Refractor code for Python SDK team to move sample test feature to dev tools:
New stuff: