Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSDK-9174: add app wrappers #4561

Open
wants to merge 76 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
3770ad9
add organization wrappers
purplenicole730 Nov 6, 2024
90126b6
add comments
purplenicole730 Nov 6, 2024
3d9a72f
add location wrappers
purplenicole730 Nov 6, 2024
56ea1f4
add robot wrappers
purplenicole730 Nov 6, 2024
0a69969
add fragment wrappers
purplenicole730 Nov 6, 2024
0e27df3
add authorization wrappers
purplenicole730 Nov 6, 2024
e71fed6
add registry item wrappers
purplenicole730 Nov 6, 2024
a3856d4
add packages
purplenicole730 Nov 6, 2024
6124c27
add module wrappers
purplenicole730 Nov 7, 2024
19038d9
add key wrappers
purplenicole730 Nov 7, 2024
239c284
make lint
purplenicole730 Nov 8, 2024
4f04533
add function to create appclient
purplenicole730 Nov 8, 2024
2ecd2c8
add tailrobotpartlogs
purplenicole730 Nov 8, 2024
b458113
standardize function name
purplenicole730 Nov 9, 2024
32ff629
change stream name
purplenicole730 Nov 9, 2024
f378068
start work with upload module file
purplenicole730 Nov 9, 2024
03488b5
add organization shadow types
purplenicole730 Nov 9, 2024
cf7a7c7
fix tail logs
purplenicole730 Nov 12, 2024
32ce5f2
add more organization proto wrappers
purplenicole730 Nov 12, 2024
3512fb5
add location wrappers
purplenicole730 Nov 12, 2024
760d2f2
add error return for enum
purplenicole730 Nov 12, 2024
460d44b
add type wrappers for robot functions
purplenicole730 Nov 12, 2024
b00b8d2
use Authorization wrapper
purplenicole730 Nov 12, 2024
2434d2e
fix
purplenicole730 Nov 12, 2024
1f3fd68
add fragment wrappers
purplenicole730 Nov 12, 2024
6304af0
add authorizedpermissions
purplenicole730 Nov 12, 2024
ab8ee89
add authorization and registry item proto wrappers
purplenicole730 Nov 12, 2024
63b0802
make lint
purplenicole730 Nov 13, 2024
2f63521
make lint
purplenicole730 Nov 13, 2024
1003436
make lint
purplenicole730 Nov 13, 2024
92bf79d
add missing wrappers
purplenicole730 Nov 14, 2024
0f5c934
add all methods to testutils inject
purplenicole730 Nov 14, 2024
6503fdd
add organization tests
purplenicole730 Nov 14, 2024
a97914e
add location tests
purplenicole730 Nov 14, 2024
59ff6ba
add robot tests
purplenicole730 Nov 15, 2024
df38452
make lint
purplenicole730 Nov 16, 2024
935b1b1
add test helper functions
purplenicole730 Nov 16, 2024
f6144e8
add fragment tests
purplenicole730 Nov 16, 2024
4a3ca8d
include appclient in viamclient
purplenicole730 Nov 18, 2024
2b60c34
use iota
purplenicole730 Nov 18, 2024
bdf569a
clean up code
purplenicole730 Nov 18, 2024
8a5dbb6
make lint
purplenicole730 Nov 18, 2024
bf0ad6d
add authorization tests
purplenicole730 Nov 18, 2024
cb4e04c
clean up tests
purplenicole730 Nov 18, 2024
ed15c5a
registry item tests
purplenicole730 Nov 18, 2024
552ce01
module tests
purplenicole730 Nov 18, 2024
b52d301
add key tests
purplenicole730 Nov 18, 2024
4d1efe2
consolidate files
purplenicole730 Nov 18, 2024
d8ece72
consolidate even further
purplenicole730 Nov 18, 2024
167aeec
consolidate everything related to resource
purplenicole730 Nov 18, 2024
0c046df
rename to resource_types
purplenicole730 Nov 18, 2024
e0c2d9f
changes to make it scalable
purplenicole730 Nov 18, 2024
422c433
add wrapper for uploadmodulefile
purplenicole730 Nov 19, 2024
5ecd457
erase comment
purplenicole730 Nov 19, 2024
cb0d9fb
add streaming tests
purplenicole730 Nov 19, 2024
42cebb8
Merge branch 'main' into RSDK-9174-add-app-wrappers
purplenicole730 Nov 19, 2024
f2cfc3c
make publicly unused types private
purplenicole730 Nov 19, 2024
fd6b33e
fix errors from merge
purplenicole730 Nov 19, 2024
7854e07
fix test
purplenicole730 Nov 19, 2024
de432e1
clarify return types
purplenicole730 Nov 20, 2024
be40e73
rename types file
purplenicole730 Nov 20, 2024
29507c1
fix package comment
purplenicole730 Nov 20, 2024
a1e5b49
fix comment
purplenicole730 Nov 20, 2024
8057428
fix comments
purplenicole730 Nov 20, 2024
3aafa8f
put in alphabetical order
purplenicole730 Nov 21, 2024
e796395
upload file in chunks
purplenicole730 Nov 21, 2024
e4d66a8
make lint
purplenicole730 Nov 21, 2024
fa86145
change stream tests
purplenicole730 Nov 21, 2024
d3e027a
change comments
purplenicole730 Nov 21, 2024
cd03c53
use ellipsis
purplenicole730 Nov 21, 2024
0fad2a6
rename files
purplenicole730 Nov 21, 2024
7c45587
use functional options
purplenicole730 Nov 21, 2024
f388ce1
add app client testing
purplenicole730 Nov 21, 2024
650b90c
change streams
purplenicole730 Nov 21, 2024
a5ab0c7
remove unnecessary logger
purplenicole730 Nov 21, 2024
02b2adb
actually test if clients are the same
purplenicole730 Nov 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,126 changes: 1,126 additions & 0 deletions app/app_client.go

Large diffs are not rendered by default.

1,913 changes: 1,913 additions & 0 deletions app/app_client_test.go

Large diffs are not rendered by default.

630 changes: 630 additions & 0 deletions app/app_types.go
purplenicole730 marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/data_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ type DatabaseConnReturn struct {
HasDatabaseUser bool
}

// NewDataClient constructs a new DataClient using the connection passed in by the viamClient.
// NewDataClient constructs a new DataClient using the connection passed in by the Viam client.
func NewDataClient(
conn rpc.ClientConn,
) *DataClient {
Expand Down
45 changes: 22 additions & 23 deletions app/data_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,26 @@ import (
)

const (
componentName = "component_name"
componentType = "component_type"
method = "method"
robotName = "robot_name"
robotID = "robot_id"
partName = "part_name"
partID = "part_id"
locationID = "location_id"
organizationID = "organization_id"
password = "password"
mimeType = "mime_type"
uri = "some.robot.uri"
bboxLabel = "bbox_label"
tag = "tag"
fileName = "file_name"
fileExt = "file_ext.ext"
datasetID = "dataset_id"
binaryMetaID = "binary_id"
mongodbURI = "mongo_uri"
hostName = "host_name"
last = "last"
componentName = "component_name"
componentType = "component_type"
method = "method"
robotName = "robot_name"
robotID = "robot_id"
partName = "part_name"
partID = "part_id"
locationID = "location_id"
password = "password"
mimeType = "mime_type"
uri = "some.robot.uri"
bboxLabel = "bbox_label"
tag = "tag"
fileName = "file_name"
fileExt = "file_ext.ext"
datasetID = "dataset_id"
binaryMetaID = "binary_id"
mongodbURI = "mongo_uri"
hostName = "host_name"
last = "last"
)

var (
Expand Down Expand Up @@ -153,12 +152,12 @@ func dataRequestToProto(dataRequest DataRequest) *pb.DataRequest {
}
}

func createGrpcClient() *inject.DataServiceClient {
func createDataGrpcClient() *inject.DataServiceClient {
return &inject.DataServiceClient{}
}

func TestDataClient(t *testing.T) {
grpcClient := createGrpcClient()
grpcClient := createDataGrpcClient()
client := DataClient{client: grpcClient}

captureInterval := CaptureInterval{
Expand Down
Loading
Loading