awx-zipline-ai 0.2.1__py3-none-any.whl → 0.3.1__py3-none-any.whl
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.
- agent/ttypes.py +6 -6
- ai/chronon/airflow_helpers.py +20 -23
- ai/chronon/cli/__init__.py +0 -0
- ai/chronon/cli/compile/__init__.py +0 -0
- ai/chronon/cli/compile/column_hashing.py +40 -17
- ai/chronon/cli/compile/compile_context.py +13 -17
- ai/chronon/cli/compile/compiler.py +59 -36
- ai/chronon/cli/compile/conf_validator.py +251 -99
- ai/chronon/cli/compile/display/__init__.py +0 -0
- ai/chronon/cli/compile/display/class_tracker.py +6 -16
- ai/chronon/cli/compile/display/compile_status.py +10 -10
- ai/chronon/cli/compile/display/diff_result.py +79 -14
- ai/chronon/cli/compile/fill_templates.py +3 -8
- ai/chronon/cli/compile/parse_configs.py +10 -17
- ai/chronon/cli/compile/parse_teams.py +38 -34
- ai/chronon/cli/compile/serializer.py +3 -9
- ai/chronon/cli/compile/version_utils.py +42 -0
- ai/chronon/cli/git_utils.py +2 -13
- ai/chronon/cli/logger.py +0 -2
- ai/chronon/constants.py +1 -1
- ai/chronon/group_by.py +47 -47
- ai/chronon/join.py +46 -32
- ai/chronon/logger.py +1 -2
- ai/chronon/model.py +9 -4
- ai/chronon/query.py +2 -2
- ai/chronon/repo/__init__.py +1 -2
- ai/chronon/repo/aws.py +17 -31
- ai/chronon/repo/cluster.py +121 -50
- ai/chronon/repo/compile.py +14 -8
- ai/chronon/repo/constants.py +1 -1
- ai/chronon/repo/default_runner.py +32 -54
- ai/chronon/repo/explore.py +70 -73
- ai/chronon/repo/extract_objects.py +6 -9
- ai/chronon/repo/gcp.py +89 -88
- ai/chronon/repo/gitpython_utils.py +3 -2
- ai/chronon/repo/hub_runner.py +145 -55
- ai/chronon/repo/hub_uploader.py +2 -1
- ai/chronon/repo/init.py +12 -5
- ai/chronon/repo/join_backfill.py +19 -5
- ai/chronon/repo/run.py +42 -39
- ai/chronon/repo/serializer.py +4 -12
- ai/chronon/repo/utils.py +72 -63
- ai/chronon/repo/zipline.py +3 -19
- ai/chronon/repo/zipline_hub.py +211 -39
- ai/chronon/resources/__init__.py +0 -0
- ai/chronon/resources/gcp/__init__.py +0 -0
- ai/chronon/resources/gcp/group_bys/__init__.py +0 -0
- ai/chronon/resources/gcp/group_bys/test/data.py +13 -17
- ai/chronon/resources/gcp/joins/__init__.py +0 -0
- ai/chronon/resources/gcp/joins/test/data.py +4 -8
- ai/chronon/resources/gcp/sources/__init__.py +0 -0
- ai/chronon/resources/gcp/sources/test/data.py +9 -6
- ai/chronon/resources/gcp/teams.py +9 -21
- ai/chronon/source.py +2 -4
- ai/chronon/staging_query.py +60 -19
- ai/chronon/types.py +3 -2
- ai/chronon/utils.py +21 -68
- ai/chronon/windows.py +2 -4
- {awx_zipline_ai-0.2.1.dist-info → awx_zipline_ai-0.3.1.dist-info}/METADATA +48 -24
- awx_zipline_ai-0.3.1.dist-info/RECORD +96 -0
- awx_zipline_ai-0.3.1.dist-info/top_level.txt +4 -0
- gen_thrift/__init__.py +0 -0
- {ai/chronon → gen_thrift}/api/ttypes.py +327 -197
- {ai/chronon/api → gen_thrift}/common/ttypes.py +9 -39
- gen_thrift/eval/ttypes.py +660 -0
- {ai/chronon → gen_thrift}/hub/ttypes.py +12 -131
- {ai/chronon → gen_thrift}/observability/ttypes.py +343 -180
- {ai/chronon → gen_thrift}/planner/ttypes.py +326 -45
- ai/chronon/eval/__init__.py +0 -122
- ai/chronon/eval/query_parsing.py +0 -19
- ai/chronon/eval/sample_tables.py +0 -100
- ai/chronon/eval/table_scan.py +0 -186
- ai/chronon/orchestration/ttypes.py +0 -4406
- ai/chronon/resources/gcp/README.md +0 -174
- ai/chronon/resources/gcp/zipline-cli-install.sh +0 -54
- awx_zipline_ai-0.2.1.dist-info/RECORD +0 -93
- awx_zipline_ai-0.2.1.dist-info/licenses/LICENSE +0 -202
- awx_zipline_ai-0.2.1.dist-info/top_level.txt +0 -3
- /jars/__init__.py → /__init__.py +0 -0
- {awx_zipline_ai-0.2.1.dist-info → awx_zipline_ai-0.3.1.dist-info}/WHEEL +0 -0
- {awx_zipline_ai-0.2.1.dist-info → awx_zipline_ai-0.3.1.dist-info}/entry_points.txt +0 -0
- {ai/chronon → gen_thrift}/api/__init__.py +0 -0
- {ai/chronon/api/common → gen_thrift/api}/constants.py +0 -0
- {ai/chronon/api → gen_thrift}/common/__init__.py +0 -0
- {ai/chronon/api → gen_thrift/common}/constants.py +0 -0
- {ai/chronon/fetcher → gen_thrift/eval}/__init__.py +0 -0
- {ai/chronon/fetcher → gen_thrift/eval}/constants.py +0 -0
- {ai/chronon/hub → gen_thrift/fetcher}/__init__.py +0 -0
- {ai/chronon/hub → gen_thrift/fetcher}/constants.py +0 -0
- {ai/chronon → gen_thrift}/fetcher/ttypes.py +0 -0
- {ai/chronon/observability → gen_thrift/hub}/__init__.py +0 -0
- {ai/chronon/observability → gen_thrift/hub}/constants.py +0 -0
- {ai/chronon/orchestration → gen_thrift/observability}/__init__.py +0 -0
- {ai/chronon/orchestration → gen_thrift/observability}/constants.py +0 -0
- {ai/chronon → gen_thrift}/planner/__init__.py +0 -0
- {ai/chronon → gen_thrift}/planner/constants.py +0 -0
|
@@ -12,9 +12,8 @@ from thrift.TRecursive import fix_spec
|
|
|
12
12
|
from uuid import UUID
|
|
13
13
|
|
|
14
14
|
import sys
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import ai.chronon.orchestration.ttypes
|
|
15
|
+
import gen_thrift.common.ttypes
|
|
16
|
+
import gen_thrift.api.ttypes
|
|
18
17
|
|
|
19
18
|
from thrift.transport import TTransport
|
|
20
19
|
all_structs = []
|
|
@@ -38,21 +37,6 @@ class Direction(object):
|
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
|
|
41
|
-
class Mode(object):
|
|
42
|
-
ADHOC = 0
|
|
43
|
-
SCHEDULED = 1
|
|
44
|
-
|
|
45
|
-
_VALUES_TO_NAMES = {
|
|
46
|
-
0: "ADHOC",
|
|
47
|
-
1: "SCHEDULED",
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
_NAMES_TO_VALUES = {
|
|
51
|
-
"ADHOC": 0,
|
|
52
|
-
"SCHEDULED": 1,
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
40
|
class Status(object):
|
|
57
41
|
WAITING_FOR_UPSTREAM = 0
|
|
58
42
|
WAITING_FOR_RESOURCES = 1
|
|
@@ -178,78 +162,6 @@ class LineageRequest(object):
|
|
|
178
162
|
return not (self == other)
|
|
179
163
|
|
|
180
164
|
|
|
181
|
-
class LineageResponse(object):
|
|
182
|
-
"""
|
|
183
|
-
Attributes:
|
|
184
|
-
- nodeGraph
|
|
185
|
-
- mainNode
|
|
186
|
-
|
|
187
|
-
"""
|
|
188
|
-
thrift_spec = None
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
def __init__(self, nodeGraph = None, mainNode = None,):
|
|
192
|
-
self.nodeGraph = nodeGraph
|
|
193
|
-
self.mainNode = mainNode
|
|
194
|
-
|
|
195
|
-
def read(self, iprot):
|
|
196
|
-
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
197
|
-
iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
|
|
198
|
-
return
|
|
199
|
-
iprot.readStructBegin()
|
|
200
|
-
while True:
|
|
201
|
-
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
202
|
-
if ftype == TType.STOP:
|
|
203
|
-
break
|
|
204
|
-
if fid == 1:
|
|
205
|
-
if ftype == TType.STRUCT:
|
|
206
|
-
self.nodeGraph = ai.chronon.orchestration.ttypes.NodeGraph()
|
|
207
|
-
self.nodeGraph.read(iprot)
|
|
208
|
-
else:
|
|
209
|
-
iprot.skip(ftype)
|
|
210
|
-
elif fid == 2:
|
|
211
|
-
if ftype == TType.STRUCT:
|
|
212
|
-
self.mainNode = ai.chronon.orchestration.ttypes.NodeKey()
|
|
213
|
-
self.mainNode.read(iprot)
|
|
214
|
-
else:
|
|
215
|
-
iprot.skip(ftype)
|
|
216
|
-
else:
|
|
217
|
-
iprot.skip(ftype)
|
|
218
|
-
iprot.readFieldEnd()
|
|
219
|
-
iprot.readStructEnd()
|
|
220
|
-
|
|
221
|
-
def write(self, oprot):
|
|
222
|
-
self.validate()
|
|
223
|
-
if oprot._fast_encode is not None and self.thrift_spec is not None:
|
|
224
|
-
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
225
|
-
return
|
|
226
|
-
oprot.writeStructBegin('LineageResponse')
|
|
227
|
-
if self.nodeGraph is not None:
|
|
228
|
-
oprot.writeFieldBegin('nodeGraph', TType.STRUCT, 1)
|
|
229
|
-
self.nodeGraph.write(oprot)
|
|
230
|
-
oprot.writeFieldEnd()
|
|
231
|
-
if self.mainNode is not None:
|
|
232
|
-
oprot.writeFieldBegin('mainNode', TType.STRUCT, 2)
|
|
233
|
-
self.mainNode.write(oprot)
|
|
234
|
-
oprot.writeFieldEnd()
|
|
235
|
-
oprot.writeFieldStop()
|
|
236
|
-
oprot.writeStructEnd()
|
|
237
|
-
|
|
238
|
-
def validate(self):
|
|
239
|
-
return
|
|
240
|
-
|
|
241
|
-
def __repr__(self):
|
|
242
|
-
L = ['%s=%r' % (key, value)
|
|
243
|
-
for key, value in self.__dict__.items()]
|
|
244
|
-
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
245
|
-
|
|
246
|
-
def __eq__(self, other):
|
|
247
|
-
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
248
|
-
|
|
249
|
-
def __ne__(self, other):
|
|
250
|
-
return not (self == other)
|
|
251
|
-
|
|
252
|
-
|
|
253
165
|
class JobTrackerRequest(object):
|
|
254
166
|
"""
|
|
255
167
|
Attributes:
|
|
@@ -294,7 +206,7 @@ class JobTrackerRequest(object):
|
|
|
294
206
|
iprot.skip(ftype)
|
|
295
207
|
elif fid == 10:
|
|
296
208
|
if ftype == TType.STRUCT:
|
|
297
|
-
self.dateRange =
|
|
209
|
+
self.dateRange = gen_thrift.common.ttypes.DateRange()
|
|
298
210
|
self.dateRange.read(iprot)
|
|
299
211
|
else:
|
|
300
212
|
iprot.skip(ftype)
|
|
@@ -347,15 +259,13 @@ class JobTrackerResponse(object):
|
|
|
347
259
|
"""
|
|
348
260
|
Attributes:
|
|
349
261
|
- tasks
|
|
350
|
-
- mainNode
|
|
351
262
|
|
|
352
263
|
"""
|
|
353
264
|
thrift_spec = None
|
|
354
265
|
|
|
355
266
|
|
|
356
|
-
def __init__(self, tasks = None,
|
|
267
|
+
def __init__(self, tasks = None,):
|
|
357
268
|
self.tasks = tasks
|
|
358
|
-
self.mainNode = mainNode
|
|
359
269
|
|
|
360
270
|
def read(self, iprot):
|
|
361
271
|
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
|
|
@@ -377,12 +287,6 @@ class JobTrackerResponse(object):
|
|
|
377
287
|
iprot.readListEnd()
|
|
378
288
|
else:
|
|
379
289
|
iprot.skip(ftype)
|
|
380
|
-
elif fid == 2:
|
|
381
|
-
if ftype == TType.STRUCT:
|
|
382
|
-
self.mainNode = ai.chronon.orchestration.ttypes.NodeKey()
|
|
383
|
-
self.mainNode.read(iprot)
|
|
384
|
-
else:
|
|
385
|
-
iprot.skip(ftype)
|
|
386
290
|
else:
|
|
387
291
|
iprot.skip(ftype)
|
|
388
292
|
iprot.readFieldEnd()
|
|
@@ -401,10 +305,6 @@ class JobTrackerResponse(object):
|
|
|
401
305
|
iter6.write(oprot)
|
|
402
306
|
oprot.writeListEnd()
|
|
403
307
|
oprot.writeFieldEnd()
|
|
404
|
-
if self.mainNode is not None:
|
|
405
|
-
oprot.writeFieldBegin('mainNode', TType.STRUCT, 2)
|
|
406
|
-
self.mainNode.write(oprot)
|
|
407
|
-
oprot.writeFieldEnd()
|
|
408
308
|
oprot.writeFieldStop()
|
|
409
309
|
oprot.writeStructEnd()
|
|
410
310
|
|
|
@@ -616,7 +516,7 @@ class TaskInfo(object):
|
|
|
616
516
|
iprot.skip(ftype)
|
|
617
517
|
elif fid == 5:
|
|
618
518
|
if ftype == TType.STRUCT:
|
|
619
|
-
self.dateRange =
|
|
519
|
+
self.dateRange = gen_thrift.common.ttypes.DateRange()
|
|
620
520
|
self.dateRange.read(iprot)
|
|
621
521
|
else:
|
|
622
522
|
iprot.skip(ftype)
|
|
@@ -917,7 +817,6 @@ class TaskResources(object):
|
|
|
917
817
|
class Submission(object):
|
|
918
818
|
"""
|
|
919
819
|
Attributes:
|
|
920
|
-
- node
|
|
921
820
|
- submittedTs
|
|
922
821
|
- finishedTs
|
|
923
822
|
- dateRange
|
|
@@ -926,8 +825,7 @@ class Submission(object):
|
|
|
926
825
|
thrift_spec = None
|
|
927
826
|
|
|
928
827
|
|
|
929
|
-
def __init__(self,
|
|
930
|
-
self.node = node
|
|
828
|
+
def __init__(self, submittedTs = None, finishedTs = None, dateRange = None,):
|
|
931
829
|
self.submittedTs = submittedTs
|
|
932
830
|
self.finishedTs = finishedTs
|
|
933
831
|
self.dateRange = dateRange
|
|
@@ -941,13 +839,7 @@ class Submission(object):
|
|
|
941
839
|
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
942
840
|
if ftype == TType.STOP:
|
|
943
841
|
break
|
|
944
|
-
if fid ==
|
|
945
|
-
if ftype == TType.STRUCT:
|
|
946
|
-
self.node = ai.chronon.orchestration.ttypes.NodeKey()
|
|
947
|
-
self.node.read(iprot)
|
|
948
|
-
else:
|
|
949
|
-
iprot.skip(ftype)
|
|
950
|
-
elif fid == 10:
|
|
842
|
+
if fid == 10:
|
|
951
843
|
if ftype == TType.I64:
|
|
952
844
|
self.submittedTs = iprot.readI64()
|
|
953
845
|
else:
|
|
@@ -959,7 +851,7 @@ class Submission(object):
|
|
|
959
851
|
iprot.skip(ftype)
|
|
960
852
|
elif fid == 21:
|
|
961
853
|
if ftype == TType.STRUCT:
|
|
962
|
-
self.dateRange =
|
|
854
|
+
self.dateRange = gen_thrift.common.ttypes.DateRange()
|
|
963
855
|
self.dateRange.read(iprot)
|
|
964
856
|
else:
|
|
965
857
|
iprot.skip(ftype)
|
|
@@ -974,10 +866,6 @@ class Submission(object):
|
|
|
974
866
|
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
|
|
975
867
|
return
|
|
976
868
|
oprot.writeStructBegin('Submission')
|
|
977
|
-
if self.node is not None:
|
|
978
|
-
oprot.writeFieldBegin('node', TType.STRUCT, 1)
|
|
979
|
-
self.node.write(oprot)
|
|
980
|
-
oprot.writeFieldEnd()
|
|
981
869
|
if self.submittedTs is not None:
|
|
982
870
|
oprot.writeFieldBegin('submittedTs', TType.I64, 10)
|
|
983
871
|
oprot.writeI64(self.submittedTs)
|
|
@@ -1106,12 +994,6 @@ LineageRequest.thrift_spec = (
|
|
|
1106
994
|
(3, TType.STRING, 'branch', 'UTF8', None, ), # 3
|
|
1107
995
|
(4, TType.I32, 'direction', None, None, ), # 4
|
|
1108
996
|
)
|
|
1109
|
-
all_structs.append(LineageResponse)
|
|
1110
|
-
LineageResponse.thrift_spec = (
|
|
1111
|
-
None, # 0
|
|
1112
|
-
(1, TType.STRUCT, 'nodeGraph', [ai.chronon.orchestration.ttypes.NodeGraph, None], None, ), # 1
|
|
1113
|
-
(2, TType.STRUCT, 'mainNode', [ai.chronon.orchestration.ttypes.NodeKey, None], None, ), # 2
|
|
1114
|
-
)
|
|
1115
997
|
all_structs.append(JobTrackerRequest)
|
|
1116
998
|
JobTrackerRequest.thrift_spec = (
|
|
1117
999
|
None, # 0
|
|
@@ -1124,13 +1006,12 @@ JobTrackerRequest.thrift_spec = (
|
|
|
1124
1006
|
None, # 7
|
|
1125
1007
|
None, # 8
|
|
1126
1008
|
None, # 9
|
|
1127
|
-
(10, TType.STRUCT, 'dateRange', [
|
|
1009
|
+
(10, TType.STRUCT, 'dateRange', [gen_thrift.common.ttypes.DateRange, None], None, ), # 10
|
|
1128
1010
|
)
|
|
1129
1011
|
all_structs.append(JobTrackerResponse)
|
|
1130
1012
|
JobTrackerResponse.thrift_spec = (
|
|
1131
1013
|
None, # 0
|
|
1132
1014
|
(1, TType.LIST, 'tasks', (TType.STRUCT, [TaskInfo, None], False), None, ), # 1
|
|
1133
|
-
(2, TType.STRUCT, 'mainNode', [ai.chronon.orchestration.ttypes.NodeKey, None], None, ), # 2
|
|
1134
1015
|
)
|
|
1135
1016
|
all_structs.append(SubmissionsRequest)
|
|
1136
1017
|
SubmissionsRequest.thrift_spec = (
|
|
@@ -1149,7 +1030,7 @@ TaskInfo.thrift_spec = (
|
|
|
1149
1030
|
(2, TType.STRING, 'logPath', 'UTF8', None, ), # 2
|
|
1150
1031
|
(3, TType.STRING, 'trackerUrl', 'UTF8', None, ), # 3
|
|
1151
1032
|
(4, TType.STRUCT, 'taskArgs', [TaskArgs, None], None, ), # 4
|
|
1152
|
-
(5, TType.STRUCT, 'dateRange', [
|
|
1033
|
+
(5, TType.STRUCT, 'dateRange', [gen_thrift.common.ttypes.DateRange, None], None, ), # 5
|
|
1153
1034
|
None, # 6
|
|
1154
1035
|
None, # 7
|
|
1155
1036
|
None, # 8
|
|
@@ -1194,7 +1075,7 @@ TaskResources.thrift_spec = (
|
|
|
1194
1075
|
all_structs.append(Submission)
|
|
1195
1076
|
Submission.thrift_spec = (
|
|
1196
1077
|
None, # 0
|
|
1197
|
-
|
|
1078
|
+
None, # 1
|
|
1198
1079
|
None, # 2
|
|
1199
1080
|
None, # 3
|
|
1200
1081
|
None, # 4
|
|
@@ -1214,7 +1095,7 @@ Submission.thrift_spec = (
|
|
|
1214
1095
|
None, # 18
|
|
1215
1096
|
None, # 19
|
|
1216
1097
|
(20, TType.I64, 'finishedTs', None, None, ), # 20
|
|
1217
|
-
(21, TType.STRUCT, 'dateRange', [
|
|
1098
|
+
(21, TType.STRUCT, 'dateRange', [gen_thrift.common.ttypes.DateRange, None], None, ), # 21
|
|
1218
1099
|
)
|
|
1219
1100
|
all_structs.append(ConfRequest)
|
|
1220
1101
|
ConfRequest.thrift_spec = (
|