Skip to content

Conversation

rmuir
Copy link
Owner

@rmuir rmuir commented Jul 13, 2025

Add several popular open source libraries, clone and parse their javadocs in parallel.

Enable new CI job and dependabot updates for uv

Add several popular open source libraries, clone and parse their
javadocs in parallel.

Enable new CI job and dependabot updates for uv
@rmuir rmuir requested a review from Copilot July 13, 2025 05:24
Copy link

@Copilot Copilot AI left a 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")

Comment on lines +113 to +115
executor = ProcessPoolExecutor()

parser = argparse.ArgumentParser(prog="injection_tester", description="tests javadoc injections")
Copy link
Preview

Copilot AI Jul 13, 2025

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.

Suggested change
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.

Comment on lines +4 to +5

assert main is not None
Copy link
Preview

Copilot AI Jul 13, 2025

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.

Suggested change
assert main is not None

Copilot uses AI. Check for mistakes.

Copy link
Owner Author

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.

@rmuir rmuir merged commit 3877dfc into main Jul 13, 2025
23 checks passed
@rmuir rmuir deleted the injection_tests branch July 13, 2025 06:09
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.

1 participant