remotivelabs-cli 0.0.39__tar.gz → 0.0.41__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.
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/PKG-INFO +1 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/broker/brokers.py +3 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/broker/export.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/broker/files.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/broker/licenses.py +3 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/broker/playback.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/broker/record.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/broker/scripting.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/broker/signals.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/auth/cmd.py +2 -3
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/auth_tokens.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/brokers.py +3 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/cloud_cli.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/configs.py +3 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/organisations.py +2 -3
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/projects.py +3 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/recordings.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/recordings_playback.py +5 -4
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/rest_helper.py +1 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/sample_recordings.py +3 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/service_account_tokens.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/service_accounts.py +3 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/storage/cmd.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/connect/connect.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/remotive.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/settings/cmd.py +2 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/tools/can/can.py +3 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/tools/tools.py +2 -2
- remotivelabs_cli-0.0.41/cli/typer/typer_utils.py +8 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/pyproject.toml +1 -1
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/LICENSE +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/README.md +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/__init__.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/broker/lib/__about__.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/broker/lib/broker.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/broker/license_flows.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/__init__.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/auth/__init__.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/auth/login.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/resumable_upload.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/storage/__init__.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/storage/copy.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/storage/uri_or_path.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/cloud/uri.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/connect/__init__.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/connect/protopie/protopie.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/errors.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/settings/__init__.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/settings/core.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/settings/token_file.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/tools/__init__.py +0 -0
- {remotivelabs_cli-0.0.39 → remotivelabs_cli-0.0.41}/cli/tools/can/__init__.py +0 -0
- /remotivelabs_cli-0.0.39/cli/tools/can/RemotiveLabs.can1.log → /remotivelabs_cli-0.0.41/cli/typer/__init__.py +0 -0
@@ -11,9 +11,11 @@ from zeroconf import (
|
|
11
11
|
Zeroconf,
|
12
12
|
)
|
13
13
|
|
14
|
+
from cli.typer import typer_utils
|
15
|
+
|
14
16
|
from . import export, files, licenses, playback, record, scripting, signals
|
15
17
|
|
16
|
-
app =
|
18
|
+
app = typer_utils.create_typer(rich_markup_mode="rich")
|
17
19
|
|
18
20
|
|
19
21
|
@app.callback()
|
@@ -9,9 +9,10 @@ import typer
|
|
9
9
|
|
10
10
|
from cli.errors import ErrorPrinter
|
11
11
|
|
12
|
+
from ..typer import typer_utils
|
12
13
|
from .lib.broker import Broker, SubscribableSignal
|
13
14
|
|
14
|
-
app =
|
15
|
+
app = typer_utils.create_typer(
|
15
16
|
rich_markup_mode="rich",
|
16
17
|
help="""
|
17
18
|
Export subscribed signals to different formats, currently only InfluxDB line protocol
|
@@ -8,10 +8,11 @@ import typer
|
|
8
8
|
from rich.progress import Progress, SpinnerColumn, TextColumn
|
9
9
|
|
10
10
|
from cli.errors import ErrorPrinter
|
11
|
+
from cli.typer import typer_utils
|
11
12
|
|
12
13
|
from .lib.broker import Broker
|
13
14
|
|
14
|
-
app =
|
15
|
+
app = typer_utils.create_typer(help=help)
|
15
16
|
|
16
17
|
|
17
18
|
@app.command()
|
@@ -5,9 +5,11 @@ from enum import Enum
|
|
5
5
|
import typer
|
6
6
|
from rich import print_json
|
7
7
|
|
8
|
+
from cli.typer import typer_utils
|
9
|
+
|
8
10
|
from .license_flows import LicenseFlow
|
9
11
|
|
10
|
-
app =
|
12
|
+
app = typer_utils.create_typer()
|
11
13
|
|
12
14
|
help_text = """
|
13
15
|
More info on our docs page
|
@@ -6,10 +6,11 @@ import grpc
|
|
6
6
|
import typer
|
7
7
|
|
8
8
|
from cli.errors import ErrorPrinter
|
9
|
+
from cli.typer import typer_utils
|
9
10
|
|
10
11
|
from .lib.broker import Broker
|
11
12
|
|
12
|
-
app =
|
13
|
+
app = typer_utils.create_typer(help=help)
|
13
14
|
|
14
15
|
|
15
16
|
def recording_and_namespace(recording: str) -> Dict[str, str]:
|
@@ -6,10 +6,11 @@ import grpc
|
|
6
6
|
import typer
|
7
7
|
|
8
8
|
from cli.errors import ErrorPrinter
|
9
|
+
from cli.typer import typer_utils
|
9
10
|
|
10
11
|
from .lib.broker import Broker
|
11
12
|
|
12
|
-
app =
|
13
|
+
app = typer_utils.create_typer(help=help)
|
13
14
|
|
14
15
|
|
15
16
|
@app.command()
|
@@ -7,8 +7,9 @@ import typer
|
|
7
7
|
from rich import print as rich_print
|
8
8
|
|
9
9
|
from cli.errors import ErrorPrinter
|
10
|
+
from cli.typer import typer_utils
|
10
11
|
|
11
|
-
app =
|
12
|
+
app = typer_utils.create_typer(
|
12
13
|
rich_markup_mode="rich",
|
13
14
|
help="""
|
14
15
|
[Experimental] - Generate template lua script for input and output signals
|
@@ -14,10 +14,11 @@ import typer
|
|
14
14
|
from rich import print as rich_rprint
|
15
15
|
|
16
16
|
from cli.errors import ErrorPrinter
|
17
|
+
from cli.typer import typer_utils
|
17
18
|
|
18
19
|
from .lib.broker import Broker, SubscribableSignal
|
19
20
|
|
20
|
-
app =
|
21
|
+
app = typer_utils.create_typer(help=help)
|
21
22
|
|
22
23
|
DEFAULT_GRPC_URL = "http://localhost:50051"
|
23
24
|
|
@@ -1,18 +1,17 @@
|
|
1
1
|
import sys
|
2
2
|
|
3
|
-
import typer
|
4
|
-
|
5
3
|
from cli.cloud.auth.login import login as do_login
|
6
4
|
from cli.cloud.rest_helper import RestHelper as Rest
|
7
5
|
from cli.errors import ErrorPrinter
|
8
6
|
from cli.settings import TokenNotFoundError, settings
|
7
|
+
from cli.typer import typer_utils
|
9
8
|
|
10
9
|
from .. import auth_tokens
|
11
10
|
|
12
11
|
HELP = """
|
13
12
|
Manage how you authenticate with our cloud platform
|
14
13
|
"""
|
15
|
-
app =
|
14
|
+
app = typer_utils.create_typer(help=HELP)
|
16
15
|
app.add_typer(auth_tokens.app, name="tokens", help="Manage users personal access tokens")
|
17
16
|
|
18
17
|
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import typer
|
2
2
|
|
3
3
|
from cli.settings import settings
|
4
|
+
from cli.typer import typer_utils
|
4
5
|
|
5
6
|
from .rest_helper import RestHelper as Rest
|
6
7
|
|
7
|
-
app =
|
8
|
+
app = typer_utils.create_typer()
|
8
9
|
|
9
10
|
|
10
11
|
# TODO: add add interactive flag to set target directory # pylint: disable=fixme
|
@@ -9,9 +9,11 @@ import requests
|
|
9
9
|
import typer
|
10
10
|
import websocket
|
11
11
|
|
12
|
+
from cli.typer import typer_utils
|
13
|
+
|
12
14
|
from .rest_helper import RestHelper as Rest
|
13
15
|
|
14
|
-
app =
|
16
|
+
app = typer_utils.create_typer()
|
15
17
|
|
16
18
|
|
17
19
|
@app.command("list", help="Lists brokers in project")
|
@@ -2,8 +2,9 @@ import typer
|
|
2
2
|
|
3
3
|
from cli.cloud import auth, brokers, configs, organisations, projects, recordings, sample_recordings, service_accounts, storage
|
4
4
|
from cli.cloud.rest_helper import RestHelper
|
5
|
+
from cli.typer import typer_utils
|
5
6
|
|
6
|
-
app =
|
7
|
+
app = typer_utils.create_typer()
|
7
8
|
|
8
9
|
|
9
10
|
@app.command(help="List licenses for an organisation")
|
@@ -7,9 +7,11 @@ import requests
|
|
7
7
|
import typer
|
8
8
|
from rich.progress import Progress, SpinnerColumn, TextColumn
|
9
9
|
|
10
|
+
from cli.typer import typer_utils
|
11
|
+
|
10
12
|
from .rest_helper import RestHelper as Rest
|
11
13
|
|
12
|
-
app =
|
14
|
+
app = typer_utils.create_typer()
|
13
15
|
|
14
16
|
|
15
17
|
@app.command("list")
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import json
|
2
2
|
import sys
|
3
3
|
|
4
|
-
import typer
|
5
|
-
|
6
4
|
from cli.cloud.rest_helper import RestHelper
|
5
|
+
from cli.typer import typer_utils
|
7
6
|
|
8
|
-
app =
|
7
|
+
app = typer_utils.create_typer()
|
9
8
|
|
10
9
|
|
11
10
|
@app.command(name="list", help="List your available organisations")
|
@@ -18,13 +18,14 @@ from typing_extensions import Annotated
|
|
18
18
|
|
19
19
|
from cli.cloud.uri import URI
|
20
20
|
from cli.errors import ErrorPrinter
|
21
|
+
from cli.typer import typer_utils
|
21
22
|
|
22
23
|
from ..broker.lib.broker import Broker
|
23
24
|
from .recordings_playback import app as playback_app
|
24
25
|
from .rest_helper import RestHelper as Rest
|
25
26
|
from .rest_helper import err_console
|
26
27
|
|
27
|
-
app =
|
28
|
+
app = typer_utils.create_typer()
|
28
29
|
app.add_typer(playback_app, name="playback")
|
29
30
|
|
30
31
|
|
@@ -17,9 +17,10 @@ from rich.progress import Progress, SpinnerColumn, TextColumn
|
|
17
17
|
from cli.errors import ErrorPrinter
|
18
18
|
|
19
19
|
from ..broker.lib.broker import Broker, SubscribableSignal
|
20
|
+
from ..typer import typer_utils
|
20
21
|
from .rest_helper import RestHelper as Rest
|
21
22
|
|
22
|
-
app =
|
23
|
+
app = typer_utils.create_typer(
|
23
24
|
help="""
|
24
25
|
Support for playback of a recording on a cloud broker, make sure to always mount a recording first
|
25
26
|
"""
|
@@ -174,8 +175,8 @@ def _do_change_playback_mode( # noqa: C901
|
|
174
175
|
if response is None:
|
175
176
|
return
|
176
177
|
r = json.loads(response.text)
|
177
|
-
|
178
|
-
files =
|
178
|
+
enabled_recordings: List[Any] = [r for r in r["recordings"] if r["enabled"]]
|
179
|
+
files = [{"recording": rec["fileName"], "namespace": rec["metadata"]["namespace"]} for rec in enabled_recordings]
|
179
180
|
|
180
181
|
broker_name = brokerstr if brokerstr is not None else "personal"
|
181
182
|
response = Rest.handle_get(f"/api/project/{project}/brokers/{broker_name}", return_response=True, allow_status_codes=[404])
|
@@ -223,7 +224,7 @@ def _track_progress(broker: Broker, repeat: bool, files: List[Any]) -> None:
|
|
223
224
|
def print_progress(offset: int, total: int, current_mode: str) -> None:
|
224
225
|
p.update(
|
225
226
|
t,
|
226
|
-
description=f"{(datetime.timedelta(seconds=offset))}
|
227
|
+
description=f"{(datetime.timedelta(seconds=offset))} / {(datetime.timedelta(seconds=total))} ({current_mode})",
|
227
228
|
)
|
228
229
|
|
229
230
|
broker.listen_on_playback(repeat, files, print_progress)
|
@@ -100,7 +100,7 @@ class RestHelper:
|
|
100
100
|
allow_status_codes: List[int] | None = None,
|
101
101
|
progress_label: str = "Fetching...",
|
102
102
|
use_progress_indicator: bool = True,
|
103
|
-
timeout: int =
|
103
|
+
timeout: int = 60,
|
104
104
|
) -> requests.Response:
|
105
105
|
# pylint: disable=R0913
|
106
106
|
# Returns a Response object if succesfull otherwise None
|
@@ -3,10 +3,11 @@ import json
|
|
3
3
|
import typer
|
4
4
|
|
5
5
|
from cli.settings import settings
|
6
|
+
from cli.typer import typer_utils
|
6
7
|
|
7
8
|
from .rest_helper import RestHelper as Rest
|
8
9
|
|
9
|
-
app =
|
10
|
+
app = typer_utils.create_typer()
|
10
11
|
|
11
12
|
|
12
13
|
# TODO: add add interactive flag to set target directory # pylint: disable=fixme
|
@@ -5,10 +5,12 @@ from typing import List
|
|
5
5
|
|
6
6
|
import typer
|
7
7
|
|
8
|
+
from cli.typer import typer_utils
|
9
|
+
|
8
10
|
from . import service_account_tokens
|
9
11
|
from .rest_helper import RestHelper as Rest
|
10
12
|
|
11
|
-
app =
|
13
|
+
app = typer_utils.create_typer()
|
12
14
|
|
13
15
|
|
14
16
|
@app.command(name="list", help="List service-accounts")
|
@@ -9,6 +9,7 @@ from cli.cloud.storage.uri_or_path import UriOrPath
|
|
9
9
|
from cli.cloud.storage.uri_or_path import uri as uri_parser
|
10
10
|
from cli.cloud.uri import URI, InvalidURIError, JoinURIError
|
11
11
|
from cli.errors import ErrorPrinter
|
12
|
+
from cli.typer import typer_utils
|
12
13
|
|
13
14
|
HELP = """
|
14
15
|
Manage files ([yellow]Beta feature not available for all customers[/yellow])
|
@@ -17,7 +18,7 @@ Copy file from local to remote storage and vice versa, list and delete files.
|
|
17
18
|
|
18
19
|
"""
|
19
20
|
|
20
|
-
app =
|
21
|
+
app = typer_utils.create_typer(rich_markup_mode="rich", help=HELP)
|
21
22
|
|
22
23
|
|
23
24
|
@app.command(name="ls")
|
@@ -9,10 +9,11 @@ from typing_extensions import List
|
|
9
9
|
|
10
10
|
from cli.broker.lib.broker import SubscribableSignal
|
11
11
|
from cli.errors import ErrorPrinter
|
12
|
+
from cli.typer import typer_utils
|
12
13
|
|
13
14
|
from .protopie import protopie as ppie
|
14
15
|
|
15
|
-
app =
|
16
|
+
app = typer_utils.create_typer()
|
16
17
|
|
17
18
|
|
18
19
|
@app.command()
|
@@ -11,11 +11,12 @@ from .cloud.cloud_cli import app as cloud_app
|
|
11
11
|
from .connect.connect import app as connect_app
|
12
12
|
from .settings.cmd import app as settings_app
|
13
13
|
from .tools.tools import app as tools_app
|
14
|
+
from .typer import typer_utils
|
14
15
|
|
15
16
|
if os.getenv("GRPC_VERBOSITY") is None:
|
16
17
|
os.environ["GRPC_VERBOSITY"] = "NONE"
|
17
18
|
|
18
|
-
app =
|
19
|
+
app = typer_utils.create_typer(
|
19
20
|
rich_markup_mode="rich",
|
20
21
|
help="""
|
21
22
|
Welcome to RemotiveLabs CLI - Simplify and automate tasks for cloud resources and brokers
|
@@ -4,6 +4,8 @@ import can
|
|
4
4
|
import typer
|
5
5
|
from rich.console import Console
|
6
6
|
|
7
|
+
from cli.typer import typer_utils
|
8
|
+
|
7
9
|
err_console = Console(stderr=True)
|
8
10
|
console = Console()
|
9
11
|
|
@@ -11,7 +13,7 @@ HELP = """
|
|
11
13
|
CAN related tools
|
12
14
|
"""
|
13
15
|
|
14
|
-
app =
|
16
|
+
app = typer_utils.create_typer(help=HELP)
|
15
17
|
|
16
18
|
|
17
19
|
@app.command("convert")
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
from cli.typer import typer_utils
|
2
2
|
|
3
3
|
from .can.can import app as can_app
|
4
4
|
|
@@ -6,5 +6,5 @@ HELP_TEXT = """
|
|
6
6
|
CLI tools unrelated to cloud or broker
|
7
7
|
"""
|
8
8
|
|
9
|
-
app =
|
9
|
+
app = typer_utils.create_typer(help=HELP_TEXT)
|
10
10
|
app.add_typer(can_app, name="can", help="CAN tools")
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|