Feat : Intent inference and integration - #17
Conversation
Co-authored-by: deoxyforge dipudeeva@gmail.com
Co-authored-by: deoxygfx dipudeeva@gmail.com
Co-authored-by: Dipesh Kumar dipudeeva@gmail.com
|
Automated Code Review Comment: Bugs
Improvements
Suggestions
Suggested Testsdef test_infer_intent_empty_diff(): def test_infer_intent_short_diff(): def test_infer_intent_long_diff(): def test_generate_tests_no_context_no_intent(): def test_generate_tests_with_context_and_intent(): |
|
@copilot check bugs given by github-actions |
haddybhaiya
left a comment
There was a problem hiding this comment.
will check with the bugs in final merge !!Hopefully!
|
@haddybhaiya Bhaiyyaji meri pr kyu merge krdi |
This pull request introduces a new intent inference capability for code diffs and integrates it into the test generation workflow. It also refines the prompts used for both intent extraction and test generation, and adds comprehensive tests for the new functionality.
Intent inference and integration:
infer_intentfunction togroq_client.pythat analyzes a code diff and extracts its purpose, key properties, and edge cases, outputting a structured JSON object.INTENT_PROMPTinprompts.pyto guide the LLM in extracting intent information from code diffs.generate_testsintest_generator.pyto accept and incorporate intent information (purpose, properties, edge cases) into the test case generation prompt, improving the relevance and coverage of generated tests.Prompt and output improvements:
Testing enhancements:
test_generated.pyfor bothinfer_intentandgenerate_tests, covering empty, short, and long diffs, as well as scenarios with and without context/intent.