Skip to content
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

feat(ci): Add unit tests to CI and improve PR generation #23

Merged
merged 4 commits into from
Mar 14, 2024

Conversation

alissonperez
Copy link
Owner

@alissonperez alissonperez commented Mar 14, 2024

What was done?

This PR includes several changes:

  1. Added unit tests to the CI pipeline.
  2. Fixed an issue with the PR generation where the llm json output parsing was not working correctly.
  3. Improved the system prompt with a better description.

How was it done?

  1. The unit tests were added to the CI pipeline by modifying the Github workflow files. The 'lint.yaml' file was deleted and a new 'pull_request.yaml' file was created to include both linting and testing jobs.
  2. The issue with the PR generation was fixed by adding a hack to handle cases when llm returns an invalid json.
  3. The system prompt was improved by modifying the 'get_pr_data' function in 'prdata.py' to provide a more detailed description of the assistant's role.

How was it tested?

  1. The changes to the CI pipeline were tested by running the Github actions on the latest commit.
  2. The fix to the PR generation was tested by running the 'get_pr_data' function with different inputs and verifying the output.
  3. The improvement to the system prompt was tested by running the 'get_pr_data' function and verifying that the new prompt is displayed correctly.
  4. A new unit test was added to 'test_prdata.py' to test the '_parse_json' function.

@alissonperez alissonperez merged commit 71bf52c into main Mar 14, 2024
2 checks passed
@alissonperez alissonperez deleted the fix/invalid-json-outputs branch March 14, 2024 03:00
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