codemie-test-harness 0.1.184__py3-none-any.whl → 0.1.197__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.
Potentially problematic release.
This version of codemie-test-harness might be problematic. Click here for more details.
- codemie_test_harness/cli/cli.py +21 -6
- codemie_test_harness/cli/commands/run_cmd.py +15 -1
- codemie_test_harness/cli/constants.py +1 -21
- codemie_test_harness/cli/runner.py +13 -3
- codemie_test_harness/cli/utils.py +12 -2
- codemie_test_harness/tests/assistant/test_assistants.py +17 -1
- codemie_test_harness/tests/assistant/tools/datamanagement/test_assistant_with_data_management_tools.py +47 -6
- codemie_test_harness/tests/assistant/tools/mcp/test_cli_mcp_server.py +0 -4
- codemie_test_harness/tests/assistant/tools/mcp/test_mcp_servers.py +0 -4
- codemie_test_harness/tests/conftest.py +2 -2
- codemie_test_harness/tests/enums/environment.py +3 -3
- codemie_test_harness/tests/enums/integrations.py +1 -0
- codemie_test_harness/tests/enums/model_types.py +1 -0
- codemie_test_harness/tests/integrations/project/test_default_integrations.py +41 -15
- codemie_test_harness/tests/integrations/project/test_project_integrations.py +42 -0
- codemie_test_harness/tests/integrations/user/test_default_integrations.py +0 -7
- codemie_test_harness/tests/llm/assistants/test_llm.py +56 -2
- codemie_test_harness/tests/test_data/assistant_test_data.py +448 -448
- codemie_test_harness/tests/test_data/codebase_tools_test_data.py +2 -0
- codemie_test_harness/tests/test_data/data_management_tools_test_data.py +18 -0
- codemie_test_harness/tests/test_data/direct_tools/data_management_tools_test_data.py +18 -1
- codemie_test_harness/tests/test_data/direct_tools/report_portal_tools_test_data.py +189 -197
- codemie_test_harness/tests/test_data/integrations_test_data.py +163 -2
- codemie_test_harness/tests/test_data/llm_test_data.py +1 -0
- codemie_test_harness/tests/test_data/open_api_tools_test_data.py +22 -1
- codemie_test_harness/tests/test_data/report_portal_tools_test_data.py +89 -112
- codemie_test_harness/tests/test_data/research_tools_test_data.py +29 -7
- codemie_test_harness/tests/utils/assistant_utils.py +22 -12
- codemie_test_harness/tests/utils/credentials_manager.py +66 -8
- codemie_test_harness/tests/utils/workflow_utils.py +91 -0
- codemie_test_harness/tests/workflow/assistant_tools/access_management/test_workflow_with_assistant_with_keycloak_tool.py +7 -0
- codemie_test_harness/tests/workflow/assistant_tools/ado/test_workflow_with_assistant_with_ado_test_plan_tools.py +50 -1
- codemie_test_harness/tests/workflow/assistant_tools/ado/test_workflow_with_assistant_with_ado_wiki_tools.py +39 -1
- codemie_test_harness/tests/workflow/assistant_tools/ado/test_workflow_with_assistant_with_ado_work_item_tools.py +34 -1
- codemie_test_harness/tests/workflow/assistant_tools/cloud/test_workflow_with_assistant_cloud_tools.py +6 -0
- codemie_test_harness/tests/workflow/assistant_tools/codebase/test_worfklow_with_assistant_codebase_tools.py +11 -0
- codemie_test_harness/tests/workflow/assistant_tools/data_management/test_workflow_with_assistant_with_data_management_tools.py +72 -1
- codemie_test_harness/tests/workflow/assistant_tools/default_integrations/test_default_integrations_for_tool.py +31 -0
- codemie_test_harness/tests/workflow/assistant_tools/default_integrations/test_default_integrations_for_tool_kit.py +31 -0
- codemie_test_harness/tests/workflow/assistant_tools/default_integrations/test_default_integrations_for_tool_with_datasource.py +26 -0
- codemie_test_harness/tests/workflow/assistant_tools/file_management/test_workflow_with_assistant_with_file_management_tools.py +63 -1
- codemie_test_harness/tests/workflow/assistant_tools/git/test_workflow_with_assistant_git_tools.py +82 -7
- codemie_test_harness/tests/workflow/assistant_tools/mcp/test_workflow_with_assistant_with_mcp_server.py +23 -4
- codemie_test_harness/tests/workflow/assistant_tools/notification/test_workflow_with_assistant_notification_tools.py +12 -0
- codemie_test_harness/tests/workflow/assistant_tools/open_api/test_workflow_with_assistant_with_open_api_tools.py +6 -0
- codemie_test_harness/tests/workflow/assistant_tools/plugin/test_workflow_with_assistant_with_development_plugin.py +29 -2
- codemie_test_harness/tests/workflow/assistant_tools/plugin/test_workflow_with_assistant_with_plugin_and_mcp_servers.py +14 -1
- codemie_test_harness/tests/workflow/assistant_tools/project_management/test_workflow_with_assistant_pm_tools.py +7 -0
- codemie_test_harness/tests/workflow/assistant_tools/report_portal/test_workflow_with_assistant_with_report_portal_tools.py +7 -0
- codemie_test_harness/tests/workflow/assistant_tools/research/test_workflow_with_assistant_research_tools.py +14 -1
- codemie_test_harness/tests/workflow/assistant_tools/servicenow/test_workflow_with_servicenow_tools.py +6 -0
- codemie_test_harness/tests/workflow/assistant_tools/vcs/workflow_with_assistant_vcs_tools.py +6 -0
- codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_cloud_tools.py +12 -9
- codemie_test_harness/tests/workflow/virtual_assistant_tools/access_management/test_workflow_with_keycloak_tool.py +8 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/ado/test_workflow_with_ado_test_plan_tools.py +28 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/ado/test_workflow_with_ado_wiki_tools.py +24 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/ado/test_workflow_with_ado_work_item_tools.py +20 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/cloud/test_workflow_with_cloud_tools.py +13 -4
- codemie_test_harness/tests/workflow/virtual_assistant_tools/codebase/test_workflow_with_codebase_tools.py +16 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/data_management/test_workflow_with_data_management_tools.py +73 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/default_integrations/test_default_integrations_for_tool.py +34 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/default_integrations/test_default_integrations_for_tool_kit.py +34 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/default_integrations/test_default_integrations_for_tool_with_datasource.py +34 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/file_management/test_workflow_with_file_management_tools.py +101 -49
- codemie_test_harness/tests/workflow/virtual_assistant_tools/git/test_workflow_with_git_tools.py +42 -3
- codemie_test_harness/tests/workflow/virtual_assistant_tools/mcp/test_workflow_with_mcp_server.py +27 -5
- codemie_test_harness/tests/workflow/virtual_assistant_tools/notification/test_workflow_with_notification_tools.py +13 -0
- codemie_test_harness/tests/workflow/virtual_assistant_tools/open_api/test_workflow_with_open_api_tools.py +10 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/plugin/test_workflow_with_development_plugin.py +20 -0
- codemie_test_harness/tests/workflow/virtual_assistant_tools/plugin/test_workflow_with_plugin_and_mcp_servers.py +14 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/project_management/test_workflow_with_project_management_tools.py +10 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/report_portal/test_workflow_with_report_portal_tool.py +10 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/research/test_workflow_with_research_tools.py +9 -0
- codemie_test_harness/tests/workflow/virtual_assistant_tools/servicenow/test_workflow_with_servicenow_tools.py +10 -1
- codemie_test_harness/tests/workflow/virtual_assistant_tools/vcs/test_workflow_with_vcs_tools.py +9 -1
- {codemie_test_harness-0.1.184.dist-info → codemie_test_harness-0.1.197.dist-info}/METADATA +38 -3
- {codemie_test_harness-0.1.184.dist-info → codemie_test_harness-0.1.197.dist-info}/RECORD +79 -79
- {codemie_test_harness-0.1.184.dist-info → codemie_test_harness-0.1.197.dist-info}/WHEEL +0 -0
- {codemie_test_harness-0.1.184.dist-info → codemie_test_harness-0.1.197.dist-info}/entry_points.txt +0 -0
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import pytest
|
|
2
|
+
from codemie_sdk.models.assistant import ToolKitDetails, ToolDetails
|
|
2
3
|
from hamcrest import assert_that, has_item
|
|
3
4
|
from codemie_test_harness.tests.enums.model_types import ModelTypes
|
|
5
|
+
from codemie_test_harness.tests.enums.tools import Toolkit, FileManagementTool
|
|
6
|
+
from codemie_test_harness.tests.test_data.file_test_data import file_test_data
|
|
4
7
|
from codemie_test_harness.tests.test_data.llm_test_data import MODEL_RESPONSES
|
|
8
|
+
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
5
9
|
from codemie_test_harness.tests.utils.client_factory import get_client
|
|
10
|
+
from codemie_test_harness.tests.utils.constants import FILES_PATH
|
|
6
11
|
from codemie_test_harness.tests.utils.env_resolver import get_environment
|
|
7
12
|
from codemie_test_harness.tests.utils.pytest_utils import check_mark
|
|
8
13
|
|
|
@@ -36,14 +41,25 @@ def pytest_generate_tests(metafunc):
|
|
|
36
41
|
@pytest.mark.api
|
|
37
42
|
@pytest.mark.smoke
|
|
38
43
|
def test_assistant_with_different_models(
|
|
39
|
-
llm_utils, assistant_utils, model_type, similarity_check
|
|
44
|
+
llm_utils, assistant_utils, model_type, similarity_check, filesystem_integration
|
|
40
45
|
):
|
|
41
46
|
assert_that(
|
|
42
47
|
[row.base_name for row in llm_utils.list_llm_models()],
|
|
43
48
|
has_item(model_type),
|
|
44
49
|
f"{model_type} is missing in backend response",
|
|
45
50
|
)
|
|
46
|
-
|
|
51
|
+
|
|
52
|
+
tool = ToolKitDetails(
|
|
53
|
+
toolkit=Toolkit.FILE_MANAGEMENT,
|
|
54
|
+
tools=[
|
|
55
|
+
ToolDetails(
|
|
56
|
+
name=FileManagementTool.GENERATE_IMAGE, settings=filesystem_integration
|
|
57
|
+
)
|
|
58
|
+
],
|
|
59
|
+
settings=filesystem_integration,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
assistant = assistant_utils.create_assistant(model_type, toolkits=[tool])
|
|
47
63
|
response = assistant_utils.ask_assistant(assistant, "Just say one word: 'Hello'")
|
|
48
64
|
|
|
49
65
|
if model_type in [ModelTypes.DEEPSEEK_R1, ModelTypes.RLAB_QWQ_32B]:
|
|
@@ -91,3 +107,41 @@ def test_assistant_with_different_models_with_temperature_parameter(
|
|
|
91
107
|
if model_type in [ModelTypes.DEEPSEEK_R1, ModelTypes.RLAB_QWQ_32B]:
|
|
92
108
|
response = "\n".join(response.split("\n")[-3:])
|
|
93
109
|
similarity_check.check_similarity(response, "Hello")
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@pytest.mark.assistant
|
|
113
|
+
@pytest.mark.llm
|
|
114
|
+
@pytest.mark.api
|
|
115
|
+
@pytest.mark.smoke
|
|
116
|
+
def test_assistant_with_different_models_with_datasource_attached(
|
|
117
|
+
llm_utils,
|
|
118
|
+
assistant_utils,
|
|
119
|
+
model_type,
|
|
120
|
+
similarity_check,
|
|
121
|
+
datasource_utils,
|
|
122
|
+
default_embedding_llm,
|
|
123
|
+
kb_context,
|
|
124
|
+
):
|
|
125
|
+
assert_that(
|
|
126
|
+
[row.base_name for row in llm_utils.list_llm_models()],
|
|
127
|
+
has_item(model_type),
|
|
128
|
+
f"{model_type} is missing in backend response",
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
file_name = file_test_data[2][0]
|
|
132
|
+
|
|
133
|
+
datasource = datasource_utils.create_file_datasource(
|
|
134
|
+
name=get_random_name(),
|
|
135
|
+
description=f"[Autotest] {file_name} with {default_embedding_llm.base_name} embedding model",
|
|
136
|
+
files=[str(FILES_PATH / file_name)],
|
|
137
|
+
embeddings_model=default_embedding_llm.base_name,
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
assistant = assistant_utils.create_assistant(
|
|
141
|
+
model_type, context=[kb_context(datasource)]
|
|
142
|
+
)
|
|
143
|
+
response = assistant_utils.ask_assistant(assistant, "Just say one word: 'Hello'")
|
|
144
|
+
|
|
145
|
+
if model_type in [ModelTypes.DEEPSEEK_R1, ModelTypes.RLAB_QWQ_32B]:
|
|
146
|
+
response = "\n".join(response.split("\n")[-3:])
|
|
147
|
+
similarity_check.check_similarity(response, "Hello")
|