-
Notifications
You must be signed in to change notification settings - Fork 8
/
interfaces.py
80 lines (59 loc) · 1.35 KB
/
interfaces.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
from typing import List, Dict, Optional
from dataclasses import dataclass
from py_ts_interfaces import Interface
from dataclasses_json import DataClassJsonMixin
class Mixin(Interface, DataClassJsonMixin):
pass
@dataclass
class GHCommit(Mixin):
sha: str
unix_time_s: int
message: str
html_url: str
author_login: str
author_avatar_url: str
@dataclass
class TestResult(Mixin):
test_name: str
status: str
total_duration_s: float
is_labeled_flaky: bool
@dataclass
class BuildResult(Mixin):
sha: str
job_url: str
os: str
build_env: str
results: List[TestResult]
@dataclass
class SiteTravisLink(Mixin):
sha_short: str
commit_time: int
commit_message: str
build_env: str
job_url: str
os: str
@dataclass
class SiteCommitTooltip(Mixin):
num_failed: Optional[int]
num_flaky: Optional[int]
message: str
author_avatar: str
commit_url: str
@dataclass
class SiteStatItem(Mixin):
key: str
unit: str
value: float
desired_value: float
@dataclass
class SiteFailedTest(Mixin):
name: str
status_segment_bar: List[SiteCommitTooltip]
travis_links: List[SiteTravisLink]
build_time_stats: Optional[List[float]]
is_labeled_flaky: bool
@dataclass
class SiteDisplayRoot(Mixin):
failed_tests: List[SiteFailedTest]
stats: List[SiteStatItem]