-
Notifications
You must be signed in to change notification settings - Fork 0
test: rework injection tests, enable in CI #63
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
Conversation
Add several popular open source libraries, clone and parse their javadocs in parallel. Enable new CI job and dependabot updates for uv
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 significantly reworks the injection testing system by transitioning from a simple script to a proper Python package with parallel processing capabilities. The changes add testing against several popular open source Java libraries and enable CI automation.
- Restructures injection tests as a proper Python package with improved error reporting and parallel processing
- Adds configuration for testing against 7 popular open source Java libraries (Spring Framework, Lucene, JUnit, Jackson Core, Hibernate ORM, Guava)
- Enables new CI workflow and dependabot updates for the uv package manager
Reviewed Changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
injection_tests/tester.py | Removes old simple script implementation |
injection_tests/src/injection_tester/tester.py | Implements new comprehensive testing module with parallel processing and detailed error reporting |
injection_tests/src/injection_tester/init.py | Adds package initialization and main function exposure |
injection_tests/requirements.txt | Removes old requirements file |
injection_tests/pyproject.toml | Adds proper Python package configuration with dependencies and tooling setup |
injection_tests/data/.*.repo | Adds repository clone configuration for 7 open source libraries |
injection_tests/data/.*.patterns | Adds file pattern matching configuration for each test repository |
injection_tests/data/.gitignore | Adds gitignore for checkout directories |
injection_tests/README.md | Adds comprehensive documentation for the injection testing system |
injection_tests/Makefile | Replaces old makefile with new comprehensive build system using uv |
injection_tests/.gitignore | Removes old gitignore entries |
README.md | Updates link to reference new injection tests |
.github/workflows/ci.yml | Adds new CI job for parsing corpora |
.github/dependabot.yml | Adds dependabot configuration for uv package manager |
Comments suppressed due to low confidence (2)
injection_tests/src/injection_tester/tester.py:116
- [nitpick] Using underscore assignment for unused return values is unnecessary here. The return value from add_argument() doesn't need to be assigned.
_ = parser.add_argument("root", help="filesystem path to a git repository")
injection_tests/src/injection_tester/tester.py:117
- [nitpick] Using underscore assignment for unused return values is unnecessary here. The return value from add_argument() doesn't need to be assigned.
_ = parser.add_argument("file", nargs="*", default=["*.java"], help="git patterns of files")
executor = ProcessPoolExecutor() | ||
|
||
parser = argparse.ArgumentParser(prog="injection_tester", description="tests javadoc injections") |
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.
The ProcessPoolExecutor is created without specifying max_workers and is not properly closed. Consider using a context manager or explicitly setting max_workers and ensuring proper cleanup.
executor = ProcessPoolExecutor() | |
parser = argparse.ArgumentParser(prog="injection_tester", description="tests javadoc injections") | |
with ProcessPoolExecutor(max_workers=os.cpu_count()) as executor: | |
parser = argparse.ArgumentParser(prog="injection_tester", description="tests javadoc injections") |
Copilot uses AI. Check for mistakes.
|
||
assert main is not None |
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.
This assertion serves no purpose as imported functions are never None. The assertion should be removed as it provides no value.
assert main is not None |
Copilot uses AI. Check for mistakes.
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.
the assert silences the ruff linter, which otherwise complains of an unused import.
Add several popular open source libraries, clone and parse their javadocs in parallel.
Enable new CI job and dependabot updates for uv