divi 0.0.1.dev8__tar.gz → 0.0.1.dev10__tar.gz
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.
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/Makefile +3 -4
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/PKG-INFO +1 -1
- divi-0.0.1.dev10/core/proto/core.pb.go +74 -0
- {divi-0.0.1.dev8/divi/proto/core/v1/go → divi-0.0.1.dev10/core/proto}/core_grpc.pb.go +5 -5
- divi-0.0.1.dev10/core/proto/health.pb.go +215 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/divi/__init__.py +1 -1
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/divi/core/run.py +2 -3
- divi-0.0.1.dev10/divi/proto/core.proto +12 -0
- divi-0.0.1.dev8/divi/proto/core/v1/health_check_request_pb2.py → divi-0.0.1.dev10/divi/proto/core_pb2.py +8 -7
- divi-0.0.1.dev10/divi/proto/core_pb2.pyi +5 -0
- {divi-0.0.1.dev8/divi/proto/core/v1 → divi-0.0.1.dev10/divi/proto}/core_pb2_grpc.py +12 -13
- divi-0.0.1.dev10/divi/proto/health.proto +12 -0
- divi-0.0.1.dev8/divi/proto/core/v1/health_check_response_pb2.py → divi-0.0.1.dev10/divi/proto/health_pb2.py +9 -7
- divi-0.0.1.dev8/divi/proto/core/v1/health_check_response_pb2.pyi → divi-0.0.1.dev10/divi/proto/health_pb2.pyi +6 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/hatch.toml +1 -1
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/pyproject.toml +2 -5
- {divi-0.0.1.dev8 → divi-0.0.1.dev10/scripts}/hatch_build.py +34 -0
- divi-0.0.1.dev10/scripts/proto_build.py +50 -0
- divi-0.0.1.dev8/core/proto/core.pb.go +0 -83
- divi-0.0.1.dev8/core/proto/core_grpc.pb.go +0 -125
- divi-0.0.1.dev8/core/proto/health_check_request.pb.go +0 -147
- divi-0.0.1.dev8/core/proto/health_check_response.pb.go +0 -156
- divi-0.0.1.dev8/divi/proto/core/v1/core.proto +0 -13
- divi-0.0.1.dev8/divi/proto/core/v1/core_pb2.py +0 -39
- divi-0.0.1.dev8/divi/proto/core/v1/core_pb2.pyi +0 -6
- divi-0.0.1.dev8/divi/proto/core/v1/go/core.pb.go +0 -83
- divi-0.0.1.dev8/divi/proto/core/v1/go/health_check_request.pb.go +0 -147
- divi-0.0.1.dev8/divi/proto/core/v1/go/health_check_response.pb.go +0 -156
- divi-0.0.1.dev8/divi/proto/core/v1/health_check_request.proto +0 -7
- divi-0.0.1.dev8/divi/proto/core/v1/health_check_request_pb2.pyi +0 -11
- divi-0.0.1.dev8/divi/proto/core/v1/health_check_request_pb2_grpc.py +0 -24
- divi-0.0.1.dev8/divi/proto/core/v1/health_check_response.proto +0 -10
- divi-0.0.1.dev8/divi/proto/core/v1/health_check_response_pb2_grpc.py +0 -24
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/.gitignore +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/LICENSE +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/README.md +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/apps/README.md +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/core/README.md +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/core/go.mod +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/core/go.sum +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/core/main.go +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/divi/core/__init__.py +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/divi/core/finish.py +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/divi/core/init.py +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/divi/utils.py +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/docs/README.md +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10/docs}/package_readme.md +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/go.work +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/go.work.sum +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/packages/README.md +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/scripts/README.md +0 -0
- {divi-0.0.1.dev8 → divi-0.0.1.dev10}/uv.lock +0 -0
@@ -3,16 +3,15 @@ all: build
|
|
3
3
|
protobuf:
|
4
4
|
protoc --go_out=. --go_opt=paths=source_relative \
|
5
5
|
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
|
6
|
-
divi/proto/
|
6
|
+
divi/proto/health_check_response.proto
|
7
7
|
|
8
|
-
mv divi/proto/
|
9
|
-
cp divi/proto/core/v1/go/* core/proto/
|
8
|
+
mv divi/proto/v1/*.go core/proto/
|
10
9
|
|
11
10
|
python3 -m grpc_tools.protoc -Idivi/proto=divi/proto \
|
12
11
|
--python_out=. \
|
13
12
|
--pyi_out=. \
|
14
13
|
--grpc_python_out=. \
|
15
|
-
divi/proto/
|
14
|
+
divi/proto/health_check_response.proto
|
16
15
|
|
17
16
|
build:
|
18
17
|
cd core && go build -o ../divi/bin/core main.go
|
@@ -0,0 +1,74 @@
|
|
1
|
+
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2
|
+
// versions:
|
3
|
+
// protoc-gen-go v1.33.0
|
4
|
+
// protoc v5.29.0
|
5
|
+
// source: divi/proto/core.proto
|
6
|
+
|
7
|
+
package proto
|
8
|
+
|
9
|
+
import (
|
10
|
+
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
11
|
+
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
12
|
+
reflect "reflect"
|
13
|
+
)
|
14
|
+
|
15
|
+
const (
|
16
|
+
// Verify that this generated code is sufficiently up-to-date.
|
17
|
+
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
18
|
+
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
19
|
+
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
20
|
+
)
|
21
|
+
|
22
|
+
var File_divi_proto_core_proto protoreflect.FileDescriptor
|
23
|
+
|
24
|
+
var file_divi_proto_core_proto_rawDesc = []byte{
|
25
|
+
0x0a, 0x15, 0x64, 0x69, 0x76, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x72,
|
26
|
+
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x17, 0x64,
|
27
|
+
0x69, 0x76, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68,
|
28
|
+
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x46, 0x0a, 0x04, 0x43, 0x6f, 0x72, 0x65, 0x12, 0x3e,
|
29
|
+
0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48,
|
30
|
+
0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
31
|
+
0x74, 0x1a, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43,
|
32
|
+
0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0c,
|
33
|
+
0x5a, 0x0a, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72,
|
34
|
+
0x6f, 0x74, 0x6f, 0x33,
|
35
|
+
}
|
36
|
+
|
37
|
+
var file_divi_proto_core_proto_goTypes = []interface{}{
|
38
|
+
(*HealthCheckRequest)(nil), // 0: core.HealthCheckRequest
|
39
|
+
(*HealthCheckResponse)(nil), // 1: core.HealthCheckResponse
|
40
|
+
}
|
41
|
+
var file_divi_proto_core_proto_depIdxs = []int32{
|
42
|
+
0, // 0: core.Core.Check:input_type -> core.HealthCheckRequest
|
43
|
+
1, // 1: core.Core.Check:output_type -> core.HealthCheckResponse
|
44
|
+
1, // [1:2] is the sub-list for method output_type
|
45
|
+
0, // [0:1] is the sub-list for method input_type
|
46
|
+
0, // [0:0] is the sub-list for extension type_name
|
47
|
+
0, // [0:0] is the sub-list for extension extendee
|
48
|
+
0, // [0:0] is the sub-list for field type_name
|
49
|
+
}
|
50
|
+
|
51
|
+
func init() { file_divi_proto_core_proto_init() }
|
52
|
+
func file_divi_proto_core_proto_init() {
|
53
|
+
if File_divi_proto_core_proto != nil {
|
54
|
+
return
|
55
|
+
}
|
56
|
+
file_divi_proto_health_proto_init()
|
57
|
+
type x struct{}
|
58
|
+
out := protoimpl.TypeBuilder{
|
59
|
+
File: protoimpl.DescBuilder{
|
60
|
+
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
61
|
+
RawDescriptor: file_divi_proto_core_proto_rawDesc,
|
62
|
+
NumEnums: 0,
|
63
|
+
NumMessages: 0,
|
64
|
+
NumExtensions: 0,
|
65
|
+
NumServices: 1,
|
66
|
+
},
|
67
|
+
GoTypes: file_divi_proto_core_proto_goTypes,
|
68
|
+
DependencyIndexes: file_divi_proto_core_proto_depIdxs,
|
69
|
+
}.Build()
|
70
|
+
File_divi_proto_core_proto = out.File
|
71
|
+
file_divi_proto_core_proto_rawDesc = nil
|
72
|
+
file_divi_proto_core_proto_goTypes = nil
|
73
|
+
file_divi_proto_core_proto_depIdxs = nil
|
74
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
2
2
|
// versions:
|
3
3
|
// - protoc-gen-go-grpc v1.5.1
|
4
|
-
// - protoc
|
5
|
-
// source: divi/proto/core
|
4
|
+
// - protoc v5.29.0
|
5
|
+
// source: divi/proto/core.proto
|
6
6
|
|
7
7
|
package proto
|
8
8
|
|
@@ -19,7 +19,7 @@ import (
|
|
19
19
|
const _ = grpc.SupportPackageIsVersion9
|
20
20
|
|
21
21
|
const (
|
22
|
-
Core_Check_FullMethodName = "/core.
|
22
|
+
Core_Check_FullMethodName = "/core.Core/Check"
|
23
23
|
)
|
24
24
|
|
25
25
|
// CoreClient is the client API for Core service.
|
@@ -112,7 +112,7 @@ func _Core_Check_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
|
112
112
|
// It's only intended for direct use with grpc.RegisterService,
|
113
113
|
// and not to be introspected or modified (even as a copy)
|
114
114
|
var Core_ServiceDesc = grpc.ServiceDesc{
|
115
|
-
ServiceName: "core.
|
115
|
+
ServiceName: "core.Core",
|
116
116
|
HandlerType: (*CoreServer)(nil),
|
117
117
|
Methods: []grpc.MethodDesc{
|
118
118
|
{
|
@@ -121,5 +121,5 @@ var Core_ServiceDesc = grpc.ServiceDesc{
|
|
121
121
|
},
|
122
122
|
},
|
123
123
|
Streams: []grpc.StreamDesc{},
|
124
|
-
Metadata: "divi/proto/core
|
124
|
+
Metadata: "divi/proto/core.proto",
|
125
125
|
}
|
@@ -0,0 +1,215 @@
|
|
1
|
+
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2
|
+
// versions:
|
3
|
+
// protoc-gen-go v1.33.0
|
4
|
+
// protoc v5.29.0
|
5
|
+
// source: divi/proto/health.proto
|
6
|
+
|
7
|
+
package proto
|
8
|
+
|
9
|
+
import (
|
10
|
+
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
11
|
+
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
12
|
+
reflect "reflect"
|
13
|
+
sync "sync"
|
14
|
+
)
|
15
|
+
|
16
|
+
const (
|
17
|
+
// Verify that this generated code is sufficiently up-to-date.
|
18
|
+
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
19
|
+
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
20
|
+
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
21
|
+
)
|
22
|
+
|
23
|
+
type HealthCheckRequest struct {
|
24
|
+
state protoimpl.MessageState
|
25
|
+
sizeCache protoimpl.SizeCache
|
26
|
+
unknownFields protoimpl.UnknownFields
|
27
|
+
|
28
|
+
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
|
29
|
+
}
|
30
|
+
|
31
|
+
func (x *HealthCheckRequest) Reset() {
|
32
|
+
*x = HealthCheckRequest{}
|
33
|
+
if protoimpl.UnsafeEnabled {
|
34
|
+
mi := &file_divi_proto_health_proto_msgTypes[0]
|
35
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
36
|
+
ms.StoreMessageInfo(mi)
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
func (x *HealthCheckRequest) String() string {
|
41
|
+
return protoimpl.X.MessageStringOf(x)
|
42
|
+
}
|
43
|
+
|
44
|
+
func (*HealthCheckRequest) ProtoMessage() {}
|
45
|
+
|
46
|
+
func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message {
|
47
|
+
mi := &file_divi_proto_health_proto_msgTypes[0]
|
48
|
+
if protoimpl.UnsafeEnabled && x != nil {
|
49
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
50
|
+
if ms.LoadMessageInfo() == nil {
|
51
|
+
ms.StoreMessageInfo(mi)
|
52
|
+
}
|
53
|
+
return ms
|
54
|
+
}
|
55
|
+
return mi.MessageOf(x)
|
56
|
+
}
|
57
|
+
|
58
|
+
// Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.
|
59
|
+
func (*HealthCheckRequest) Descriptor() ([]byte, []int) {
|
60
|
+
return file_divi_proto_health_proto_rawDescGZIP(), []int{0}
|
61
|
+
}
|
62
|
+
|
63
|
+
func (x *HealthCheckRequest) GetVersion() string {
|
64
|
+
if x != nil {
|
65
|
+
return x.Version
|
66
|
+
}
|
67
|
+
return ""
|
68
|
+
}
|
69
|
+
|
70
|
+
type HealthCheckResponse struct {
|
71
|
+
state protoimpl.MessageState
|
72
|
+
sizeCache protoimpl.SizeCache
|
73
|
+
unknownFields protoimpl.UnknownFields
|
74
|
+
|
75
|
+
Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
|
76
|
+
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
77
|
+
}
|
78
|
+
|
79
|
+
func (x *HealthCheckResponse) Reset() {
|
80
|
+
*x = HealthCheckResponse{}
|
81
|
+
if protoimpl.UnsafeEnabled {
|
82
|
+
mi := &file_divi_proto_health_proto_msgTypes[1]
|
83
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
84
|
+
ms.StoreMessageInfo(mi)
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
func (x *HealthCheckResponse) String() string {
|
89
|
+
return protoimpl.X.MessageStringOf(x)
|
90
|
+
}
|
91
|
+
|
92
|
+
func (*HealthCheckResponse) ProtoMessage() {}
|
93
|
+
|
94
|
+
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message {
|
95
|
+
mi := &file_divi_proto_health_proto_msgTypes[1]
|
96
|
+
if protoimpl.UnsafeEnabled && x != nil {
|
97
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
98
|
+
if ms.LoadMessageInfo() == nil {
|
99
|
+
ms.StoreMessageInfo(mi)
|
100
|
+
}
|
101
|
+
return ms
|
102
|
+
}
|
103
|
+
return mi.MessageOf(x)
|
104
|
+
}
|
105
|
+
|
106
|
+
// Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
|
107
|
+
func (*HealthCheckResponse) Descriptor() ([]byte, []int) {
|
108
|
+
return file_divi_proto_health_proto_rawDescGZIP(), []int{1}
|
109
|
+
}
|
110
|
+
|
111
|
+
func (x *HealthCheckResponse) GetStatus() bool {
|
112
|
+
if x != nil {
|
113
|
+
return x.Status
|
114
|
+
}
|
115
|
+
return false
|
116
|
+
}
|
117
|
+
|
118
|
+
func (x *HealthCheckResponse) GetMessage() string {
|
119
|
+
if x != nil {
|
120
|
+
return x.Message
|
121
|
+
}
|
122
|
+
return ""
|
123
|
+
}
|
124
|
+
|
125
|
+
var File_divi_proto_health_proto protoreflect.FileDescriptor
|
126
|
+
|
127
|
+
var file_divi_proto_health_proto_rawDesc = []byte{
|
128
|
+
0x0a, 0x17, 0x64, 0x69, 0x76, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x61,
|
129
|
+
0x6c, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x63, 0x6f, 0x72, 0x65, 0x22,
|
130
|
+
0x2e, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
|
131
|
+
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
132
|
+
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22,
|
133
|
+
0x47, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
|
134
|
+
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
135
|
+
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18,
|
136
|
+
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
137
|
+
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x0c, 0x5a, 0x0a, 0x63, 0x6f, 0x72, 0x65,
|
138
|
+
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
139
|
+
}
|
140
|
+
|
141
|
+
var (
|
142
|
+
file_divi_proto_health_proto_rawDescOnce sync.Once
|
143
|
+
file_divi_proto_health_proto_rawDescData = file_divi_proto_health_proto_rawDesc
|
144
|
+
)
|
145
|
+
|
146
|
+
func file_divi_proto_health_proto_rawDescGZIP() []byte {
|
147
|
+
file_divi_proto_health_proto_rawDescOnce.Do(func() {
|
148
|
+
file_divi_proto_health_proto_rawDescData = protoimpl.X.CompressGZIP(file_divi_proto_health_proto_rawDescData)
|
149
|
+
})
|
150
|
+
return file_divi_proto_health_proto_rawDescData
|
151
|
+
}
|
152
|
+
|
153
|
+
var file_divi_proto_health_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
154
|
+
var file_divi_proto_health_proto_goTypes = []interface{}{
|
155
|
+
(*HealthCheckRequest)(nil), // 0: core.HealthCheckRequest
|
156
|
+
(*HealthCheckResponse)(nil), // 1: core.HealthCheckResponse
|
157
|
+
}
|
158
|
+
var file_divi_proto_health_proto_depIdxs = []int32{
|
159
|
+
0, // [0:0] is the sub-list for method output_type
|
160
|
+
0, // [0:0] is the sub-list for method input_type
|
161
|
+
0, // [0:0] is the sub-list for extension type_name
|
162
|
+
0, // [0:0] is the sub-list for extension extendee
|
163
|
+
0, // [0:0] is the sub-list for field type_name
|
164
|
+
}
|
165
|
+
|
166
|
+
func init() { file_divi_proto_health_proto_init() }
|
167
|
+
func file_divi_proto_health_proto_init() {
|
168
|
+
if File_divi_proto_health_proto != nil {
|
169
|
+
return
|
170
|
+
}
|
171
|
+
if !protoimpl.UnsafeEnabled {
|
172
|
+
file_divi_proto_health_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
173
|
+
switch v := v.(*HealthCheckRequest); i {
|
174
|
+
case 0:
|
175
|
+
return &v.state
|
176
|
+
case 1:
|
177
|
+
return &v.sizeCache
|
178
|
+
case 2:
|
179
|
+
return &v.unknownFields
|
180
|
+
default:
|
181
|
+
return nil
|
182
|
+
}
|
183
|
+
}
|
184
|
+
file_divi_proto_health_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
185
|
+
switch v := v.(*HealthCheckResponse); i {
|
186
|
+
case 0:
|
187
|
+
return &v.state
|
188
|
+
case 1:
|
189
|
+
return &v.sizeCache
|
190
|
+
case 2:
|
191
|
+
return &v.unknownFields
|
192
|
+
default:
|
193
|
+
return nil
|
194
|
+
}
|
195
|
+
}
|
196
|
+
}
|
197
|
+
type x struct{}
|
198
|
+
out := protoimpl.TypeBuilder{
|
199
|
+
File: protoimpl.DescBuilder{
|
200
|
+
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
201
|
+
RawDescriptor: file_divi_proto_health_proto_rawDesc,
|
202
|
+
NumEnums: 0,
|
203
|
+
NumMessages: 2,
|
204
|
+
NumExtensions: 0,
|
205
|
+
NumServices: 0,
|
206
|
+
},
|
207
|
+
GoTypes: file_divi_proto_health_proto_goTypes,
|
208
|
+
DependencyIndexes: file_divi_proto_health_proto_depIdxs,
|
209
|
+
MessageInfos: file_divi_proto_health_proto_msgTypes,
|
210
|
+
}.Build()
|
211
|
+
File_divi_proto_health_proto = out.File
|
212
|
+
file_divi_proto_health_proto_rawDesc = nil
|
213
|
+
file_divi_proto_health_proto_goTypes = nil
|
214
|
+
file_divi_proto_health_proto_depIdxs = nil
|
215
|
+
}
|
@@ -5,9 +5,8 @@ from typing import List, Optional, Callable
|
|
5
5
|
|
6
6
|
import divi
|
7
7
|
|
8
|
-
from divi.proto.
|
9
|
-
from divi.proto.
|
10
|
-
from divi.proto.core.v1.health_check_response_pb2 import HealthCheckResponse
|
8
|
+
from divi.proto.core_pb2_grpc import CoreStub
|
9
|
+
from divi.proto.health_pb2 import HealthCheckRequest, HealthCheckResponse
|
11
10
|
|
12
11
|
|
13
12
|
class Run:
|
@@ -0,0 +1,12 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
package core;
|
4
|
+
|
5
|
+
import "divi/proto/health.proto";
|
6
|
+
|
7
|
+
option go_package = "core/proto";
|
8
|
+
|
9
|
+
// Health is a service that implements health check.
|
10
|
+
service Core {
|
11
|
+
rpc Check(HealthCheckRequest) returns (HealthCheckResponse) {}
|
12
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
4
|
-
# source: divi/proto/core
|
4
|
+
# source: divi/proto/core.proto
|
5
5
|
# Protobuf Python Version: 5.29.0
|
6
6
|
"""Generated protocol buffer code."""
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
@@ -15,23 +15,24 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
15
15
|
29,
|
16
16
|
0,
|
17
17
|
'',
|
18
|
-
'divi/proto/core
|
18
|
+
'divi/proto/core.proto'
|
19
19
|
)
|
20
20
|
# @@protoc_insertion_point(imports)
|
21
21
|
|
22
22
|
_sym_db = _symbol_database.Default()
|
23
23
|
|
24
24
|
|
25
|
+
from divi.proto import health_pb2 as divi_dot_proto_dot_health__pb2
|
25
26
|
|
26
27
|
|
27
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x64ivi/proto/core.proto\x12\x04\x63ore\x1a\x17\x64ivi/proto/health.proto2F\n\x04\x43ore\x12>\n\x05\x43heck\x12\x18.core.HealthCheckRequest\x1a\x19.core.HealthCheckResponse\"\x00\x42\x0cZ\ncore/protob\x06proto3')
|
28
29
|
|
29
30
|
_globals = globals()
|
30
31
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
31
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'divi.proto.
|
32
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'divi.proto.core_pb2', _globals)
|
32
33
|
if not _descriptor._USE_C_DESCRIPTORS:
|
33
34
|
_globals['DESCRIPTOR']._loaded_options = None
|
34
|
-
_globals['DESCRIPTOR']._serialized_options = b'
|
35
|
-
_globals['
|
36
|
-
_globals['
|
35
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\ncore/proto'
|
36
|
+
_globals['_CORE']._serialized_start=56
|
37
|
+
_globals['_CORE']._serialized_end=126
|
37
38
|
# @@protoc_insertion_point(module_scope)
|
@@ -3,8 +3,7 @@
|
|
3
3
|
import grpc
|
4
4
|
import warnings
|
5
5
|
|
6
|
-
from divi.proto
|
7
|
-
from divi.proto.core.v1 import health_check_response_pb2 as divi_dot_proto_dot_core_dot_v1_dot_health__check__response__pb2
|
6
|
+
from divi.proto import health_pb2 as divi_dot_proto_dot_health__pb2
|
8
7
|
|
9
8
|
GRPC_GENERATED_VERSION = '1.69.0'
|
10
9
|
GRPC_VERSION = grpc.__version__
|
@@ -19,7 +18,7 @@ except ImportError:
|
|
19
18
|
if _version_not_supported:
|
20
19
|
raise RuntimeError(
|
21
20
|
f'The grpc package installed is at version {GRPC_VERSION},'
|
22
|
-
+ f' but the generated code in divi/proto/
|
21
|
+
+ f' but the generated code in divi/proto/core_pb2_grpc.py depends on'
|
23
22
|
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
24
23
|
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
25
24
|
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
@@ -37,9 +36,9 @@ class CoreStub(object):
|
|
37
36
|
channel: A grpc.Channel.
|
38
37
|
"""
|
39
38
|
self.Check = channel.unary_unary(
|
40
|
-
'/core.
|
41
|
-
request_serializer=
|
42
|
-
response_deserializer=
|
39
|
+
'/core.Core/Check',
|
40
|
+
request_serializer=divi_dot_proto_dot_health__pb2.HealthCheckRequest.SerializeToString,
|
41
|
+
response_deserializer=divi_dot_proto_dot_health__pb2.HealthCheckResponse.FromString,
|
43
42
|
_registered_method=True)
|
44
43
|
|
45
44
|
|
@@ -58,14 +57,14 @@ def add_CoreServicer_to_server(servicer, server):
|
|
58
57
|
rpc_method_handlers = {
|
59
58
|
'Check': grpc.unary_unary_rpc_method_handler(
|
60
59
|
servicer.Check,
|
61
|
-
request_deserializer=
|
62
|
-
response_serializer=
|
60
|
+
request_deserializer=divi_dot_proto_dot_health__pb2.HealthCheckRequest.FromString,
|
61
|
+
response_serializer=divi_dot_proto_dot_health__pb2.HealthCheckResponse.SerializeToString,
|
63
62
|
),
|
64
63
|
}
|
65
64
|
generic_handler = grpc.method_handlers_generic_handler(
|
66
|
-
'core.
|
65
|
+
'core.Core', rpc_method_handlers)
|
67
66
|
server.add_generic_rpc_handlers((generic_handler,))
|
68
|
-
server.add_registered_method_handlers('core.
|
67
|
+
server.add_registered_method_handlers('core.Core', rpc_method_handlers)
|
69
68
|
|
70
69
|
|
71
70
|
# This class is part of an EXPERIMENTAL API.
|
@@ -87,9 +86,9 @@ class Core(object):
|
|
87
86
|
return grpc.experimental.unary_unary(
|
88
87
|
request,
|
89
88
|
target,
|
90
|
-
'/core.
|
91
|
-
|
92
|
-
|
89
|
+
'/core.Core/Check',
|
90
|
+
divi_dot_proto_dot_health__pb2.HealthCheckRequest.SerializeToString,
|
91
|
+
divi_dot_proto_dot_health__pb2.HealthCheckResponse.FromString,
|
93
92
|
options,
|
94
93
|
channel_credentials,
|
95
94
|
insecure,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
4
|
-
# source: divi/proto/
|
4
|
+
# source: divi/proto/health.proto
|
5
5
|
# Protobuf Python Version: 5.29.0
|
6
6
|
"""Generated protocol buffer code."""
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
@@ -15,7 +15,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
15
15
|
29,
|
16
16
|
0,
|
17
17
|
'',
|
18
|
-
'divi/proto/
|
18
|
+
'divi/proto/health.proto'
|
19
19
|
)
|
20
20
|
# @@protoc_insertion_point(imports)
|
21
21
|
|
@@ -24,14 +24,16 @@ _sym_db = _symbol_database.Default()
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x64ivi/proto/health.proto\x12\x04\x63ore\"%\n\x12HealthCheckRequest\x12\x0f\n\x07version\x18\x01 \x01(\t\"6\n\x13HealthCheckResponse\x12\x0e\n\x06status\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\tB\x0cZ\ncore/protob\x06proto3')
|
28
28
|
|
29
29
|
_globals = globals()
|
30
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
31
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'divi.proto.
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'divi.proto.health_pb2', _globals)
|
32
32
|
if not _descriptor._USE_C_DESCRIPTORS:
|
33
33
|
_globals['DESCRIPTOR']._loaded_options = None
|
34
|
-
_globals['DESCRIPTOR']._serialized_options = b'
|
35
|
-
_globals['
|
36
|
-
_globals['
|
34
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\ncore/proto'
|
35
|
+
_globals['_HEALTHCHECKREQUEST']._serialized_start=33
|
36
|
+
_globals['_HEALTHCHECKREQUEST']._serialized_end=70
|
37
|
+
_globals['_HEALTHCHECKRESPONSE']._serialized_start=72
|
38
|
+
_globals['_HEALTHCHECKRESPONSE']._serialized_end=126
|
37
39
|
# @@protoc_insertion_point(module_scope)
|
@@ -4,6 +4,12 @@ from typing import ClassVar as _ClassVar, Optional as _Optional
|
|
4
4
|
|
5
5
|
DESCRIPTOR: _descriptor.FileDescriptor
|
6
6
|
|
7
|
+
class HealthCheckRequest(_message.Message):
|
8
|
+
__slots__ = ("version",)
|
9
|
+
VERSION_FIELD_NUMBER: _ClassVar[int]
|
10
|
+
version: str
|
11
|
+
def __init__(self, version: _Optional[str] = ...) -> None: ...
|
12
|
+
|
7
13
|
class HealthCheckResponse(_message.Message):
|
8
14
|
__slots__ = ("status", "message")
|
9
15
|
STATUS_FIELD_NUMBER: _ClassVar[int]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
name = "divi"
|
3
3
|
dynamic = ["version"]
|
4
4
|
description = "The Agent Platform for Observability & Evaluation"
|
5
|
-
readme = "package_readme.md"
|
5
|
+
readme = "docs/package_readme.md"
|
6
6
|
requires-python = ">=3.11"
|
7
7
|
dependencies = ["grpcio>=1.69.0", "protobuf>=5.29.3"]
|
8
8
|
|
@@ -11,10 +11,7 @@ requires = ["hatchling"]
|
|
11
11
|
build-backend = "hatchling.build"
|
12
12
|
|
13
13
|
[dependency-groups]
|
14
|
-
dev = [
|
15
|
-
"grpcio-tools>=1.69.0",
|
16
|
-
"hatchling>=1.27.0",
|
17
|
-
]
|
14
|
+
dev = ["grpcio-tools>=1.69.0", "hatchling>=1.27.0"]
|
18
15
|
|
19
16
|
[tool.pyright]
|
20
17
|
venvPath = "."
|
@@ -1,11 +1,17 @@
|
|
1
1
|
import re
|
2
|
+
import shutil
|
3
|
+
import pathlib
|
2
4
|
import sysconfig
|
5
|
+
import subprocess
|
3
6
|
|
4
7
|
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
5
8
|
|
6
9
|
|
7
10
|
class CustomBuildHook(BuildHookInterface):
|
8
11
|
def initialize(self, version, build_data):
|
12
|
+
target_path = pathlib.Path("core", "main.go")
|
13
|
+
output_path = pathlib.Path("divi", "bin", "core")
|
14
|
+
self._go_build(target_path, output_path)
|
9
15
|
build_data["tag"] = f"py3-none-{self._get_platform_tag()}"
|
10
16
|
build_data["pure_python"] = False
|
11
17
|
|
@@ -45,3 +51,31 @@ class CustomBuildHook(BuildHookInterface):
|
|
45
51
|
if os == "linux":
|
46
52
|
parts[0] = "manylinux1"
|
47
53
|
return "_".join(parts)
|
54
|
+
|
55
|
+
def _go_build(
|
56
|
+
self,
|
57
|
+
target_path: pathlib.PurePath,
|
58
|
+
output_path: pathlib.PurePath,
|
59
|
+
):
|
60
|
+
"""go build -o output_path target_path"""
|
61
|
+
output_flags = ["-o", str(output_path)]
|
62
|
+
subprocess.check_call(
|
63
|
+
[
|
64
|
+
str(self._get_and_require_go_binary()),
|
65
|
+
"build",
|
66
|
+
*output_flags,
|
67
|
+
str(target_path),
|
68
|
+
],
|
69
|
+
)
|
70
|
+
|
71
|
+
def _get_and_require_go_binary(self) -> pathlib.Path:
|
72
|
+
go = shutil.which("go")
|
73
|
+
|
74
|
+
if not go:
|
75
|
+
self.app.abort(
|
76
|
+
"Did not find the 'go' binary. You need Go to build wandb"
|
77
|
+
" from source. See https://go.dev/doc/install.",
|
78
|
+
)
|
79
|
+
raise AssertionError("unreachable")
|
80
|
+
|
81
|
+
return pathlib.Path(go)
|