clerk-sdk 0.2.8__tar.gz → 0.3.0__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.
- {clerk_sdk-0.2.8/clerk_sdk.egg-info → clerk_sdk-0.3.0}/PKG-INFO +1 -1
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/decorator/task_decorator.py +7 -1
- clerk_sdk-0.3.0/clerk/exceptions/exceptions.py +13 -0
- clerk_sdk-0.3.0/clerk/exceptions/remote_device.py +4 -0
- clerk_sdk-0.3.0/clerk/utils/__init__.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/utils/logger.py +3 -3
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/utils/save_artifact.py +3 -3
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0/clerk_sdk.egg-info}/PKG-INFO +1 -1
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk_sdk.egg-info/SOURCES.txt +3 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/setup.py +1 -1
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/LICENSE +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/MANIFEST.in +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/README.md +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/__init__.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/base.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/client.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/decorator/__init__.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/decorator/models.py +0 -0
- {clerk_sdk-0.2.8/clerk/gui_automation → clerk_sdk-0.3.0/clerk/exceptions}/__init__.py +0 -0
- {clerk_sdk-0.2.8/clerk/gui_automation/action_model → clerk_sdk-0.3.0/clerk/gui_automation}/__init__.py +0 -0
- {clerk_sdk-0.2.8/clerk/gui_automation/exceptions → clerk_sdk-0.3.0/clerk/gui_automation/action_model}/__init__.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/action_model/model.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/action_model/utils.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/client.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/client_actor/__init__.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/client_actor/client_actor.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/client_actor/exception.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/client_actor/model.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/decorators/__init__.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/decorators/gui_automation.py +0 -0
- {clerk_sdk-0.2.8/clerk/gui_automation/exceptions/modality → clerk_sdk-0.3.0/clerk/gui_automation/exceptions}/__init__.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/exceptions/agent_manager.py +0 -0
- {clerk_sdk-0.2.8/clerk/gui_automation/ui_state_inspector → clerk_sdk-0.3.0/clerk/gui_automation/exceptions/modality}/__init__.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/exceptions/modality/exc.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/exceptions/websocket.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/requirements.txt +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/ui_actions/__init__.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/ui_actions/actions.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/ui_actions/base.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/ui_actions/support.py +0 -0
- {clerk_sdk-0.2.8/clerk/models → clerk_sdk-0.3.0/clerk/gui_automation/ui_state_inspector}/__init__.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/ui_state_inspector/gui_vision.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/ui_state_inspector/models.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/ui_state_machine/__init__.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/ui_state_machine/ai_recovery.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/ui_state_machine/decorators.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/ui_state_machine/exceptions.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/ui_state_machine/models.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/gui_automation/ui_state_machine/state_machine.py +0 -0
- {clerk_sdk-0.2.8/clerk/utils → clerk_sdk-0.3.0/clerk/models}/__init__.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/models/document.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/models/document_statuses.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/models/file.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/models/remote_device.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/models/response_model.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk/models/ui_operator.py +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk_sdk.egg-info/dependency_links.txt +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk_sdk.egg-info/requires.txt +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/clerk_sdk.egg-info/top_level.txt +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/pyproject.toml +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/requirements.txt +0 -0
- {clerk_sdk-0.2.8 → clerk_sdk-0.3.0}/setup.cfg +0 -0
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import pickle
|
|
3
|
+
import traceback
|
|
3
4
|
from typing import Callable, Optional
|
|
4
5
|
from functools import wraps
|
|
6
|
+
|
|
7
|
+
from clerk.exceptions.exceptions import ApplicationException
|
|
5
8
|
from .models import ClerkCodePayload
|
|
6
9
|
|
|
7
10
|
input_pkl: str = "/app/data/input/input.pkl"
|
|
@@ -35,7 +38,10 @@ def clerk_code():
|
|
|
35
38
|
if not isinstance(output, ClerkCodePayload):
|
|
36
39
|
raise TypeError("Function must return a ClerkCodePayload instance.")
|
|
37
40
|
except Exception as e:
|
|
38
|
-
|
|
41
|
+
# parse no standard errors into the standard Application Error
|
|
42
|
+
output = ApplicationException(
|
|
43
|
+
type=str(type(e)), message=str(e), traceback=traceback.format_exc()
|
|
44
|
+
)
|
|
39
45
|
|
|
40
46
|
# 3. write to output.pkl
|
|
41
47
|
try:
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class AppBaseException(Exception):
|
|
5
|
+
def __init__(self, type_: str, message: str, traceback: Optional[str] = None):
|
|
6
|
+
super().__init__(message)
|
|
7
|
+
self.type = type_
|
|
8
|
+
self.message = message
|
|
9
|
+
self.traceback = traceback
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ApplicationException(AppBaseException):
|
|
13
|
+
pass
|
|
File without changes
|
|
@@ -79,11 +79,11 @@ def _log(level: str, message: str):
|
|
|
79
79
|
_log_to_console("INFO", "module_name", "This is an info message")
|
|
80
80
|
|
|
81
81
|
"""
|
|
82
|
-
# Get
|
|
83
|
-
|
|
82
|
+
# Get artifact folder from environment variable or default to "unknown"
|
|
83
|
+
_artifacts_folder = os.getenv("_artifacts_folder", "unknown")
|
|
84
84
|
|
|
85
85
|
# Create the base path for artifacts
|
|
86
|
-
logs_path = os.path.join(base_path,
|
|
86
|
+
logs_path = os.path.join(base_path, _artifacts_folder)
|
|
87
87
|
os.makedirs(logs_path, exist_ok=True)
|
|
88
88
|
# Define the log file path
|
|
89
89
|
log_file_path = os.path.join(logs_path, "logs.txt")
|
|
@@ -18,11 +18,11 @@ def save_artifact(
|
|
|
18
18
|
str: The path to the saved artifact.
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
|
-
# get the
|
|
22
|
-
|
|
21
|
+
# get the artifact folder from environment variable or default to "unknown"
|
|
22
|
+
_artifacts_folder = os.getenv("_artifacts_folder", "unknown")
|
|
23
23
|
|
|
24
24
|
# create the base path for artifacts
|
|
25
|
-
base_path = os.path.join(os.getcwd(), "data", "artifacts",
|
|
25
|
+
base_path = os.path.join(os.getcwd(), "data", "artifacts", _artifacts_folder)
|
|
26
26
|
if subfolder:
|
|
27
27
|
base_path = os.path.join(base_path, subfolder)
|
|
28
28
|
|
|
@@ -10,6 +10,9 @@ clerk/client.py
|
|
|
10
10
|
clerk/decorator/__init__.py
|
|
11
11
|
clerk/decorator/models.py
|
|
12
12
|
clerk/decorator/task_decorator.py
|
|
13
|
+
clerk/exceptions/__init__.py
|
|
14
|
+
clerk/exceptions/exceptions.py
|
|
15
|
+
clerk/exceptions/remote_device.py
|
|
13
16
|
clerk/gui_automation/__init__.py
|
|
14
17
|
clerk/gui_automation/client.py
|
|
15
18
|
clerk/gui_automation/requirements.txt
|
|
@@ -13,7 +13,7 @@ gui_requirements = get_requirements("./clerk/gui_automation")
|
|
|
13
13
|
|
|
14
14
|
setup(
|
|
15
15
|
name="clerk-sdk",
|
|
16
|
-
version="0.
|
|
16
|
+
version="0.3.0",
|
|
17
17
|
description="Library for interacting with Clerk",
|
|
18
18
|
long_description=open("README.md").read(),
|
|
19
19
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{clerk_sdk-0.2.8/clerk/models → clerk_sdk-0.3.0/clerk/gui_automation/ui_state_inspector}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|