remotivelabs-cli 0.0.24__py3-none-any.whl → 0.0.26__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.
- cli/broker/brokers.py +2 -2
- cli/broker/export.py +5 -5
- cli/broker/files.py +5 -5
- cli/broker/lib/broker.py +59 -49
- cli/broker/license_flows.py +11 -9
- cli/broker/licenses.py +2 -2
- cli/broker/playback.py +14 -34
- cli/broker/record.py +3 -3
- cli/broker/scripting.py +4 -4
- cli/broker/signals.py +11 -11
- cli/cloud/__init__.py +0 -1
- cli/cloud/auth.py +40 -35
- cli/cloud/auth_tokens.py +39 -36
- cli/cloud/brokers.py +24 -33
- cli/cloud/cloud_cli.py +11 -7
- cli/cloud/configs.py +19 -11
- cli/cloud/filestorage.py +155 -0
- cli/cloud/projects.py +10 -7
- cli/cloud/recordings.py +127 -108
- cli/cloud/recordings_playback.py +52 -39
- cli/cloud/rest_helper.py +248 -190
- cli/cloud/resumable_upload.py +62 -0
- cli/cloud/sample_recordings.py +5 -5
- cli/cloud/service_account_tokens.py +18 -16
- cli/cloud/service_accounts.py +9 -9
- cli/connect/__init__.py +0 -1
- cli/connect/connect.py +7 -6
- cli/connect/protopie/protopie.py +32 -16
- cli/errors.py +6 -5
- cli/remotive.py +13 -9
- cli/requirements.txt +4 -1
- cli/settings.py +9 -9
- cli/tools/__init__.py +0 -1
- cli/tools/can/__init__.py +0 -1
- cli/tools/can/can.py +8 -8
- cli/tools/tools.py +2 -2
- {remotivelabs_cli-0.0.24.dist-info → remotivelabs_cli-0.0.26.dist-info}/METADATA +6 -4
- remotivelabs_cli-0.0.26.dist-info/RECORD +44 -0
- remotivelabs_cli-0.0.24.dist-info/RECORD +0 -42
- {remotivelabs_cli-0.0.24.dist-info → remotivelabs_cli-0.0.26.dist-info}/LICENSE +0 -0
- {remotivelabs_cli-0.0.24.dist-info → remotivelabs_cli-0.0.26.dist-info}/WHEEL +0 -0
- {remotivelabs_cli-0.0.24.dist-info → remotivelabs_cli-0.0.26.dist-info}/entry_points.txt +0 -0
cli/cloud/service_accounts.py
CHANGED
@@ -5,15 +5,15 @@ from typing import List
|
|
5
5
|
|
6
6
|
import typer
|
7
7
|
|
8
|
-
from . import rest_helper as rest
|
9
8
|
from . import service_account_tokens
|
9
|
+
from .rest_helper import RestHelper as Rest
|
10
10
|
|
11
11
|
app = typer.Typer()
|
12
12
|
|
13
13
|
|
14
14
|
@app.command(name="list", help="List service-accounts")
|
15
|
-
def list_service_accounts(project: str = typer.Option(..., help="Project ID", envvar="REMOTIVE_CLOUD_PROJECT")):
|
16
|
-
|
15
|
+
def list_service_accounts(project: str = typer.Option(..., help="Project ID", envvar="REMOTIVE_CLOUD_PROJECT")) -> None:
|
16
|
+
Rest.handle_get(f"/api/project/{project}/admin/accounts")
|
17
17
|
|
18
18
|
|
19
19
|
@app.command(name="create", help="Create service account")
|
@@ -21,9 +21,9 @@ def create_service_account(
|
|
21
21
|
name: str,
|
22
22
|
role: List[str] = typer.Option(..., help="Roles to apply"),
|
23
23
|
project: str = typer.Option(..., help="Project ID", envvar="REMOTIVE_CLOUD_PROJECT"),
|
24
|
-
):
|
24
|
+
) -> None:
|
25
25
|
data = {"name": name, "roles": role}
|
26
|
-
|
26
|
+
Rest.handle_post(url=f"/api/project/{project}/admin/accounts", body=json.dumps(data))
|
27
27
|
|
28
28
|
|
29
29
|
@app.command(name="update", help="Update service account")
|
@@ -31,13 +31,13 @@ def update_service_account(
|
|
31
31
|
service_account: str = typer.Option(..., help="Service account name"),
|
32
32
|
role: List[str] = typer.Option(..., help="Roles to apply"),
|
33
33
|
project: str = typer.Option(..., help="Project ID", envvar="REMOTIVE_CLOUD_PROJECT"),
|
34
|
-
):
|
35
|
-
|
34
|
+
) -> None:
|
35
|
+
Rest.handle_put(url=f"/api/project/{project}/admin/accounts/{service_account}", body=json.dumps({"roles": role}))
|
36
36
|
|
37
37
|
|
38
38
|
@app.command(name="delete", help="Delete service account")
|
39
|
-
def delete_service_account(name: str, project: str = typer.Option(..., help="Project ID", envvar="REMOTIVE_CLOUD_PROJECT")):
|
40
|
-
|
39
|
+
def delete_service_account(name: str, project: str = typer.Option(..., help="Project ID", envvar="REMOTIVE_CLOUD_PROJECT")) -> None:
|
40
|
+
Rest.handle_delete(url=f"/api/project/{project}/admin/accounts/{name}")
|
41
41
|
|
42
42
|
|
43
43
|
app.add_typer(service_account_tokens.app, name="tokens", help="Manage project service account access tokens")
|
cli/connect/__init__.py
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
|
cli/connect/connect.py
CHANGED
@@ -10,11 +10,13 @@ from typing_extensions import List
|
|
10
10
|
from cli.broker.lib.broker import SubscribableSignal
|
11
11
|
from cli.errors import ErrorPrinter
|
12
12
|
|
13
|
+
from .protopie import protopie as ppie
|
14
|
+
|
13
15
|
app = typer.Typer()
|
14
16
|
|
15
17
|
|
16
18
|
@app.command()
|
17
|
-
def protopie(
|
19
|
+
def protopie( # pylint: disable=R0913
|
18
20
|
config: Path = typer.Option(
|
19
21
|
None,
|
20
22
|
exists=True,
|
@@ -32,7 +34,7 @@ def protopie(
|
|
32
34
|
broker_url: str = typer.Option(..., help="Broker URL", envvar="REMOTIVE_BROKER_URL"),
|
33
35
|
api_key: str = typer.Option(None, help="Cloud Broker API-KEY", envvar="REMOTIVE_BROKER_API_KEY"),
|
34
36
|
pp_connect_host: str = typer.Option("http://localhost:9981", help="ProtoPie Connect URL"),
|
35
|
-
):
|
37
|
+
) -> None:
|
36
38
|
"""
|
37
39
|
ProtoPie Connect bridge-app to connect signals with RemotiveBroker
|
38
40
|
|
@@ -73,7 +75,6 @@ def protopie(
|
|
73
75
|
$ remotive connect protopie --signal vss:Vehicle.Chassis.SteeringWheel.Angle --signal-name-expression 'replace(".", "_")'
|
74
76
|
```
|
75
77
|
"""
|
76
|
-
from .protopie import protopie
|
77
78
|
|
78
79
|
if len(signal) > 0 and config is not None:
|
79
80
|
ErrorPrinter.print_hint("You must choose either --signal or --config, not both")
|
@@ -83,7 +84,7 @@ def protopie(
|
|
83
84
|
ErrorPrinter.print_hint("You must choose either --signal or --config")
|
84
85
|
sys.exit(1)
|
85
86
|
|
86
|
-
def to_subscribable_signal(sig: str):
|
87
|
+
def to_subscribable_signal(sig: str) -> SubscribableSignal:
|
87
88
|
arr = sig.split(":")
|
88
89
|
|
89
90
|
if len(arr) != 2:
|
@@ -95,7 +96,7 @@ def protopie(
|
|
95
96
|
if len(signal) > 0:
|
96
97
|
signals_to_subscribe_to = list(map(to_subscribable_signal, signal))
|
97
98
|
else:
|
98
|
-
with open(config, "r") as f:
|
99
|
+
with open(config, "r", encoding="utf8") as f:
|
99
100
|
c = json.load(f)
|
100
101
|
s = c["subscription"]
|
101
102
|
ss = []
|
@@ -103,7 +104,7 @@ def protopie(
|
|
103
104
|
ss.append(SubscribableSignal(namespace=s[entry]["namespace"], name=entry))
|
104
105
|
signals_to_subscribe_to = ss
|
105
106
|
|
106
|
-
|
107
|
+
ppie.do_connect( # type: ignore
|
107
108
|
address=pp_connect_host,
|
108
109
|
broker_url=broker_url,
|
109
110
|
api_key=api_key,
|
cli/connect/protopie/protopie.py
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# type: ignore
|
2
|
+
# pylint: skip-file
|
1
3
|
from __future__ import annotations
|
2
4
|
|
3
5
|
import json
|
@@ -5,14 +7,14 @@ import os
|
|
5
7
|
import time
|
6
8
|
import traceback
|
7
9
|
from pathlib import Path
|
8
|
-
from typing import Dict, List, Union
|
10
|
+
from typing import Any, Dict, List, Tuple, Union
|
9
11
|
|
10
12
|
import grpc
|
11
|
-
import socketio
|
13
|
+
import socketio # type: ignore
|
12
14
|
from remotivelabs.broker.sync import BrokerException, Client, SignalIdentifier, SignalsInFrame
|
13
15
|
from rich import print as pretty_print
|
14
16
|
from rich.console import Console
|
15
|
-
from socketio.exceptions import ConnectionError as SocketIoConnectionError
|
17
|
+
from socketio.exceptions import ConnectionError as SocketIoConnectionError # type: ignore
|
16
18
|
|
17
19
|
from cli import settings
|
18
20
|
from cli.broker.lib.broker import SubscribableSignal
|
@@ -26,10 +28,14 @@ io = socketio.Client()
|
|
26
28
|
err_console = Console(stderr=True)
|
27
29
|
|
28
30
|
_has_received_signal = False
|
31
|
+
is_connected = False
|
32
|
+
config_path: Path
|
33
|
+
x_api_key: str
|
34
|
+
broker: Any
|
29
35
|
|
30
36
|
|
31
|
-
@io.on("connect")
|
32
|
-
def on_connect():
|
37
|
+
@io.on("connect") # type: ignore
|
38
|
+
def on_connect() -> None:
|
33
39
|
print("Connected to ProtoPie Connect")
|
34
40
|
io.emit("ppBridgeApp", {"name": PP_CONNECT_APP_NAME})
|
35
41
|
io.emit("PLUGIN_STARTED", {"name": PP_CONNECT_APP_NAME})
|
@@ -43,7 +49,7 @@ def on_connect():
|
|
43
49
|
|
44
50
|
def get_signals_and_namespaces(
|
45
51
|
config: Union[Path, None] = None, signals_to_subscribe_to: Union[List[SubscribableSignal], None] = None
|
46
|
-
) ->
|
52
|
+
) -> Tuple[List[str], List[str], Union[Dict[str, str], None]]:
|
47
53
|
if config is not None:
|
48
54
|
with open(config) as f:
|
49
55
|
mapping = json.load(f)
|
@@ -51,8 +57,12 @@ def get_signals_and_namespaces(
|
|
51
57
|
signals = list(sub.keys())
|
52
58
|
namespaces = list(map(lambda x: sub[x]["namespace"], signals))
|
53
59
|
else:
|
54
|
-
|
55
|
-
|
60
|
+
if signals_to_subscribe_to is None:
|
61
|
+
signals = []
|
62
|
+
namespaces = []
|
63
|
+
else:
|
64
|
+
signals = list(map(lambda s: s.name, signals_to_subscribe_to))
|
65
|
+
namespaces = list(map(lambda s: s.namespace, signals_to_subscribe_to))
|
56
66
|
sub = None
|
57
67
|
return signals, namespaces, sub
|
58
68
|
|
@@ -61,7 +71,7 @@ def get_signal_name(expression: str, s_name: str) -> str:
|
|
61
71
|
if expression is not None:
|
62
72
|
try:
|
63
73
|
sig_name = eval(f"s_name.{expression}")
|
64
|
-
return sig_name
|
74
|
+
return str(sig_name)
|
65
75
|
except Exception as e:
|
66
76
|
ErrorPrinter.print_generic_error(f"Failed to evaluate your python expression {expression}")
|
67
77
|
err_console.print(e)
|
@@ -74,18 +84,18 @@ def get_signal_name(expression: str, s_name: str) -> str:
|
|
74
84
|
def _connect_to_broker(
|
75
85
|
config: Union[Path, None] = None,
|
76
86
|
signals_to_subscribe_to: Union[List[SubscribableSignal], None] = None,
|
77
|
-
expression: str =
|
78
|
-
): # noqa: C901
|
87
|
+
expression: str = "",
|
88
|
+
) -> None: # noqa: C901
|
79
89
|
signals, namespaces, sub = get_signals_and_namespaces(config, signals_to_subscribe_to)
|
80
90
|
|
81
|
-
def on_signals(frame: SignalsInFrame):
|
91
|
+
def on_signals(frame: SignalsInFrame) -> None:
|
82
92
|
global _has_received_signal
|
83
93
|
if not _has_received_signal:
|
84
94
|
pretty_print("Bridge-app is properly receiving signals, you are good to go :thumbsup:")
|
85
95
|
_has_received_signal = True
|
86
96
|
|
87
97
|
for s in frame:
|
88
|
-
if config is not None:
|
98
|
+
if config and sub is not None:
|
89
99
|
sig = sub[s.name()]
|
90
100
|
sig = s.name() if "mapTo" not in sig.keys() else sig["mapTo"]
|
91
101
|
if isinstance(sig, list):
|
@@ -100,7 +110,7 @@ def _connect_to_broker(
|
|
100
110
|
grpc_connect(on_signals, signals_to_subscribe_to)
|
101
111
|
|
102
112
|
|
103
|
-
def grpc_connect(on_signals, signals_to_subscribe_to: Union[List[SignalIdentifier], None] = None):
|
113
|
+
def grpc_connect(on_signals: Any, signals_to_subscribe_to: Union[List[SignalIdentifier], None] = None) -> None:
|
104
114
|
try:
|
105
115
|
pretty_print("Connecting and subscribing to broker...")
|
106
116
|
subscription = None
|
@@ -108,6 +118,9 @@ def grpc_connect(on_signals, signals_to_subscribe_to: Union[List[SignalIdentifie
|
|
108
118
|
client.connect(url=broker, api_key=x_api_key)
|
109
119
|
client.on_signals = on_signals
|
110
120
|
|
121
|
+
if signals_to_subscribe_to is None:
|
122
|
+
print("No sigs")
|
123
|
+
return
|
111
124
|
subscription = client.subscribe(signals_to_subscribe_to=signals_to_subscribe_to, changed_values_only=False)
|
112
125
|
pretty_print("Subscription to broker completed")
|
113
126
|
pretty_print("Waiting for signals...")
|
@@ -145,7 +158,7 @@ def do_connect(
|
|
145
158
|
config: Union[Path, None],
|
146
159
|
signals: List[SubscribableSignal],
|
147
160
|
expression: Union[str, None],
|
148
|
-
):
|
161
|
+
) -> None:
|
149
162
|
global broker
|
150
163
|
global x_api_key
|
151
164
|
global config_path
|
@@ -157,13 +170,16 @@ def do_connect(
|
|
157
170
|
x_api_key = settings.read_token()
|
158
171
|
else:
|
159
172
|
x_api_key = api_key
|
160
|
-
|
173
|
+
elif api_key is not None:
|
161
174
|
x_api_key = api_key
|
162
175
|
try:
|
163
176
|
io.connect(address)
|
177
|
+
# if config is None:
|
178
|
+
# raise ValueError("Config is None")
|
164
179
|
config_path = config
|
165
180
|
while is_connected is None:
|
166
181
|
time.sleep(1)
|
182
|
+
# if expression is not None:
|
167
183
|
_connect_to_broker(signals_to_subscribe_to=signals, config=config, expression=expression)
|
168
184
|
except SocketIoConnectionError as e:
|
169
185
|
err_console.print(":boom: [bold red]Failed to connect to ProtoPie Connect[/bold red]")
|
cli/errors.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import os
|
2
|
+
import sys
|
2
3
|
|
3
4
|
import grpc
|
4
5
|
from rich.console import Console
|
@@ -8,7 +9,7 @@ err_console = Console(stderr=True)
|
|
8
9
|
|
9
10
|
class ErrorPrinter:
|
10
11
|
@staticmethod
|
11
|
-
def print_grpc_error(error: grpc.RpcError):
|
12
|
+
def print_grpc_error(error: grpc.RpcError) -> None:
|
12
13
|
if error.code() == grpc.StatusCode.UNAUTHENTICATED:
|
13
14
|
is_access_token = os.environ["ACCESS_TOKEN"]
|
14
15
|
if is_access_token is not None and is_access_token == "true":
|
@@ -21,16 +22,16 @@ class ErrorPrinter:
|
|
21
22
|
# print(f"Unexpected error: {error.code()}")
|
22
23
|
err_console.print(f":boom: [bold red]Unexpected error, status code[/bold red]: {error.code()}")
|
23
24
|
err_console.print(error.details())
|
24
|
-
exit(1)
|
25
|
+
sys.exit(1)
|
25
26
|
|
26
27
|
@staticmethod
|
27
|
-
def print_hint(message: str):
|
28
|
+
def print_hint(message: str) -> None:
|
28
29
|
err_console.print(f":point_right: [bold]{message}[/bold]")
|
29
30
|
|
30
31
|
@staticmethod
|
31
|
-
def print_generic_error(message: str):
|
32
|
+
def print_generic_error(message: str) -> None:
|
32
33
|
err_console.print(f":boom: [bold red]Failed[/bold red]: {message}")
|
33
34
|
|
34
35
|
@staticmethod
|
35
|
-
def print_generic_message(message: str):
|
36
|
+
def print_generic_message(message: str) -> None:
|
36
37
|
err_console.print(f"[bold]{message}[/bold]:")
|
cli/remotive.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
import os
|
1
2
|
from importlib.metadata import version
|
2
3
|
|
3
4
|
import typer
|
4
|
-
from rich import print
|
5
|
-
from trogon import Trogon
|
5
|
+
from rich import print as rich_print
|
6
|
+
from trogon import Trogon # type: ignore
|
6
7
|
from typer.main import get_group
|
7
8
|
|
8
9
|
from .broker.brokers import app as broker_app
|
@@ -10,6 +11,9 @@ from .cloud.cloud_cli import app as cloud_app
|
|
10
11
|
from .connect.connect import app as connect_app
|
11
12
|
from .tools.tools import app as tools_app
|
12
13
|
|
14
|
+
if os.getenv("GRPC_VERBOSITY") is None:
|
15
|
+
os.environ["GRPC_VERBOSITY"] = "NONE"
|
16
|
+
|
13
17
|
app = typer.Typer(
|
14
18
|
rich_markup_mode="rich",
|
15
19
|
help="""
|
@@ -20,16 +24,16 @@ For documentation - https://docs.remotivelabs.com
|
|
20
24
|
)
|
21
25
|
|
22
26
|
|
23
|
-
def version_callback(value: bool):
|
27
|
+
def version_callback(value: bool) -> None:
|
24
28
|
if value:
|
25
29
|
my_version = version("remotivelabs-cli")
|
26
30
|
typer.echo(my_version)
|
27
31
|
raise typer.Exit()
|
28
32
|
|
29
33
|
|
30
|
-
def test_callback(value: int):
|
34
|
+
def test_callback(value: int) -> None:
|
31
35
|
if value:
|
32
|
-
|
36
|
+
rich_print(value)
|
33
37
|
raise typer.Exit()
|
34
38
|
# if value:
|
35
39
|
# typer.echo(f"Awesome CLI Version: 0.0.22a")
|
@@ -38,15 +42,15 @@ def test_callback(value: int):
|
|
38
42
|
|
39
43
|
@app.callback()
|
40
44
|
def main(
|
41
|
-
|
42
|
-
)
|
45
|
+
# pylint: disable=unused-argument
|
46
|
+
the_version: bool = typer.Option(None, "--version", callback=version_callback, is_eager=False, help="Print current version"),
|
47
|
+
) -> None:
|
43
48
|
# Do other global stuff, handle other global options here
|
44
|
-
# print(f"version {version}")
|
45
49
|
return
|
46
50
|
|
47
51
|
|
48
52
|
@app.command()
|
49
|
-
def tui(ctx: typer.Context):
|
53
|
+
def tui(ctx: typer.Context) -> None:
|
50
54
|
"""
|
51
55
|
Explore remotive-cli and generate commands with this textual user interface application
|
52
56
|
"""
|
cli/requirements.txt
CHANGED
cli/settings.py
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
import os
|
2
|
+
import sys
|
2
3
|
from pathlib import Path
|
3
4
|
|
4
5
|
from rich.console import Console
|
5
6
|
|
6
7
|
err_console = Console(stderr=True)
|
7
8
|
|
8
|
-
|
9
|
-
|
9
|
+
CONFIG_DIR_NAME = str(Path.home()) + "/.config/.remotive/"
|
10
|
+
TOKEN_FILE_NAME = str(Path.home()) + "/.config/.remotive/cloud.secret.token"
|
10
11
|
|
11
12
|
|
12
|
-
def read_token():
|
13
|
-
if not os.path.exists(
|
13
|
+
def read_token() -> str:
|
14
|
+
if not os.path.exists(TOKEN_FILE_NAME):
|
14
15
|
err_console.print(":boom: [bold red]Access failed[/bold red] - No access token found")
|
15
16
|
err_console.print("Login with [italic]remotive cloud auth login[/italic]")
|
16
17
|
err_console.print(
|
17
18
|
"If you have downloaded a personal access token, you can activate "
|
18
19
|
"it with [italic]remotive cloud auth tokens activate [FILE_NAME][/italic]"
|
19
20
|
)
|
20
|
-
exit(1)
|
21
|
+
sys.exit(1)
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
return token
|
23
|
+
with open(TOKEN_FILE_NAME, "r", encoding="utf-8") as f:
|
24
|
+
token = f.read()
|
25
|
+
return token
|
cli/tools/__init__.py
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
|
cli/tools/can/__init__.py
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
|
cli/tools/can/can.py
CHANGED
@@ -7,11 +7,11 @@ from rich.console import Console
|
|
7
7
|
err_console = Console(stderr=True)
|
8
8
|
console = Console()
|
9
9
|
|
10
|
-
|
10
|
+
HELP = """
|
11
11
|
CAN related tools
|
12
12
|
"""
|
13
13
|
|
14
|
-
app = typer.Typer(help=
|
14
|
+
app = typer.Typer(help=HELP)
|
15
15
|
|
16
16
|
|
17
17
|
@app.command("convert")
|
@@ -34,7 +34,7 @@ def convert(
|
|
34
34
|
resolve_path=True,
|
35
35
|
help="File to convert to (.blf .asc .log)",
|
36
36
|
),
|
37
|
-
):
|
37
|
+
) -> None:
|
38
38
|
r"""
|
39
39
|
Converts between ASC, BLF and LOG files. Files must end with .asc, .blf or .log.
|
40
40
|
|
@@ -46,7 +46,7 @@ def convert(
|
|
46
46
|
with can.Logger(out_file) as writer:
|
47
47
|
for msg in reader:
|
48
48
|
writer.on_message_received(msg)
|
49
|
-
except Exception as e:
|
49
|
+
except Exception as e: # pylint: disable=W0718
|
50
50
|
err_console.print(f":boom: [bold red]Failed to convert file[/bold red]: {e}")
|
51
51
|
|
52
52
|
|
@@ -61,8 +61,8 @@ def validate(
|
|
61
61
|
resolve_path=True,
|
62
62
|
help="File to validate (.blf .asc .log)",
|
63
63
|
),
|
64
|
-
|
65
|
-
):
|
64
|
+
print_to_terminal: bool = typer.Option(False, help="Print file contents to terminal"),
|
65
|
+
) -> None:
|
66
66
|
r"""
|
67
67
|
Validates that the input file is an ASC, BLF and LOG file
|
68
68
|
|
@@ -72,8 +72,8 @@ def validate(
|
|
72
72
|
try:
|
73
73
|
with can.Printer() as writer:
|
74
74
|
for msg in reader:
|
75
|
-
if
|
75
|
+
if print_to_terminal:
|
76
76
|
writer.on_message_received(msg)
|
77
77
|
console.print(f"Successfully verified {in_file}")
|
78
|
-
except Exception as e:
|
78
|
+
except Exception as e: # pylint: disable=W0718
|
79
79
|
err_console.print(f":boom: [bold red]Failed to convert file[/bold red]: {e}")
|
cli/tools/tools.py
CHANGED
@@ -2,9 +2,9 @@ import typer
|
|
2
2
|
|
3
3
|
from .can.can import app as can_app
|
4
4
|
|
5
|
-
|
5
|
+
HELP_TEXT = """
|
6
6
|
CLI tools unrelated to cloud or broker
|
7
7
|
"""
|
8
8
|
|
9
|
-
app = typer.Typer(help=
|
9
|
+
app = typer.Typer(help=HELP_TEXT)
|
10
10
|
app.add_typer(can_app, name="can", help="CAN tools")
|
@@ -1,24 +1,26 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: remotivelabs-cli
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.26
|
4
4
|
Summary: CLI for operating RemotiveCloud and RemotiveBroker
|
5
5
|
Author: Johan Rask
|
6
6
|
Author-email: johan.rask@remotivelabs.com
|
7
|
-
Requires-Python: >=3.8,<
|
7
|
+
Requires-Python: >=3.8,<3.12
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
9
9
|
Classifier: Programming Language :: Python :: 3.8
|
10
10
|
Classifier: Programming Language :: Python :: 3.9
|
11
11
|
Classifier: Programming Language :: Python :: 3.10
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
13
|
-
|
13
|
+
Requires-Dist: grpc-stubs (>=1.53.0.5)
|
14
|
+
Requires-Dist: mypy-protobuf (>=3.0.0)
|
14
15
|
Requires-Dist: plotext (>=5.2,<6.0)
|
15
16
|
Requires-Dist: pyjwt (>=2.6,<3.0)
|
16
17
|
Requires-Dist: python-can (>=4.3.1)
|
17
18
|
Requires-Dist: python-socketio (>=4.6.1)
|
18
|
-
Requires-Dist: remotivelabs-broker (>=0.1.17)
|
19
|
+
Requires-Dist: remotivelabs-broker (>=0.1.17,<0.2.0)
|
19
20
|
Requires-Dist: rich (>=13.7.0,<13.8.0)
|
20
21
|
Requires-Dist: trogon (>=0.5.0)
|
21
22
|
Requires-Dist: typer (>=0.9.0,<0.10.0)
|
23
|
+
Requires-Dist: types-requests (>=2.32.0.20240622,<3.0.0.0)
|
22
24
|
Requires-Dist: websocket-client (>=1.6,<2.0)
|
23
25
|
Requires-Dist: zeroconf (>=0.127.0,<0.128.0)
|
24
26
|
Description-Content-Type: text/markdown
|
@@ -0,0 +1,44 @@
|
|
1
|
+
cli/__about__.py,sha256=qXVkxWb3aPCF-4MjQhB0wqL2GEblEH4Qwk70o29UkJk,122
|
2
|
+
cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
+
cli/broker/brokers.py,sha256=oUadEL6xQ4bhXucBH-ZjL67VuERf19kn1g240v_lEpg,3197
|
4
|
+
cli/broker/export.py,sha256=LBWEu1hS9z4fPuu847numbCJe9ebaXjfHqqhplII4vg,4429
|
5
|
+
cli/broker/files.py,sha256=_MVwitQ5Z9-lNDb3biXqnlkKti8rizTEw0nnAViussU,4181
|
6
|
+
cli/broker/lib/__about__.py,sha256=xnZ5V6ZcHW9dhWLWdMzVjYJbEnMKpeXm0_S_mbNzypE,141
|
7
|
+
cli/broker/lib/broker.py,sha256=7jRIgH5AUgDJKHy4dw7riQX1777UC2YhgT2uySqhGzM,23219
|
8
|
+
cli/broker/license_flows.py,sha256=qJplaeugkUiypFGPdEIl5Asqlf7W3geJ-wU-QbYMP_8,7216
|
9
|
+
cli/broker/licenses.py,sha256=Ddl243re8RoeP9CoWWbIzwDePQ9l8r7ixmbd1gqn8f0,3973
|
10
|
+
cli/broker/playback.py,sha256=hdDKXGPuIE3gcT-kgQltgn5jsPzK19Yh9hiNcgtkLX0,3992
|
11
|
+
cli/broker/record.py,sha256=Oa6hUpS0Dgnt0f6Ig33vl0Jy8wN7wMXfemaxXWjRVoQ,1414
|
12
|
+
cli/broker/scripting.py,sha256=8577_C6siOk90s4G1ItIfAoFIUAkS0ItUl5kqR0cD-k,3792
|
13
|
+
cli/broker/signals.py,sha256=usU2RkkVETc5FDgXnJylRNQofm93QGbCiChdmyioInI,6718
|
14
|
+
cli/cloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
+
cli/cloud/auth.py,sha256=CgIg_y7oBbRmOHtWEsmUrNrbBDf-Req0R7i_laKt_z8,3907
|
16
|
+
cli/cloud/auth_tokens.py,sha256=YKfEkqo2yy7oSwC5louXxM-g4avbv7wE_ll9tpGC-nY,3688
|
17
|
+
cli/cloud/brokers.py,sha256=56MX74axZUhULzXSPnDfiq5uB8bpS1DXWskxOF2_tcQ,3892
|
18
|
+
cli/cloud/cloud_cli.py,sha256=IWXGz7pw7KJxGqc4VM9ThE7rmimMKDY2du_XywJfyV8,1590
|
19
|
+
cli/cloud/configs.py,sha256=71WU3_tajC6qmC6kCepPo8X5eOwjPNzmbXhEmpNDio4,4436
|
20
|
+
cli/cloud/filestorage.py,sha256=fnzQ6Q95p82LssHfYlYWG50XWwnWwh1GUbvfRCVoq8A,5017
|
21
|
+
cli/cloud/projects.py,sha256=01k0TmGqPrruME1LuXp8pqCOPNtpPHyKZNTAMh3dhk8,1437
|
22
|
+
cli/cloud/recordings.py,sha256=h_AxSykPw9s-T99S-2rVWAQKQB-C-mCwsL0AkCIPR4I,23932
|
23
|
+
cli/cloud/recordings_playback.py,sha256=PRzftmvG2iePrL9f6qTEXVOnyJ-etcyzn5w9CCxcSto,11539
|
24
|
+
cli/cloud/rest_helper.py,sha256=Sky-Lc0YaKbSUdSy3O5AK2FffKAVjAeVMrZLHiUILyU,11294
|
25
|
+
cli/cloud/resumable_upload.py,sha256=utLiUzYQZFQZ-TaI732HNYqBoVOZQG9h0aNfyKU-5oc,2677
|
26
|
+
cli/cloud/sample_recordings.py,sha256=OVX32U1dkkkJZysbgr5Dy515oOQKnwBAbZYzV_QUu1g,690
|
27
|
+
cli/cloud/service_account_tokens.py,sha256=bchcyK0tRo-mTF312tZsvlHgNB2Azza_snbT2di1Oqg,2413
|
28
|
+
cli/cloud/service_accounts.py,sha256=XOIPobUamCLIaufjyvb33XJDwy6uRqW5ZljZx3GYEfo,1659
|
29
|
+
cli/connect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
30
|
+
cli/connect/connect.py,sha256=U--6dtHxUlvE81J37rABFez4TbF7AXWOpZYZnL7sPMY,3994
|
31
|
+
cli/connect/protopie/protopie.py,sha256=5ZVacK2XWfExMR-7x4Hi2aMAjVnmHn6cMsT8pKEUteI,6342
|
32
|
+
cli/errors.py,sha256=CXYArw1W82bRFwJkJ3tD-Ek1huKeah502DGMvPxHYFo,1366
|
33
|
+
cli/remotive.py,sha256=vJ2WsiuMZs5WSWMk-C29IOTVg8xXt96sUYv2keCsmi4,1826
|
34
|
+
cli/requirements.txt,sha256=lO6iu07ROwWXOpmiAYGoyXEmIFWrvh3fJeem2Y74QWw,133
|
35
|
+
cli/settings.py,sha256=MikGisXMNJTGtICBcLhfLZc2_ELCOaZmJspdLNwNRvY,833
|
36
|
+
cli/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
|
+
cli/tools/can/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
|
+
cli/tools/can/can.py,sha256=8uATViSFlpkdSiIm4fzbuQi1_m7V9Pym-K17TaJQRHU,2262
|
39
|
+
cli/tools/tools.py,sha256=0KU-hXR1f9xHP4BOG9A9eXfmICLmNuQCOU8ueF6iGg0,198
|
40
|
+
remotivelabs_cli-0.0.26.dist-info/LICENSE,sha256=qDPP_yfuv1fF-u7EfexN-cN3M8aFgGVndGhGLovLKz0,608
|
41
|
+
remotivelabs_cli-0.0.26.dist-info/METADATA,sha256=uL76qDxfAwkVyTHrm-XJC7vY5zWjku3QTZUA4RhMoFU,1318
|
42
|
+
remotivelabs_cli-0.0.26.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
43
|
+
remotivelabs_cli-0.0.26.dist-info/entry_points.txt,sha256=lvDhPgagLqW_KTnLPCwKSqfYlEp-1uYVosRiPjsVj10,45
|
44
|
+
remotivelabs_cli-0.0.26.dist-info/RECORD,,
|
@@ -1,42 +0,0 @@
|
|
1
|
-
cli/__about__.py,sha256=qXVkxWb3aPCF-4MjQhB0wqL2GEblEH4Qwk70o29UkJk,122
|
2
|
-
cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
cli/broker/brokers.py,sha256=jVbaiCnFoCxQBGhidePg6GxDhurzXtbn8mV59HkzAc4,3181
|
4
|
-
cli/broker/export.py,sha256=Xhpz2P32VMow7DujImCzhiP-WqJvdR1-THErRV_4LPU,4363
|
5
|
-
cli/broker/files.py,sha256=_8elBjbmJ5MEEeFGJ7QYkXzyuLDCDpO6UvEVXHbRy7U,4133
|
6
|
-
cli/broker/lib/__about__.py,sha256=xnZ5V6ZcHW9dhWLWdMzVjYJbEnMKpeXm0_S_mbNzypE,141
|
7
|
-
cli/broker/lib/broker.py,sha256=uolp_AaC3Z_pGeF4rP28FvHvtSRUJFuT5Dxe8aLhdgI,21957
|
8
|
-
cli/broker/license_flows.py,sha256=AaKvZgy_hkP5Mv-1dXtQxQxXGidpvuVDVY3jP2AX0t0,7101
|
9
|
-
cli/broker/licenses.py,sha256=iJeF6aWKUPhXb24t0pyufFRmMGNCFo-G_ZUz1rstqqs,3957
|
10
|
-
cli/broker/playback.py,sha256=oOfC8Jn4Ib-nc9T6ob_uNXZSeCWfft7MrMQPafH4U2I,4846
|
11
|
-
cli/broker/record.py,sha256=gEvo3myHbIl6UyXzhJE741NiwRrFf7doBg6HXzzp5z0,1382
|
12
|
-
cli/broker/scripting.py,sha256=Nb6C8JjfuQXuvd_L8CtlTHEc5iTBRwI4RXMQdf_gWYg,3752
|
13
|
-
cli/broker/signals.py,sha256=py_qOwTP5ongpOVLKznMfVPw68iB--1eIvnRdOLND7k,6556
|
14
|
-
cli/cloud/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
15
|
-
cli/cloud/auth.py,sha256=xi47cQWjs6q7Kje4XUbTqEk_BgG3NJ1gMOYPU-_4tgw,3470
|
16
|
-
cli/cloud/auth_tokens.py,sha256=5ox0Pxfij8aTgEcDwRBasaSQvDuLIGCJc-INjmIQN2M,3408
|
17
|
-
cli/cloud/brokers.py,sha256=wa3uMg91IZdrP0tMpTdO9cBIkZHtMHxQ-zEXwFiye_I,4127
|
18
|
-
cli/cloud/cloud_cli.py,sha256=nRRXFF_IgUMayerxS-h7oqsNe6tt34Q5VeThq8gatEg,1443
|
19
|
-
cli/cloud/configs.py,sha256=2p1mCHf5BwYNtwbY0Cbed5t6-79WHGKWU4Fv6LuJ21o,4069
|
20
|
-
cli/cloud/projects.py,sha256=-uqltAOficwprOKaPd2R0Itm4sqTz3VJNs9Sc8jtO5k,1369
|
21
|
-
cli/cloud/recordings.py,sha256=QpNb9HWK_LC7Trex8E7RevEy7GTOBZHw0RsgOt_RmUA,23286
|
22
|
-
cli/cloud/recordings_playback.py,sha256=crrwQ3kl8LzCVBan9B1a15t-vhDCNYqLKSVQbLf58Ng,10907
|
23
|
-
cli/cloud/rest_helper.py,sha256=dUVmykp0_M4pxzI3WiGoURjlaeCe_V_2h7JwnteW69w,7785
|
24
|
-
cli/cloud/sample_recordings.py,sha256=g1X6JTxvzWInSP9R1BJsDmL4WqvpEKqjdJR_xT4bo1U,639
|
25
|
-
cli/cloud/service_account_tokens.py,sha256=7vjoMd6Xq7orWCUP7TVUVa86JA0OiX8O10NZcHUE6rM,2294
|
26
|
-
cli/cloud/service_accounts.py,sha256=GCYdYPnP5uWVsg1bTIS67CmoPWDng5dupJHmlThrJ80,1606
|
27
|
-
cli/connect/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
28
|
-
cli/connect/connect.py,sha256=jK9J_wK7De9HdS1cWHpQYjARgLEoDcPpcV8cTo2KlcY,3905
|
29
|
-
cli/connect/protopie/protopie.py,sha256=IGr-KxDWVA_Z-lUV54xpPy0yV5Q8N5Atyp_uoFykcXs,5775
|
30
|
-
cli/errors.py,sha256=sOjYasWbwqu2IcK4MvrG4ddpQ7idLGxiFYOxjhdsahM,1319
|
31
|
-
cli/remotive.py,sha256=KKahzVZACa3MIBqt2lZDiSsDOTmoZIdNeKex8LJR8ZQ,1645
|
32
|
-
cli/requirements.txt,sha256=Tjpv2HSAPemgKC-eJbwDw-gvAdklfJ18LixRcwzvQIU,78
|
33
|
-
cli/settings.py,sha256=r0txIWXNTH1veGu97J84PiYEDBsAphkXYTN64n_C-qw,792
|
34
|
-
cli/tools/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
35
|
-
cli/tools/can/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
36
|
-
cli/tools/can/can.py,sha256=kSd1c-nxxXyeKkm19oDILiDBZsKOcpjsUT0T3xox5Qs,2172
|
37
|
-
cli/tools/tools.py,sha256=LwQdWMcJ19pCyKUsVfSB2B3R6ui61NxxFWP0Nrnd5Jk,198
|
38
|
-
remotivelabs_cli-0.0.24.dist-info/LICENSE,sha256=qDPP_yfuv1fF-u7EfexN-cN3M8aFgGVndGhGLovLKz0,608
|
39
|
-
remotivelabs_cli-0.0.24.dist-info/METADATA,sha256=376RvVFRj7s-wIYVbeK8XUi0Ogj8rOIf4jtgwSh-Zms,1224
|
40
|
-
remotivelabs_cli-0.0.24.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
41
|
-
remotivelabs_cli-0.0.24.dist-info/entry_points.txt,sha256=lvDhPgagLqW_KTnLPCwKSqfYlEp-1uYVosRiPjsVj10,45
|
42
|
-
remotivelabs_cli-0.0.24.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|