codemie-test-harness 0.1.136__py3-none-any.whl → 0.1.138__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/tests/__init__.py +1 -0
- codemie_test_harness/tests/assistant/test_assistants.py +2 -0
- codemie_test_harness/tests/conftest.py +17 -0
- codemie_test_harness/tests/service/test_assistant_service.py +349 -379
- codemie_test_harness/tests/service/test_datasource_service.py +276 -292
- codemie_test_harness/tests/service/test_integration_service.py +133 -122
- codemie_test_harness/tests/service/test_llm_service.py +16 -17
- codemie_test_harness/tests/service/test_task_service.py +108 -120
- codemie_test_harness/tests/service/test_user_service.py +36 -19
- codemie_test_harness/tests/service/test_workflow_execution_service.py +142 -169
- codemie_test_harness/tests/service/test_workflow_service.py +145 -144
- codemie_test_harness/tests/test_data/cloud_tools_test_data.py +5 -1
- codemie_test_harness/tests/test_data/direct_tools/cloud_tools_test_data.py +5 -1
- codemie_test_harness/tests/test_data/direct_tools/codebase_tools_test_data.py +28 -159
- codemie_test_harness/tests/test_data/integrations_test_data.py +10 -2
- codemie_test_harness/tests/test_data/llm_test_data.py +0 -1
- codemie_test_harness/tests/test_data/vcs_tools_test_data.py +4 -1
- codemie_test_harness/tests/utils/assistant_utils.py +39 -4
- codemie_test_harness/tests/utils/aws_parameters_store.py +1 -1
- codemie_test_harness/tests/utils/llm_utils.py +9 -0
- codemie_test_harness/tests/utils/search_utils.py +11 -5
- codemie_test_harness/tests/utils/user_utils.py +9 -0
- codemie_test_harness/tests/utils/workflow_utils.py +34 -6
- codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_cloud_tools.py +3 -3
- codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_research_tools.py +3 -3
- {codemie_test_harness-0.1.136.dist-info → codemie_test_harness-0.1.138.dist-info}/METADATA +2 -2
- {codemie_test_harness-0.1.136.dist-info → codemie_test_harness-0.1.138.dist-info}/RECORD +29 -27
- {codemie_test_harness-0.1.136.dist-info → codemie_test_harness-0.1.138.dist-info}/WHEEL +0 -0
- {codemie_test_harness-0.1.136.dist-info → codemie_test_harness-0.1.138.dist-info}/entry_points.txt +0 -0
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
"""Integration tests for WorkflowService."""
|
|
2
|
-
|
|
3
1
|
from time import sleep
|
|
4
|
-
|
|
5
2
|
import pytest
|
|
6
3
|
from pydantic import ValidationError
|
|
4
|
+
from hamcrest import (
|
|
5
|
+
assert_that,
|
|
6
|
+
is_not,
|
|
7
|
+
equal_to,
|
|
8
|
+
greater_than,
|
|
9
|
+
has_length,
|
|
10
|
+
is_,
|
|
11
|
+
contains_string,
|
|
12
|
+
any_of,
|
|
13
|
+
less_than_or_equal_to,
|
|
14
|
+
)
|
|
7
15
|
|
|
8
|
-
from codemie_sdk import CodeMieClient
|
|
9
16
|
from codemie_sdk.models.workflow import (
|
|
10
17
|
WorkflowCreateRequest,
|
|
11
18
|
WorkflowUpdateRequest,
|
|
@@ -56,95 +63,85 @@ states:
|
|
|
56
63
|
"""
|
|
57
64
|
|
|
58
65
|
|
|
59
|
-
def
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
description="Workflow that analyzes and generates content about colors",
|
|
69
|
-
project=project,
|
|
70
|
-
yaml_config=valid_workflow_yaml,
|
|
71
|
-
mode=WorkflowMode.SEQUENTIAL,
|
|
72
|
-
shared=False,
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
# Create workflow
|
|
76
|
-
created = client.workflows.create_workflow(create_request)
|
|
77
|
-
assert created is not None
|
|
78
|
-
|
|
79
|
-
sleep(5)
|
|
80
|
-
workflows = client.workflows.list(projects=project, per_page=10)
|
|
81
|
-
assert len(workflows) > 0
|
|
82
|
-
workflow = next((wf for wf in workflows if wf.name == workflow_name), None)
|
|
83
|
-
assert workflow.id is not None
|
|
84
|
-
workflow_id = workflow.id
|
|
85
|
-
assert (
|
|
86
|
-
workflow.description
|
|
87
|
-
== "Workflow that analyzes and generates content about colors"
|
|
88
|
-
)
|
|
89
|
-
assert workflow.project == project
|
|
90
|
-
assert workflow.mode == WorkflowMode.SEQUENTIAL
|
|
91
|
-
assert workflow.shared is False
|
|
92
|
-
assert workflow.created_by is not None
|
|
93
|
-
|
|
94
|
-
# Step 2: Update the workflow with modified yaml
|
|
95
|
-
updated_yaml = valid_workflow_yaml.replace(
|
|
96
|
-
"Generate a list 5 colors", "Generate a list of 10 vibrant colors"
|
|
97
|
-
)
|
|
98
|
-
updated_name = f"{workflow_name} Updated"
|
|
99
|
-
update_request = WorkflowUpdateRequest(
|
|
100
|
-
name=updated_name,
|
|
101
|
-
project=project,
|
|
102
|
-
description="Updated color analysis workflow",
|
|
103
|
-
yaml_config=updated_yaml,
|
|
104
|
-
)
|
|
66
|
+
def test_full_workflow_lifecycle(
|
|
67
|
+
workflow_utils, search_utils, valid_workflow_yaml: str
|
|
68
|
+
):
|
|
69
|
+
created = workflow_utils.create_workflow(
|
|
70
|
+
workflow_yaml=valid_workflow_yaml,
|
|
71
|
+
workflow_type=WorkflowMode.SEQUENTIAL,
|
|
72
|
+
description="Workflow that analyzes and generates content about colors",
|
|
73
|
+
project_name=PROJECT,
|
|
74
|
+
)
|
|
105
75
|
|
|
106
|
-
|
|
107
|
-
|
|
76
|
+
assert_that(created, is_not(None))
|
|
77
|
+
|
|
78
|
+
sleep(5)
|
|
79
|
+
workflows = search_utils.list_workflows(projects=PROJECT, per_page=10)
|
|
80
|
+
assert_that(workflows, has_length(greater_than(0)))
|
|
81
|
+
workflow = next((wf for wf in workflows if wf.name == created.name), None)
|
|
82
|
+
assert_that(workflow.id, is_not(None))
|
|
83
|
+
workflow_id = workflow.id
|
|
84
|
+
assert_that(
|
|
85
|
+
workflow.description,
|
|
86
|
+
equal_to("Workflow that analyzes and generates content about colors"),
|
|
87
|
+
)
|
|
88
|
+
assert_that(workflow.project, equal_to(PROJECT))
|
|
89
|
+
assert_that(workflow.mode, equal_to(WorkflowMode.SEQUENTIAL))
|
|
90
|
+
assert_that(workflow.shared, is_(False))
|
|
91
|
+
assert_that(workflow.created_by, is_not(None))
|
|
92
|
+
|
|
93
|
+
# Step 2: Update the workflow with modified yaml
|
|
94
|
+
updated_yaml = valid_workflow_yaml.replace(
|
|
95
|
+
"Generate a list 5 colors", "Generate a list of 10 vibrant colors"
|
|
96
|
+
)
|
|
97
|
+
updated_name = f"{created.name} Updated"
|
|
98
|
+
updated = workflow_utils.update_workflow(
|
|
99
|
+
workflow=workflow,
|
|
100
|
+
name=updated_name,
|
|
101
|
+
project=PROJECT,
|
|
102
|
+
description="Updated color analysis workflow",
|
|
103
|
+
yaml_config=updated_yaml,
|
|
104
|
+
)
|
|
108
105
|
|
|
109
|
-
|
|
110
|
-
updated_workflow = client.workflows.get(workflow_id)
|
|
111
|
-
assert updated_workflow.name == updated_name
|
|
112
|
-
assert updated_workflow.description == "Updated color analysis workflow"
|
|
113
|
-
assert "Generate a list of 10 vibrant colors" in updated_workflow.yaml_config
|
|
106
|
+
assert_that(updated, is_not(None))
|
|
114
107
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
108
|
+
sleep(5)
|
|
109
|
+
updated_workflow = workflow_utils.get_workflow(workflow_id)
|
|
110
|
+
assert_that(updated_workflow.name, equal_to(updated_name))
|
|
111
|
+
assert_that(
|
|
112
|
+
updated_workflow.description, equal_to("Updated color analysis workflow")
|
|
113
|
+
)
|
|
114
|
+
assert_that(
|
|
115
|
+
updated_workflow.yaml_config,
|
|
116
|
+
contains_string("Generate a list of 10 vibrant colors"),
|
|
117
|
+
)
|
|
125
118
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
119
|
+
# Step 3: Verify partial update (only name)
|
|
120
|
+
updated_name = f"{created.name} Partially Updated"
|
|
121
|
+
partially_updated = workflow_utils.update_workflow(
|
|
122
|
+
workflow=workflow,
|
|
123
|
+
name=updated_name,
|
|
124
|
+
project=PROJECT,
|
|
125
|
+
description="Updated color analysis workflow",
|
|
126
|
+
yaml_config=updated_yaml,
|
|
127
|
+
)
|
|
134
128
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
129
|
+
sleep(5)
|
|
130
|
+
partially_updated = workflow_utils.get_workflow(workflow_id)
|
|
131
|
+
assert_that(partially_updated.id, equal_to(workflow_id))
|
|
132
|
+
assert_that(partially_updated.name, equal_to(updated_name))
|
|
133
|
+
# Other fields should remain unchanged
|
|
134
|
+
assert_that(
|
|
135
|
+
partially_updated.description, equal_to("Updated color analysis workflow")
|
|
136
|
+
)
|
|
137
|
+
assert_that(partially_updated.mode, equal_to(WorkflowMode.SEQUENTIAL))
|
|
138
|
+
assert_that(
|
|
139
|
+
partially_updated.yaml_config,
|
|
140
|
+
contains_string("Generate a list of 10 vibrant colors"),
|
|
141
|
+
)
|
|
145
142
|
|
|
146
143
|
|
|
147
|
-
def test_create_workflow_invalid_yaml(
|
|
144
|
+
def test_create_workflow_invalid_yaml(workflow_utils, default_llm):
|
|
148
145
|
"""Test workflow creation with invalid YAML config."""
|
|
149
146
|
invalid_yaml = f"""
|
|
150
147
|
assistants:
|
|
@@ -155,102 +152,106 @@ states:
|
|
|
155
152
|
- missing required fields
|
|
156
153
|
"""
|
|
157
154
|
|
|
158
|
-
create_request = WorkflowCreateRequest(
|
|
159
|
-
name=get_random_name(),
|
|
160
|
-
description="Test workflow with invalid YAML",
|
|
161
|
-
project=PROJECT,
|
|
162
|
-
yaml_config=invalid_yaml,
|
|
163
|
-
)
|
|
164
|
-
|
|
165
155
|
with pytest.raises(Exception) as exc_info:
|
|
166
|
-
|
|
167
|
-
|
|
156
|
+
workflow_utils.create_workflow(
|
|
157
|
+
workflow_yaml=invalid_yaml,
|
|
158
|
+
workflow_type=WorkflowMode.SEQUENTIAL,
|
|
159
|
+
description="Test workflow with invalid YAML",
|
|
160
|
+
project_name=PROJECT,
|
|
161
|
+
)
|
|
162
|
+
assert_that(
|
|
163
|
+
str(exc_info.value).lower(),
|
|
164
|
+
any_of(contains_string("400"), contains_string("invalid")),
|
|
165
|
+
)
|
|
168
166
|
|
|
169
167
|
|
|
170
|
-
|
|
171
|
-
def test_update_workflow_not_found(client: CodeMieClient, valid_workflow_yaml: str):
|
|
168
|
+
def test_update_workflow_not_found(workflow_utils, valid_workflow_yaml: str):
|
|
172
169
|
"""Test updating non-existent workflow."""
|
|
173
|
-
update_request = WorkflowUpdateRequest(
|
|
174
|
-
name=get_random_name(),
|
|
175
|
-
description="Updated description",
|
|
176
|
-
yaml_config=valid_workflow_yaml,
|
|
177
|
-
project=PROJECT,
|
|
178
|
-
)
|
|
179
|
-
|
|
180
170
|
with pytest.raises(Exception) as exc_info:
|
|
181
|
-
|
|
182
|
-
|
|
171
|
+
request = WorkflowUpdateRequest(
|
|
172
|
+
name=get_random_name(),
|
|
173
|
+
description="description for non-existent workflow",
|
|
174
|
+
yaml_config=valid_workflow_yaml,
|
|
175
|
+
project=PROJECT,
|
|
176
|
+
)
|
|
177
|
+
workflow_utils.send_update_workflow_request(
|
|
178
|
+
workflow_id="non-existent-id", request=request
|
|
179
|
+
)
|
|
180
|
+
assert_that(
|
|
181
|
+
str(exc_info.value).lower(),
|
|
182
|
+
any_of(contains_string("400"), contains_string("not found")),
|
|
183
|
+
)
|
|
183
184
|
|
|
184
185
|
|
|
185
|
-
def
|
|
186
|
-
|
|
187
|
-
# Test with missing required fields
|
|
186
|
+
def test_create_workflow_with_invalid_data(valid_workflow_yaml: str):
|
|
187
|
+
# Test with missing project field
|
|
188
188
|
with pytest.raises(Exception):
|
|
189
189
|
WorkflowCreateRequest(
|
|
190
|
-
name=get_random_name(),
|
|
190
|
+
name=get_random_name(),
|
|
191
191
|
description="Test workflow description",
|
|
192
192
|
yaml_config=valid_workflow_yaml,
|
|
193
193
|
)
|
|
194
194
|
|
|
195
|
-
# Test with invalid mode
|
|
195
|
+
# Test with invalid workflow mode
|
|
196
196
|
with pytest.raises(Exception):
|
|
197
197
|
WorkflowCreateRequest(
|
|
198
198
|
name=get_random_name(),
|
|
199
199
|
description="Test description",
|
|
200
200
|
project=PROJECT,
|
|
201
201
|
yaml_config=valid_workflow_yaml,
|
|
202
|
-
mode="InvalidMode",
|
|
202
|
+
mode="InvalidMode",
|
|
203
203
|
)
|
|
204
204
|
|
|
205
|
-
# Test with empty
|
|
205
|
+
# Test with empty workflow name
|
|
206
206
|
with pytest.raises(Exception):
|
|
207
207
|
WorkflowCreateRequest(
|
|
208
|
-
name="",
|
|
208
|
+
name="",
|
|
209
209
|
description="Test description",
|
|
210
210
|
project=PROJECT,
|
|
211
211
|
yaml_config=valid_workflow_yaml,
|
|
212
212
|
)
|
|
213
213
|
|
|
214
214
|
|
|
215
|
-
|
|
216
|
-
def test_create_workflow_project_validation(
|
|
217
|
-
client: CodeMieClient, valid_workflow_yaml: str
|
|
218
|
-
):
|
|
215
|
+
def test_create_workflow_project_validation(workflow_utils, valid_workflow_yaml: str):
|
|
219
216
|
"""Test workflow creation with invalid project."""
|
|
220
|
-
create_request = WorkflowCreateRequest(
|
|
221
|
-
name=get_random_name(),
|
|
222
|
-
description="Test workflow with invalid project",
|
|
223
|
-
project="non-existent-project",
|
|
224
|
-
yaml_config=valid_workflow_yaml,
|
|
225
|
-
)
|
|
226
|
-
|
|
227
217
|
with pytest.raises(Exception) as exc_info:
|
|
228
|
-
|
|
229
|
-
|
|
218
|
+
workflow_utils.send_create_workflow_request(
|
|
219
|
+
project_name="non-existent-project",
|
|
220
|
+
workflow_yaml=valid_workflow_yaml,
|
|
221
|
+
description="Test workflow with invalid project",
|
|
222
|
+
workflow_type=WorkflowMode.SEQUENTIAL,
|
|
223
|
+
)
|
|
224
|
+
assert_that(
|
|
225
|
+
str(exc_info.value).lower(),
|
|
226
|
+
any_of(contains_string("400"), contains_string("project")),
|
|
227
|
+
)
|
|
230
228
|
|
|
231
229
|
|
|
232
|
-
def test_list_workflows(
|
|
233
|
-
|
|
234
|
-
workflows
|
|
235
|
-
assert workflows is not None
|
|
230
|
+
def test_list_workflows(search_utils):
|
|
231
|
+
workflows = search_utils.list_workflows(per_page=2)
|
|
232
|
+
assert_that(workflows, has_length((equal_to(2))))
|
|
236
233
|
|
|
237
|
-
workflows =
|
|
238
|
-
|
|
239
|
-
assert len(workflows) <= 2
|
|
234
|
+
workflows = search_utils.list_workflows(per_page=2, page=1)
|
|
235
|
+
assert_that(workflows, has_length(less_than_or_equal_to(2)))
|
|
240
236
|
|
|
241
237
|
|
|
242
|
-
def
|
|
243
|
-
"""Test listing workflows with invalid parameters."""
|
|
238
|
+
def test_list_workflows_with_invalid_parameters(search_utils):
|
|
244
239
|
# Test invalid page number
|
|
245
240
|
with pytest.raises(ValidationError) as exc_info:
|
|
246
|
-
|
|
247
|
-
|
|
241
|
+
search_utils.list_workflows(page=-1)
|
|
242
|
+
assert_that(
|
|
243
|
+
str(exc_info.value),
|
|
244
|
+
contains_string("Input should be greater than or equal to 0"),
|
|
245
|
+
)
|
|
248
246
|
|
|
249
247
|
# Test invalid per_page value
|
|
250
248
|
with pytest.raises(ValidationError) as exc_info:
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
# Test invalid project name
|
|
255
|
-
|
|
256
|
-
|
|
249
|
+
search_utils.list_workflows(per_page=0)
|
|
250
|
+
assert_that(str(exc_info.value), contains_string("Input should be greater than 0"))
|
|
251
|
+
|
|
252
|
+
# Test invalid project name. Should return empty list for non-existent project
|
|
253
|
+
# Skipped. SDK method fix is required
|
|
254
|
+
# workflows = search_utils.list_workflows(projects="nonexistent-project")
|
|
255
|
+
# assert_that(
|
|
256
|
+
# workflows, has_length(equal_to(0))
|
|
257
|
+
# )
|
|
@@ -106,7 +106,7 @@ cloud_test_data = [
|
|
|
106
106
|
reason="Still have an issue with encoding long strings",
|
|
107
107
|
),
|
|
108
108
|
),
|
|
109
|
-
(
|
|
109
|
+
pytest.param(
|
|
110
110
|
Toolkit.CLOUD,
|
|
111
111
|
CloudTool.KUBERNETES,
|
|
112
112
|
CredentialTypes.KUBERNETES,
|
|
@@ -126,5 +126,9 @@ cloud_test_data = [
|
|
|
126
126
|
7. argo-cd-redis-ha-announce-2
|
|
127
127
|
8. argo-cd-redis-ha-haproxy
|
|
128
128
|
""",
|
|
129
|
+
marks=pytest.mark.skipif(
|
|
130
|
+
os.getenv("ENV") == "azure",
|
|
131
|
+
reason="Still have an issue with encoding long strings",
|
|
132
|
+
),
|
|
129
133
|
),
|
|
130
134
|
]
|
|
@@ -170,7 +170,7 @@ cloud_test_data = [
|
|
|
170
170
|
reason="Still have an issue with encoding long strings",
|
|
171
171
|
),
|
|
172
172
|
),
|
|
173
|
-
(
|
|
173
|
+
pytest.param(
|
|
174
174
|
Toolkit.CLOUD,
|
|
175
175
|
CloudTool.KUBERNETES,
|
|
176
176
|
CredentialTypes.KUBERNETES,
|
|
@@ -836,5 +836,9 @@ cloud_test_data = [
|
|
|
836
836
|
} ]
|
|
837
837
|
}
|
|
838
838
|
""",
|
|
839
|
+
marks=pytest.mark.skipif(
|
|
840
|
+
os.getenv("ENV") == "azure",
|
|
841
|
+
reason="Still have an issue with encoding long strings",
|
|
842
|
+
),
|
|
839
843
|
),
|
|
840
844
|
]
|
|
@@ -18,183 +18,52 @@ sonar_tools_test_data = [
|
|
|
18
18
|
"pageSize" : 1,
|
|
19
19
|
"total" : 81
|
|
20
20
|
},
|
|
21
|
-
"effortTotal" :
|
|
21
|
+
"effortTotal" : 487,
|
|
22
22
|
"issues" : [ {
|
|
23
|
-
"key" : "
|
|
24
|
-
"rule" : "python:
|
|
25
|
-
"severity" : "
|
|
26
|
-
"component" : "codemie:src/codemie/service/
|
|
23
|
+
"key" : "62422172-099f-4395-bcdd-afbbbab6fb51",
|
|
24
|
+
"rule" : "python:S6353",
|
|
25
|
+
"severity" : "MINOR",
|
|
26
|
+
"component" : "codemie:src/codemie/service/tools/dynamic_value_utils.py",
|
|
27
27
|
"project" : "codemie",
|
|
28
|
-
"line" :
|
|
29
|
-
"hash" : "
|
|
28
|
+
"line" : 48,
|
|
29
|
+
"hash" : "c5800fd84edcdca903a5a9105f31e263",
|
|
30
30
|
"textRange" : {
|
|
31
|
-
"startLine" :
|
|
32
|
-
"endLine" :
|
|
33
|
-
"startOffset" :
|
|
34
|
-
"endOffset" :
|
|
31
|
+
"startLine" : 48,
|
|
32
|
+
"endLine" : 48,
|
|
33
|
+
"startOffset" : 33,
|
|
34
|
+
"endOffset" : 45
|
|
35
35
|
},
|
|
36
|
-
"flows" : [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"startOffset" : 8,
|
|
43
|
-
"endOffset" : 10
|
|
44
|
-
},
|
|
45
|
-
"msg" : "+1",
|
|
46
|
-
"msgFormattings" : [ ]
|
|
47
|
-
} ]
|
|
48
|
-
}, {
|
|
49
|
-
"locations" : [ {
|
|
50
|
-
"component" : "codemie:src/codemie/service/assistant_service.py",
|
|
51
|
-
"textRange" : {
|
|
52
|
-
"startLine" : 773,
|
|
53
|
-
"endLine" : 773,
|
|
54
|
-
"startOffset" : 12,
|
|
55
|
-
"endOffset" : 14
|
|
56
|
-
},
|
|
57
|
-
"msg" : "+2 (incl 1 for nesting)",
|
|
58
|
-
"msgFormattings" : [ ]
|
|
59
|
-
} ]
|
|
60
|
-
}, {
|
|
61
|
-
"locations" : [ {
|
|
62
|
-
"component" : "codemie:src/codemie/service/assistant_service.py",
|
|
63
|
-
"textRange" : {
|
|
64
|
-
"startLine" : 775,
|
|
65
|
-
"endLine" : 775,
|
|
66
|
-
"startOffset" : 8,
|
|
67
|
-
"endOffset" : 12
|
|
68
|
-
},
|
|
69
|
-
"msg" : "+1",
|
|
70
|
-
"msgFormattings" : [ ]
|
|
71
|
-
} ]
|
|
72
|
-
}, {
|
|
73
|
-
"locations" : [ {
|
|
74
|
-
"component" : "codemie:src/codemie/service/assistant_service.py",
|
|
75
|
-
"textRange" : {
|
|
76
|
-
"startLine" : 780,
|
|
77
|
-
"endLine" : 780,
|
|
78
|
-
"startOffset" : 8,
|
|
79
|
-
"endOffset" : 11
|
|
80
|
-
},
|
|
81
|
-
"msg" : "+1",
|
|
82
|
-
"msgFormattings" : [ ]
|
|
83
|
-
} ]
|
|
84
|
-
}, {
|
|
85
|
-
"locations" : [ {
|
|
86
|
-
"component" : "codemie:src/codemie/service/assistant_service.py",
|
|
87
|
-
"textRange" : {
|
|
88
|
-
"startLine" : 781,
|
|
89
|
-
"endLine" : 781,
|
|
90
|
-
"startOffset" : 12,
|
|
91
|
-
"endOffset" : 14
|
|
92
|
-
},
|
|
93
|
-
"msg" : "+2 (incl 1 for nesting)",
|
|
94
|
-
"msgFormattings" : [ ]
|
|
95
|
-
} ]
|
|
96
|
-
}, {
|
|
97
|
-
"locations" : [ {
|
|
98
|
-
"component" : "codemie:src/codemie/service/assistant_service.py",
|
|
99
|
-
"textRange" : {
|
|
100
|
-
"startLine" : 785,
|
|
101
|
-
"endLine" : 785,
|
|
102
|
-
"startOffset" : 8,
|
|
103
|
-
"endOffset" : 10
|
|
104
|
-
},
|
|
105
|
-
"msg" : "+1",
|
|
106
|
-
"msgFormattings" : [ ]
|
|
107
|
-
} ]
|
|
108
|
-
}, {
|
|
109
|
-
"locations" : [ {
|
|
110
|
-
"component" : "codemie:src/codemie/service/assistant_service.py",
|
|
111
|
-
"textRange" : {
|
|
112
|
-
"startLine" : 785,
|
|
113
|
-
"endLine" : 785,
|
|
114
|
-
"startOffset" : 30,
|
|
115
|
-
"endOffset" : 33
|
|
116
|
-
},
|
|
117
|
-
"msg" : "+1",
|
|
118
|
-
"msgFormattings" : [ ]
|
|
119
|
-
} ]
|
|
120
|
-
}, {
|
|
121
|
-
"locations" : [ {
|
|
122
|
-
"component" : "codemie:src/codemie/service/assistant_service.py",
|
|
123
|
-
"textRange" : {
|
|
124
|
-
"startLine" : 787,
|
|
125
|
-
"endLine" : 787,
|
|
126
|
-
"startOffset" : 12,
|
|
127
|
-
"endOffset" : 15
|
|
128
|
-
},
|
|
129
|
-
"msg" : "+2 (incl 1 for nesting)",
|
|
130
|
-
"msgFormattings" : [ ]
|
|
131
|
-
} ]
|
|
132
|
-
}, {
|
|
133
|
-
"locations" : [ {
|
|
134
|
-
"component" : "codemie:src/codemie/service/assistant_service.py",
|
|
135
|
-
"textRange" : {
|
|
136
|
-
"startLine" : 788,
|
|
137
|
-
"endLine" : 788,
|
|
138
|
-
"startOffset" : 16,
|
|
139
|
-
"endOffset" : 18
|
|
140
|
-
},
|
|
141
|
-
"msg" : "+3 (incl 2 for nesting)",
|
|
142
|
-
"msgFormattings" : [ ]
|
|
143
|
-
} ]
|
|
144
|
-
}, {
|
|
145
|
-
"locations" : [ {
|
|
146
|
-
"component" : "codemie:src/codemie/service/assistant_service.py",
|
|
147
|
-
"textRange" : {
|
|
148
|
-
"startLine" : 792,
|
|
149
|
-
"endLine" : 792,
|
|
150
|
-
"startOffset" : 12,
|
|
151
|
-
"endOffset" : 14
|
|
152
|
-
},
|
|
153
|
-
"msg" : "+2 (incl 1 for nesting)",
|
|
154
|
-
"msgFormattings" : [ ]
|
|
155
|
-
} ]
|
|
156
|
-
}, {
|
|
157
|
-
"locations" : [ {
|
|
158
|
-
"component" : "codemie:src/codemie/service/assistant_service.py",
|
|
159
|
-
"textRange" : {
|
|
160
|
-
"startLine" : 801,
|
|
161
|
-
"endLine" : 801,
|
|
162
|
-
"startOffset" : 8,
|
|
163
|
-
"endOffset" : 10
|
|
164
|
-
},
|
|
165
|
-
"msg" : "+1",
|
|
166
|
-
"msgFormattings" : [ ]
|
|
167
|
-
} ]
|
|
168
|
-
} ],
|
|
169
|
-
"status" : "OPEN",
|
|
170
|
-
"message" : "Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.",
|
|
171
|
-
"effort" : "7min",
|
|
172
|
-
"debt" : "7min",
|
|
36
|
+
"flows" : [ ],
|
|
37
|
+
"resolution" : "FALSE-POSITIVE",
|
|
38
|
+
"status" : "RESOLVED",
|
|
39
|
+
"message" : "Use concise character class syntax '\\w' instead of '[a-zA-Z0-9_]'.",
|
|
40
|
+
"effort" : "5min",
|
|
41
|
+
"debt" : "5min",
|
|
173
42
|
"author" : "",
|
|
174
|
-
"tags" : [ "
|
|
175
|
-
"creationDate" : "2025-
|
|
176
|
-
"updateDate" : "2025-
|
|
43
|
+
"tags" : [ "regex" ],
|
|
44
|
+
"creationDate" : "2025-09-01T09:01:30+0000",
|
|
45
|
+
"updateDate" : "2025-09-01T09:01:30+0000",
|
|
177
46
|
"type" : "CODE_SMELL",
|
|
178
47
|
"scope" : "MAIN",
|
|
179
48
|
"quickFixAvailable" : false,
|
|
180
49
|
"messageFormattings" : [ ],
|
|
181
50
|
"codeVariants" : [ ],
|
|
182
|
-
"cleanCodeAttribute" : "
|
|
183
|
-
"cleanCodeAttributeCategory" : "
|
|
51
|
+
"cleanCodeAttribute" : "CLEAR",
|
|
52
|
+
"cleanCodeAttributeCategory" : "INTENTIONAL",
|
|
184
53
|
"impacts" : [ {
|
|
185
54
|
"softwareQuality" : "MAINTAINABILITY",
|
|
186
|
-
"severity" : "
|
|
55
|
+
"severity" : "LOW"
|
|
187
56
|
} ],
|
|
188
|
-
"issueStatus" : "
|
|
57
|
+
"issueStatus" : "FALSE_POSITIVE",
|
|
189
58
|
"prioritizedRule" : false
|
|
190
59
|
} ],
|
|
191
60
|
"components" : [ {
|
|
192
|
-
"key" : "codemie:src/codemie/service/
|
|
61
|
+
"key" : "codemie:src/codemie/service/tools/dynamic_value_utils.py",
|
|
193
62
|
"enabled" : true,
|
|
194
63
|
"qualifier" : "FIL",
|
|
195
|
-
"name" : "
|
|
196
|
-
"longName" : "src/codemie/service/
|
|
197
|
-
"path" : "src/codemie/service/
|
|
64
|
+
"name" : "dynamic_value_utils.py",
|
|
65
|
+
"longName" : "src/codemie/service/tools/dynamic_value_utils.py",
|
|
66
|
+
"path" : "src/codemie/service/tools/dynamic_value_utils.py"
|
|
198
67
|
}, {
|
|
199
68
|
"key" : "codemie",
|
|
200
69
|
"enabled" : true,
|
|
@@ -91,9 +91,13 @@ valid_integrations = [
|
|
|
91
91
|
CredentialTypes.SERVICE_NOW,
|
|
92
92
|
CredentialsUtil.servicenow_credentials(),
|
|
93
93
|
),
|
|
94
|
-
(
|
|
94
|
+
pytest.param(
|
|
95
95
|
CredentialTypes.KUBERNETES,
|
|
96
96
|
CredentialsUtil.kubernetes_credentials(),
|
|
97
|
+
marks=pytest.mark.skipif(
|
|
98
|
+
os.getenv("ENV") == "azure",
|
|
99
|
+
reason="Still have an issue with encoding long strings",
|
|
100
|
+
),
|
|
97
101
|
),
|
|
98
102
|
]
|
|
99
103
|
|
|
@@ -150,9 +154,13 @@ testable_integrations = [
|
|
|
150
154
|
CredentialTypes.SERVICE_NOW,
|
|
151
155
|
CredentialsUtil.servicenow_credentials(),
|
|
152
156
|
),
|
|
153
|
-
(
|
|
157
|
+
pytest.param(
|
|
154
158
|
CredentialTypes.KUBERNETES,
|
|
155
159
|
CredentialsUtil.kubernetes_credentials(),
|
|
160
|
+
marks=pytest.mark.skipif(
|
|
161
|
+
os.getenv("ENV") == "azure",
|
|
162
|
+
reason="Still have an issue with encoding long strings",
|
|
163
|
+
),
|
|
156
164
|
),
|
|
157
165
|
]
|
|
158
166
|
|
|
@@ -39,7 +39,6 @@ MODEL_RESPONSES = [
|
|
|
39
39
|
ModelTypes.CLAUDE_SONNET_V2_VERTEX,
|
|
40
40
|
GCP_ENVS,
|
|
41
41
|
),
|
|
42
|
-
LlmResponseData(ModelTypes.GEMINI_15_PRO, GCP_ENVS),
|
|
43
42
|
LlmResponseData(ModelTypes.GEMINI_20_FLASH, GCP_ENVS),
|
|
44
43
|
LlmResponseData(ModelTypes.GEMINI_25_PRO, GCP_ENVS),
|
|
45
44
|
LlmResponseData(
|
|
@@ -2,7 +2,10 @@ import os
|
|
|
2
2
|
|
|
3
3
|
from codemie_test_harness.tests.enums.tools import VcsTool
|
|
4
4
|
|
|
5
|
-
GITHUB_TOOL_TASK =
|
|
5
|
+
GITHUB_TOOL_TASK = (
|
|
6
|
+
f"Using github tool get info about issue №5 for the repo {os.getenv('GITHUB_PROJECT')}. "
|
|
7
|
+
f"Do not wrap tool parameters in additional query object"
|
|
8
|
+
)
|
|
6
9
|
|
|
7
10
|
RESPONSE_FOR_GITHUB = """
|
|
8
11
|
Issue #5 Details for Repository wild47/final_task
|