codemie-sdk-python 0.1.93__tar.gz → 0.1.95__tar.gz
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_python-0.1.93 → codemie_sdk_python-0.1.95}/PKG-INFO +7 -7
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/README.md +6 -6
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/pyproject.toml +2 -1
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/auth/credentials.py +7 -1
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/workflow.py +1 -1
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/utils/http.py +6 -8
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/__init__.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/auth/__init__.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/client/__init__.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/client/client.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/exceptions.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/__init__.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/assistant.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/common.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/datasource.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/integration.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/llm.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/task.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/user.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/workflow_state.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/assistant.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/datasource.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/integration.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/llm.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/task.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/user.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/workflow.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/workflow_execution.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/workflow_execution_state.py +0 -0
- {codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/utils/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: codemie-sdk-python
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.95
|
|
4
4
|
Summary: CodeMie SDK for Python
|
|
5
5
|
Author: Vadym Vlasenko
|
|
6
6
|
Author-email: vadym_vlasenko@epam.com
|
|
@@ -841,16 +841,16 @@ AWS_SECRET_KEY=<aws_secret_key>
|
|
|
841
841
|
RP_API_KEY=<report_portal_key_optional>
|
|
842
842
|
```
|
|
843
843
|
|
|
844
|
-
Run all tests
|
|
844
|
+
Run all tests (-n - number of parallel workers. Fill free to change it to find the best that suits your environment)
|
|
845
845
|
|
|
846
846
|
```shell
|
|
847
|
-
pytest -n
|
|
847
|
+
pytest -n 10 --reruns 2
|
|
848
848
|
```
|
|
849
849
|
|
|
850
850
|
Run e2e/regression tests
|
|
851
851
|
|
|
852
852
|
```shell
|
|
853
|
-
pytest -n
|
|
853
|
+
pytest -n 10 -m "e2e or regression" --reruns 2
|
|
854
854
|
```
|
|
855
855
|
|
|
856
856
|
Run UI tests
|
|
@@ -863,7 +863,7 @@ playwright install
|
|
|
863
863
|
and then
|
|
864
864
|
|
|
865
865
|
```shell
|
|
866
|
-
pytest -n 4 -m ui --reruns
|
|
866
|
+
pytest -n 4 -m ui --reruns 2
|
|
867
867
|
```
|
|
868
868
|
|
|
869
869
|
All Playwright documentation can be found by the following link: https://playwright.dev/python/docs/intro
|
|
@@ -878,13 +878,13 @@ Available marks:
|
|
|
878
878
|
- git
|
|
879
879
|
|
|
880
880
|
```shell
|
|
881
|
-
pytest -n
|
|
881
|
+
pytest -n 10 -m "jira_kb or github" --reruns 2
|
|
882
882
|
```
|
|
883
883
|
|
|
884
884
|
In case you want to send test results in **ReportPortal** you should specify RP_API_KEY in .env and run tests like this:
|
|
885
885
|
|
|
886
886
|
```shell
|
|
887
|
-
pytest -n
|
|
887
|
+
pytest -n 10 -m "e2e or regression" --reruns 2 --reportportal
|
|
888
888
|
```
|
|
889
889
|
|
|
890
890
|
ReportPortal link is available by the following URL: https://report-portal.core.kuberocketci.io/ui/#epm-cdme/launches/all
|
|
@@ -828,16 +828,16 @@ AWS_SECRET_KEY=<aws_secret_key>
|
|
|
828
828
|
RP_API_KEY=<report_portal_key_optional>
|
|
829
829
|
```
|
|
830
830
|
|
|
831
|
-
Run all tests
|
|
831
|
+
Run all tests (-n - number of parallel workers. Fill free to change it to find the best that suits your environment)
|
|
832
832
|
|
|
833
833
|
```shell
|
|
834
|
-
pytest -n
|
|
834
|
+
pytest -n 10 --reruns 2
|
|
835
835
|
```
|
|
836
836
|
|
|
837
837
|
Run e2e/regression tests
|
|
838
838
|
|
|
839
839
|
```shell
|
|
840
|
-
pytest -n
|
|
840
|
+
pytest -n 10 -m "e2e or regression" --reruns 2
|
|
841
841
|
```
|
|
842
842
|
|
|
843
843
|
Run UI tests
|
|
@@ -850,7 +850,7 @@ playwright install
|
|
|
850
850
|
and then
|
|
851
851
|
|
|
852
852
|
```shell
|
|
853
|
-
pytest -n 4 -m ui --reruns
|
|
853
|
+
pytest -n 4 -m ui --reruns 2
|
|
854
854
|
```
|
|
855
855
|
|
|
856
856
|
All Playwright documentation can be found by the following link: https://playwright.dev/python/docs/intro
|
|
@@ -865,13 +865,13 @@ Available marks:
|
|
|
865
865
|
- git
|
|
866
866
|
|
|
867
867
|
```shell
|
|
868
|
-
pytest -n
|
|
868
|
+
pytest -n 10 -m "jira_kb or github" --reruns 2
|
|
869
869
|
```
|
|
870
870
|
|
|
871
871
|
In case you want to send test results in **ReportPortal** you should specify RP_API_KEY in .env and run tests like this:
|
|
872
872
|
|
|
873
873
|
```shell
|
|
874
|
-
pytest -n
|
|
874
|
+
pytest -n 10 -m "e2e or regression" --reruns 2 --reportportal
|
|
875
875
|
```
|
|
876
876
|
|
|
877
877
|
ReportPortal link is available by the following URL: https://report-portal.core.kuberocketci.io/ui/#epm-cdme/launches/all
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "codemie-sdk-python"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.95"
|
|
4
4
|
description = "CodeMie SDK for Python"
|
|
5
5
|
authors = [
|
|
6
6
|
"Vadym Vlasenko <vadym_vlasenko@epam.com>",
|
|
@@ -31,6 +31,7 @@ pyyaml = "^6.0.2"
|
|
|
31
31
|
codemie-plugins = "^0.1.123"
|
|
32
32
|
pytest-reportportal = "^5.5.2"
|
|
33
33
|
pytest-playwright = "^0.7.0"
|
|
34
|
+
tzlocal = "^5.3.1"
|
|
34
35
|
|
|
35
36
|
[build-system]
|
|
36
37
|
requires = ["poetry-core"]
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"""Authentication credentials module for CodeMie SDK."""
|
|
2
2
|
|
|
3
|
+
import os
|
|
4
|
+
|
|
3
5
|
import requests
|
|
4
6
|
from typing import Optional
|
|
5
7
|
|
|
@@ -36,13 +38,17 @@ class KeycloakCredentials:
|
|
|
36
38
|
self.password = password
|
|
37
39
|
self.verify_ssl = verify_ssl
|
|
38
40
|
|
|
39
|
-
if
|
|
41
|
+
if os.getenv("ENV", "").lower() != "local" and not (
|
|
42
|
+
(client_id and client_secret) or (username and password)
|
|
43
|
+
):
|
|
40
44
|
raise ValueError(
|
|
41
45
|
"Either client credentials (client_id, client_secret) or "
|
|
42
46
|
"user credentials (username, password) must be provided"
|
|
43
47
|
)
|
|
44
48
|
|
|
45
49
|
def get_token(self) -> str:
|
|
50
|
+
if os.getenv("ENV", "").lower() == "local":
|
|
51
|
+
return ""
|
|
46
52
|
"""Get access token using either client credentials or password grant."""
|
|
47
53
|
url = (
|
|
48
54
|
f"{self.server_url}/realms/{self.realm_name}/protocol/openid-connect/token"
|
|
@@ -84,6 +84,6 @@ class WorkflowExecution(BaseModel):
|
|
|
84
84
|
status: ExecutionStatus = Field(alias="overall_status")
|
|
85
85
|
created_date: datetime = Field(alias="date")
|
|
86
86
|
prompt: str
|
|
87
|
-
updated_date: Optional[datetime] =
|
|
87
|
+
updated_date: Optional[datetime] = Field(alias="update_date")
|
|
88
88
|
created_by: User
|
|
89
89
|
tokens_usage: Optional[TokensUsage] = None
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""HTTP utilities for CodeMie SDK."""
|
|
2
2
|
|
|
3
|
+
import os
|
|
3
4
|
from typing import TypeVar, Type, Optional, Any, Union, Dict, List, get_origin, get_args
|
|
4
5
|
from pydantic import BaseModel
|
|
5
6
|
import requests
|
|
@@ -56,14 +57,11 @@ class ApiRequestHandler:
|
|
|
56
57
|
if not exclude_content_type:
|
|
57
58
|
headers["Content-Type"] = "application/json"
|
|
58
59
|
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
)
|
|
64
|
-
headers["User-Id"] = "dev-codemie-user"
|
|
65
|
-
else:
|
|
66
|
-
headers["Authorization"] = f"Bearer {self._token}"
|
|
60
|
+
headers["Authorization"] = (
|
|
61
|
+
f"Bearer {self._token}"
|
|
62
|
+
if os.getenv("ENV", "").lower() != "local"
|
|
63
|
+
else "dev-codemie-user"
|
|
64
|
+
)
|
|
67
65
|
return headers
|
|
68
66
|
|
|
69
67
|
def _parse_response(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/datasource.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/integration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/models/workflow_state.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/assistant.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/datasource.py
RENAMED
|
File without changes
|
{codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/integration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemie_sdk_python-0.1.93 → codemie_sdk_python-0.1.95}/src/codemie_sdk/services/workflow.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|