Skip to content

Commit 3b7ff56

Browse files
committed
Add missing file
1 parent 0b02ee5 commit 3b7ff56

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
from dataclasses import dataclass
2+
from datetime import datetime
3+
from enum import Enum
4+
from typing import Optional
5+
6+
7+
# Status of the dataset trace
8+
class Status(Enum):
9+
FAILED = "FAILED"
10+
SUCCESS = "SUCCESS"
11+
PUBLISHED = "PUBLISHED"
12+
NOT_PUBLISHED = "NOT_PUBLISHED"
13+
PROCESSING = "PROCESSING"
14+
15+
16+
# Stage of the pipeline
17+
class PipelineStage(Enum):
18+
DATASET_PROCESSING = "DATASET_PROCESSING"
19+
LOCATION_EXTRACTION = "LOCATION_EXTRACTION"
20+
GBFS_VALIDATION = "GBFS_VALIDATION"
21+
22+
23+
# Dataset trace class to store the trace of a dataset
24+
@dataclass
25+
class DatasetTrace:
26+
stable_id: str
27+
status: Status
28+
timestamp: datetime
29+
dataset_id: Optional[str] = None
30+
trace_id: Optional[str] = None
31+
execution_id: Optional[str] = None
32+
file_sha256_hash: Optional[str] = None
33+
hosted_url: Optional[str] = None
34+
pipeline_stage: PipelineStage = PipelineStage.DATASET_PROCESSING
35+
error_message: Optional[str] = None
36+
37+
38+
# Batch execution class to store the trace of a batch execution
39+
@dataclass
40+
class BatchExecution:
41+
execution_id: str
42+
timestamp: datetime
43+
feeds_total: int

0 commit comments

Comments
 (0)