codemie-sdk-python 0.1.89__py3-none-any.whl → 0.1.91__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-sdk-python might be problematic. Click here for more details.
- codemie_sdk/__init__.py +1 -1
- codemie_sdk/services/assistant.py +10 -1
- codemie_sdk/services/datasource.py +9 -5
- codemie_sdk/utils/http.py +0 -25
- {codemie_sdk_python-0.1.89.dist-info → codemie_sdk_python-0.1.91.dist-info}/METADATA +20 -1
- {codemie_sdk_python-0.1.89.dist-info → codemie_sdk_python-0.1.91.dist-info}/RECORD +7 -7
- {codemie_sdk_python-0.1.89.dist-info → codemie_sdk_python-0.1.91.dist-info}/WHEEL +0 -0
codemie_sdk/__init__.py
CHANGED
|
@@ -7,6 +7,7 @@ from pydantic import BaseModel
|
|
|
7
7
|
from copy import deepcopy
|
|
8
8
|
|
|
9
9
|
import requests
|
|
10
|
+
import mimetypes
|
|
10
11
|
|
|
11
12
|
from ..models.assistant import (
|
|
12
13
|
Assistant,
|
|
@@ -205,7 +206,15 @@ class AssistantService:
|
|
|
205
206
|
|
|
206
207
|
with open(file_path, "rb") as file:
|
|
207
208
|
files = [
|
|
208
|
-
(
|
|
209
|
+
(
|
|
210
|
+
"file",
|
|
211
|
+
(
|
|
212
|
+
file_path.name,
|
|
213
|
+
file,
|
|
214
|
+
mimetypes.guess_type(file_path.name)
|
|
215
|
+
or "application/octet-stream",
|
|
216
|
+
),
|
|
217
|
+
),
|
|
209
218
|
]
|
|
210
219
|
response = self._api.post_multipart("/v1/files/", dict, files=files)
|
|
211
220
|
|
|
@@ -161,16 +161,20 @@ class DatasourceService:
|
|
|
161
161
|
params["sort_key"] = sort_key
|
|
162
162
|
params["sort_order"] = sort_order
|
|
163
163
|
|
|
164
|
+
unified_filters = {}
|
|
164
165
|
if datasource_types:
|
|
165
|
-
|
|
166
|
+
unified_filters["index_type"] = datasource_types
|
|
166
167
|
if projects:
|
|
167
|
-
|
|
168
|
+
unified_filters["project"] = projects
|
|
168
169
|
if status:
|
|
169
|
-
|
|
170
|
+
unified_filters["status"] = status.value
|
|
170
171
|
if owner:
|
|
171
|
-
|
|
172
|
+
unified_filters["created_by"] = owner
|
|
172
173
|
if filters:
|
|
173
|
-
|
|
174
|
+
unified_filters.update(filters)
|
|
175
|
+
if unified_filters:
|
|
176
|
+
params["filters"] = json.dumps(unified_filters)
|
|
177
|
+
|
|
174
178
|
return self._api.get("/v1/index", List[DataSource], params=params)
|
|
175
179
|
|
|
176
180
|
def get(self, datasource_id: str) -> DataSource:
|
codemie_sdk/utils/http.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"""HTTP utilities for CodeMie SDK."""
|
|
2
2
|
|
|
3
|
-
from pathlib import Path
|
|
4
3
|
from typing import TypeVar, Type, Optional, Any, Union, Dict, List, get_origin, get_args
|
|
5
4
|
from pydantic import BaseModel
|
|
6
5
|
import requests
|
|
@@ -276,27 +275,3 @@ class ApiRequestHandler:
|
|
|
276
275
|
response.raise_for_status()
|
|
277
276
|
|
|
278
277
|
return self._parse_response(response, response_model, wrap_response)
|
|
279
|
-
|
|
280
|
-
@staticmethod
|
|
281
|
-
def detect_mime_type(file_path: Path) -> str:
|
|
282
|
-
"""Detect MIME type based on file extension."""
|
|
283
|
-
extension = file_path.suffix.lower()
|
|
284
|
-
mime_types = {
|
|
285
|
-
".txt": "text/plain",
|
|
286
|
-
".vtt": "text/vtt",
|
|
287
|
-
".csv": "text/csv",
|
|
288
|
-
".json": "application/json",
|
|
289
|
-
".yaml": "application/x-yaml",
|
|
290
|
-
".yml": "application/x-yaml",
|
|
291
|
-
".xml": "text/xml",
|
|
292
|
-
".pdf": "application/pdf",
|
|
293
|
-
".jpg": "image/jpeg",
|
|
294
|
-
".jpeg": "image/jpeg",
|
|
295
|
-
".gif": "image/gif",
|
|
296
|
-
".png": "image/png",
|
|
297
|
-
".ods": "application/vnd.oasis.opendocument.spreadsheet",
|
|
298
|
-
".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
299
|
-
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
300
|
-
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
301
|
-
}
|
|
302
|
-
return mime_types.get(extension, "application/octet-stream")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: codemie-sdk-python
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.91
|
|
4
4
|
Summary: CodeMie SDK for Python
|
|
5
5
|
Author: Vadym Vlasenko
|
|
6
6
|
Author-email: vadym_vlasenko@epam.com
|
|
@@ -853,6 +853,21 @@ Run e2e/regression tests
|
|
|
853
853
|
pytest -n auto -m "e2e or regression" --reruns 1
|
|
854
854
|
```
|
|
855
855
|
|
|
856
|
+
Run UI tests
|
|
857
|
+
|
|
858
|
+
First you have to install playwright browsers:
|
|
859
|
+
|
|
860
|
+
```shell
|
|
861
|
+
playwright install
|
|
862
|
+
```
|
|
863
|
+
and then
|
|
864
|
+
|
|
865
|
+
```shell
|
|
866
|
+
pytest -n 4 -m ui --reruns 1
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
All Playwright documentation can be found by the following link: https://playwright.dev/python/docs/intro
|
|
870
|
+
|
|
856
871
|
Run tests for e2e tests for specific integration/tool.
|
|
857
872
|
Available marks:
|
|
858
873
|
- jira_kb
|
|
@@ -871,3 +886,7 @@ In case you want to send test results in **ReportPortal** you should specify RP_
|
|
|
871
886
|
```shell
|
|
872
887
|
pytest -n auto -m "e2e or regression" --reruns 1 --reportportal
|
|
873
888
|
```
|
|
889
|
+
|
|
890
|
+
ReportPortal link is available by the following URL: https://report-portal.core.kuberocketci.io/ui/#epm-cdme/launches/all
|
|
891
|
+
|
|
892
|
+
If you do not have access to the project ask Anton Yeromin (anton_yeromin@epam.com) to add you.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
codemie_sdk/__init__.py,sha256=
|
|
1
|
+
codemie_sdk/__init__.py,sha256=leeACpTc2113BsY_IgO-ceFHPrQKC2WhuOfuuyyIqDE,567
|
|
2
2
|
codemie_sdk/auth/__init__.py,sha256=IksEj223xEZtJ-cQ0AT9L0Bs9psIJ8QNzDXrPTUQ3xQ,126
|
|
3
3
|
codemie_sdk/auth/credentials.py,sha256=u2eLNsD8fELTgreQghVb0g0kk82zchUkux0M5lzq-u8,4320
|
|
4
4
|
codemie_sdk/client/__init__.py,sha256=yf6C39MmrJ6gK9ZHMhBeynKwUUYVSUTQbKxU8-4qpKg,101
|
|
@@ -14,8 +14,8 @@ codemie_sdk/models/task.py,sha256=J4ZFRY3s8qBGrqB5NLQF0rMbInLh4s7OEZ0ZfmnW0Ho,14
|
|
|
14
14
|
codemie_sdk/models/user.py,sha256=Q0rjimZh-IbeaPfq6b6fk6ZaCtwLqWHEIlU863suCS4,1777
|
|
15
15
|
codemie_sdk/models/workflow.py,sha256=pr8ap_70pzv3Ugvdo4RivNOFyoQVr1E5fze2O87L4gM,2431
|
|
16
16
|
codemie_sdk/models/workflow_state.py,sha256=CMYFQZ7sy4QxmnWmc83TFfqP7TG_3rW5MdH5fxsS9kY,1251
|
|
17
|
-
codemie_sdk/services/assistant.py,sha256=
|
|
18
|
-
codemie_sdk/services/datasource.py,sha256=
|
|
17
|
+
codemie_sdk/services/assistant.py,sha256=hd5_Bt6Cuf8_hOcnYIi6-S1z7PuCE3zXwf0U9UAMPlY,7885
|
|
18
|
+
codemie_sdk/services/datasource.py,sha256=SCykr3t9QEaZVhjNgGT_PU8Ngg0MAdu2BB-6xrHz8Dg,7296
|
|
19
19
|
codemie_sdk/services/integration.py,sha256=SdwFwR3hCPyJYilzzlkpKPLNbO89nfqmIXXoT7bDEBI,5410
|
|
20
20
|
codemie_sdk/services/llm.py,sha256=0-e4_7RvLHs2giCyoQ5U4KDTh6p5VXgPKNxnDP9ZDFU,1100
|
|
21
21
|
codemie_sdk/services/task.py,sha256=3e9t8_LMkR4xfeMBwMCo7ZF87PxPS-ZbzDg85ilda2M,1031
|
|
@@ -24,7 +24,7 @@ codemie_sdk/services/workflow.py,sha256=0d5grAsBIH2NZY66UbVhlDqEFYxEYSBByj3GNgcz
|
|
|
24
24
|
codemie_sdk/services/workflow_execution.py,sha256=aGoT3rdTmh5-doAsrmBBjLEuOfvL5aqeo3g9th1_aAw,3647
|
|
25
25
|
codemie_sdk/services/workflow_execution_state.py,sha256=tXoaa8yT09xgYEUNiHhVULe76TwGwVgZupMIUyyLxdo,2070
|
|
26
26
|
codemie_sdk/utils/__init__.py,sha256=BXAJJfAzO89-kMYvWWo9wSNhSbGgF3vB1In9sePFhMM,109
|
|
27
|
-
codemie_sdk/utils/http.py,sha256=
|
|
28
|
-
codemie_sdk_python-0.1.
|
|
29
|
-
codemie_sdk_python-0.1.
|
|
30
|
-
codemie_sdk_python-0.1.
|
|
27
|
+
codemie_sdk/utils/http.py,sha256=FWU56W_-vBGbHfX1EC1zsoRjDoNCyNK2HCdNb4IkQVc,9233
|
|
28
|
+
codemie_sdk_python-0.1.91.dist-info/METADATA,sha256=Me3ufZvfABCChh7gSdJw2qsi6Dr3rA8QsMnds6VAp1Y,23620
|
|
29
|
+
codemie_sdk_python-0.1.91.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
30
|
+
codemie_sdk_python-0.1.91.dist-info/RECORD,,
|
|
File without changes
|