ara-cli 0.1.10.1__py3-none-any.whl → 0.1.10.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ara_cli/__main__.py +120 -1
- ara_cli/artefact_autofix.py +44 -6
- ara_cli/artefact_models/artefact_model.py +18 -6
- ara_cli/artefact_models/artefact_templates.py +2 -1
- ara_cli/artefact_models/epic_artefact_model.py +11 -2
- ara_cli/artefact_models/feature_artefact_model.py +31 -1
- ara_cli/artefact_models/userstory_artefact_model.py +13 -1
- ara_cli/chat.py +0 -19
- ara_cli/file_loaders/text_file_loader.py +2 -2
- ara_cli/global_file_lister.py +5 -15
- ara_cli/prompt_extractor.py +179 -71
- ara_cli/prompt_handler.py +160 -59
- ara_cli/tag_extractor.py +26 -23
- ara_cli/template_loader.py +1 -1
- ara_cli/templates/prompt-modules/blueprints/pytest_unittest_prompt.blueprint.md +32 -0
- ara_cli/version.py +1 -1
- {ara_cli-0.1.10.1.dist-info → ara_cli-0.1.10.5.dist-info}/METADATA +1 -1
- {ara_cli-0.1.10.1.dist-info → ara_cli-0.1.10.5.dist-info}/RECORD +23 -22
- tests/test_global_file_lister.py +1 -1
- tests/test_prompt_handler.py +12 -4
- {ara_cli-0.1.10.1.dist-info → ara_cli-0.1.10.5.dist-info}/WHEEL +0 -0
- {ara_cli-0.1.10.1.dist-info → ara_cli-0.1.10.5.dist-info}/entry_points.txt +0 -0
- {ara_cli-0.1.10.1.dist-info → ara_cli-0.1.10.5.dist-info}/top_level.txt +0 -0
tests/test_prompt_handler.py
CHANGED
|
@@ -698,16 +698,24 @@ class TestArtefactAndTemplateHandling:
|
|
|
698
698
|
|
|
699
699
|
mock_collect.return_value = ("### GIVENS\ncontent", [{"type": "image_url"}])
|
|
700
700
|
|
|
701
|
-
|
|
702
|
-
|
|
701
|
+
# append_images_to_message returns a single dict, not a list of dicts.
|
|
702
|
+
returned_message_dict = {'role': 'user', 'content': ['### GIVENS\ncontent', {'type': 'image_url'}]}
|
|
703
|
+
mock_append_images.return_value = returned_message_dict
|
|
703
704
|
|
|
704
705
|
mock_send.return_value = iter([MagicMock(choices=[MagicMock(delta=MagicMock(content="llm response"))])])
|
|
705
706
|
|
|
706
707
|
prompt_handler.create_and_send_custom_prompt(self.mock_classifier, self.mock_param)
|
|
707
708
|
|
|
708
709
|
mock_collect.assert_called_once()
|
|
709
|
-
|
|
710
|
-
|
|
710
|
+
|
|
711
|
+
# Assert that append_images_to_message was called with a single dict (the bug fix)
|
|
712
|
+
mock_append_images.assert_called_once_with(
|
|
713
|
+
{'role': 'user', 'content': '### GIVENS\ncontent'},
|
|
714
|
+
[{'type': 'image_url'}]
|
|
715
|
+
)
|
|
716
|
+
|
|
717
|
+
# Assert that send_prompt was called with a list containing the dict returned from append_images_to_message
|
|
718
|
+
mock_send.assert_called_once_with([returned_message_dict])
|
|
711
719
|
|
|
712
720
|
log_file = self.root / "ara" / self.mock_classifier / f"{self.mock_param}.data" / f"{self.mock_classifier}.prompt_log.md"
|
|
713
721
|
assert "llm response" in log_file.read_text()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|