Test discovery in GHA optimization by pre-filtering test files#303
Conversation
PR Reviewer Guide 🔍(Review updated until commit fd06dca)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to fd06dca
Previous suggestionsSuggestions up to commit 236f14c
|
b2ab78c to
87f7528
Compare
pre-commit cleanup guard path fix tests & remove goto cache remove TestsCache usage moved the num_discovered_tests calculation inside the discover_unit_tests dict directly by using a set in discover_unit_tests efficient passes
87f7528 to
918dd68
Compare
|
Persistent review updated to latest commit fd06dca |
| if node.module: | ||
| qualified_name = f"{node.module}.{alias.name}" | ||
| if qualified_name in self.function_names_to_find: | ||
| self.found_target_functions.add(qualified_name) |
There was a problem hiding this comment.
when the first time function found in a file, then we skip processing the rest of the file. return True
| project_root_path = cfg.project_root_path | ||
| test_framework = cfg.test_framework | ||
|
|
||
| if functions_to_optimize: |
There was a problem hiding this comment.
shouldn't this always be True?
There was a problem hiding this comment.
@misrasaurabh1 checked it out, in our previous implementation, discover_unit_tests was being called without the list of functions to optimize, so it was a backwards compatible change, going to update it to reflect the new behavior entirely.
PR Type
Enhancement, Tests
Description
Introduce AST ImportAnalyzer for test file import analysis
Filter test files via imports before Jedi processing
Refactor discovery to use filtering and return test count
Update code and expand tests for import-filter functionality
Changes walkthrough 📝
6 files
Introduce AST import analysis and test filteringUpdate discover_unit_tests signature usageAccept set of tests in FunctionOptimizerAdapt optimizer to new test discovery signatureSupport set-based test structures in PR creationUpdate concolic tests discovery signature1 files
Fix test import formatting1 files
Add import-filtering unit tests and signature updates