Skip to content

transformationconfig

Pydantic Transformation Configuration Data Model.

A transformation status data model is provided as well. This data model represents what should be returned from the strategy's status() method.

ProcessPriority

Bases: str, Enum

Defining process priority enumerators.

Process priorities:

  • Low
  • Medium
  • High
Source code in oteapi/models/transformationconfig.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class ProcessPriority(str, Enum):
    """Defining process priority enumerators.

    Process priorities:

    - Low
    - Medium
    - High

    """

    LOW = "Low"
    MEDIUM = "Medium"
    HIGH = "High"

HIGH = 'High' class-attribute instance-attribute

LOW = 'Low' class-attribute instance-attribute

MEDIUM = 'Medium' class-attribute instance-attribute

TransformationConfig

Bases: GenericConfig, SecretConfig

Transformation Strategy Data Configuration.

Source code in oteapi/models/transformationconfig.py
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
class TransformationConfig(GenericConfig, SecretConfig):
    """Transformation Strategy Data Configuration."""

    transformationType: str = Field(
        ...,
        description=(
            "Type of registered transformation strategy. E.g., `celery/remote`."
        ),
    )
    name: Optional[str] = Field(
        None, description="Human-readable name of the transformation strategy."
    )
    due: Optional[datetime] = Field(
        None,
        description=(
            "Optional field to indicate a due data/time for when a transformation "
            "should finish."
        ),
    )
    priority: Optional[ProcessPriority] = Field(
        ProcessPriority.MEDIUM,
        description="Define the process priority of the transformation execution.",
    )

due: Optional[datetime] = Field(None, description='Optional field to indicate a due data/time for when a transformation should finish.') class-attribute instance-attribute

name: Optional[str] = Field(None, description='Human-readable name of the transformation strategy.') class-attribute instance-attribute

priority: Optional[ProcessPriority] = Field(ProcessPriority.MEDIUM, description='Define the process priority of the transformation execution.') class-attribute instance-attribute

transformationType: str = Field(..., description='Type of registered transformation strategy. E.g., `celery/remote`.') class-attribute instance-attribute

TransformationStatus

Bases: BaseModel

Return from transformation status.

Source code in oteapi/models/transformationconfig.py
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
class TransformationStatus(BaseModel):
    """Return from transformation status."""

    id: str = Field(..., description="ID for the given transformation process.")
    status: Optional[str] = Field(
        None, description="Status for the transformation process."
    )
    messages: Optional[List[str]] = Field(
        None, description="Messages related to the transformation process."
    )
    created: Optional[datetime] = Field(
        None,
        description="Time of creation for the transformation process. Given in UTC.",
    )
    startTime: Optional[datetime] = Field(
        None, description="Time when the transformation process started. Given in UTC."
    )
    finishTime: Optional[datetime] = Field(
        None, description="Time when the tranformation process finished. Given in UTC."
    )

created: Optional[datetime] = Field(None, description='Time of creation for the transformation process. Given in UTC.') class-attribute instance-attribute

finishTime: Optional[datetime] = Field(None, description='Time when the tranformation process finished. Given in UTC.') class-attribute instance-attribute

id: str = Field(..., description='ID for the given transformation process.') class-attribute instance-attribute

messages: Optional[List[str]] = Field(None, description='Messages related to the transformation process.') class-attribute instance-attribute

startTime: Optional[datetime] = Field(None, description='Time when the transformation process started. Given in UTC.') class-attribute instance-attribute

status: Optional[str] = Field(None, description='Status for the transformation process.') class-attribute instance-attribute