Skip to content

feat : new test_generator using Pytest - #9

Merged
haddybhaiya merged 4 commits into
vector-store-phase2from
t-review
Mar 28, 2026
Merged

feat : new test_generator using Pytest#9
haddybhaiya merged 4 commits into
vector-store-phase2from
t-review

Conversation

@haddybhaiya

Copy link
Copy Markdown
Member

summary of changes:

Added

  • agent/llm/test_generator.py
    The current release of APRICOT writes context enabled reviews on PR, this PR adds feature to write test cases for new diff ,while being aware of the repository context, this uses Pytest covering edge cases while being concise.

Note: previous changes merged to main via #8 is now synced in this repo vector-phase-2

@github-actions

Copy link
Copy Markdown

Automated Code Review Comment:

Bugs

  • None

Improvements

  • The code can be improved by adding error handling for the client.chat.completions.create call.
  • The context_text variable can be improved by adding a check for an empty context list to avoid unnecessary string concatenation.
  • The function generate_tests can be improved by adding a docstring to describe its purpose and parameters.

Suggestions

  • Consider adding a timeout for the client.chat.completions.create call to avoid waiting indefinitely for a response.
  • The diff parameter can be validated to ensure it's a non-empty string before processing.
  • The code can be optimized by using a more efficient way to create the prompt string, such as using an f-string with multiline support.
  • Code looks good overall, but these suggestions can enhance its quality and robustness. ✅

@haddybhaiya
haddybhaiya merged commit 2caef45 into vector-store-phase2 Mar 28, 2026
1 check passed
@haddybhaiya
haddybhaiya deleted the t-review branch March 28, 2026 09:51
@haddybhaiya

Copy link
Copy Markdown
Member Author

@pleasingsunlight @deoxyforge review file changed .

@pleasingsunlight
pleasingsunlight self-requested a review March 28, 2026 10:00
@pleasingsunlight

Copy link
Copy Markdown
Collaborator

Looks Legitimate!

@pleasingsunlight pleasingsunlight left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 good to go!

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.

2 participants