Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6e8e08ae94 | |||
| 6e7c36223f |
@@ -1,7 +1,7 @@
|
||||
""""""
|
||||
from collections import defaultdict
|
||||
from enum import Enum
|
||||
from typing import Optional
|
||||
from typing import Optional, List, Dict
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
from stringcase import camelcase
|
||||
@@ -27,7 +27,7 @@ class AutomationRunData(BaseModel):
|
||||
automation_run_id: str
|
||||
|
||||
function_id: str
|
||||
function_revision: str
|
||||
function_release: str
|
||||
|
||||
model_config = ConfigDict(
|
||||
alias_generator=camelcase, populate_by_name=True, protected_namespaces=()
|
||||
@@ -63,11 +63,11 @@ class AutomationResult(AutomateBase):
|
||||
|
||||
elapsed: float = 0
|
||||
result_view: Optional[str] = None
|
||||
result_versions: list[str] = Field(default_factory=list)
|
||||
blobs: list[str] = Field(default_factory=list)
|
||||
result_versions: List[str] = Field(default_factory=list)
|
||||
blobs: List[str] = Field(default_factory=list)
|
||||
run_status: AutomationStatus = AutomationStatus.RUNNING
|
||||
status_message: Optional[str] = None
|
||||
|
||||
object_results: dict[str, list[ObjectResult]] = Field(
|
||||
object_results: Dict[str, List[ObjectResult]] = Field(
|
||||
default_factory=lambda: defaultdict(list) # typing: ignore
|
||||
)
|
||||
|
||||
@@ -128,7 +128,7 @@ def automation_run_data(
|
||||
|
||||
automation_run_id = crypto_random_string(10)
|
||||
function_id = crypto_random_string(10)
|
||||
function_revision = crypto_random_string(10)
|
||||
function_release = crypto_random_string(10)
|
||||
return AutomationRunData(
|
||||
project_id=project_id,
|
||||
model_id=model_id,
|
||||
@@ -139,7 +139,7 @@ def automation_run_data(
|
||||
automation_revision_id=automation_revision_id,
|
||||
automation_run_id=automation_run_id,
|
||||
function_id=function_id,
|
||||
function_revision=function_revision,
|
||||
function_release=function_release,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user