trainwave-cli 0.2.2__tar.gz → 0.2.4__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.
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/PKG-INFO +2 -2
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/pyproject.toml +2 -2
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/cli/auth.py +2 -2
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/cli/jobs.py +5 -2
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/cli/secrets.py +19 -4
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/cli/setup.py +2 -2
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/README.md +0 -0
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/__init__.py +0 -0
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/api.py +0 -0
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/cli/offers.py +0 -0
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/config/config.py +0 -0
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/format_utils.py +0 -0
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/io.py +0 -0
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/main.py +0 -0
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/utils.py +0 -0
- {trainwave_cli-0.2.2 → trainwave_cli-0.2.4}/trainwave_cli/xceptions.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: trainwave-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Johan Backman
|
|
6
6
|
Author-email: johan@trainwave.ai
|
|
@@ -22,7 +22,7 @@ Requires-Dist: pytimeparse (>=1.1.8,<2.0.0)
|
|
|
22
22
|
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
|
23
23
|
Requires-Dist: toml (>=0.10.2,<0.11.0)
|
|
24
24
|
Requires-Dist: tqdm (>=4.66.4,<5.0.0)
|
|
25
|
-
Requires-Dist: typer (>=0.12.
|
|
25
|
+
Requires-Dist: typer (>=0.12.5,<0.13.0)
|
|
26
26
|
Requires-Dist: typer-config[all] (>=1.4.0,<2.0.0)
|
|
27
27
|
Requires-Dist: websockets (>=12.0,<13.0)
|
|
28
28
|
Description-Content-Type: text/markdown
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "trainwave-cli"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.4"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = ["Johan Backman <johan@trainwave.ai>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -20,7 +20,7 @@ pytimeparse = "^1.1.8"
|
|
|
20
20
|
tabulate = "^0.9.0"
|
|
21
21
|
toml = "^0.10.2"
|
|
22
22
|
tqdm = "^4.66.4"
|
|
23
|
-
typer = "^0.12.
|
|
23
|
+
typer = "^0.12.5"
|
|
24
24
|
typer-config = { extras = ["all"], version = "^1.4.0" }
|
|
25
25
|
websockets = "^12.0"
|
|
26
26
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import time
|
|
2
2
|
import webbrowser
|
|
3
|
-
from typing import Annotated
|
|
3
|
+
from typing import Annotated, Optional
|
|
4
4
|
|
|
5
5
|
import typer
|
|
6
6
|
from loguru import logger
|
|
@@ -35,7 +35,7 @@ async def login() -> None:
|
|
|
35
35
|
|
|
36
36
|
webbrowser.open_new_tab(session_url)
|
|
37
37
|
|
|
38
|
-
api_token: str
|
|
38
|
+
api_token: Optional[str] = None
|
|
39
39
|
end_polling_at = time.time() + 60 * LOGIN_POLLING_TIME
|
|
40
40
|
|
|
41
41
|
with Progress(
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
1
4
|
import json
|
|
2
5
|
import os
|
|
3
6
|
import sys
|
|
@@ -40,7 +43,7 @@ async def launch( # noqa
|
|
|
40
43
|
run_command: Annotated[str, typer.Option(help="The command to run the job")],
|
|
41
44
|
# Optional params
|
|
42
45
|
organization: Annotated[
|
|
43
|
-
str
|
|
46
|
+
Optional[str], typer.Option(help="ID or RID of organization")
|
|
44
47
|
] = None,
|
|
45
48
|
expires: Annotated[
|
|
46
49
|
str,
|
|
@@ -56,7 +59,7 @@ async def launch( # noqa
|
|
|
56
59
|
),
|
|
57
60
|
] = True,
|
|
58
61
|
exclude_regex: Annotated[
|
|
59
|
-
str
|
|
62
|
+
Optional[str],
|
|
60
63
|
typer.Option(
|
|
61
64
|
help="Files matching this pattern will be ignored when packaging up the job"
|
|
62
65
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import builtins
|
|
2
2
|
from datetime import datetime, timezone
|
|
3
3
|
from operator import itemgetter
|
|
4
|
-
from typing import Annotated
|
|
4
|
+
from typing import Annotated, Optional
|
|
5
5
|
|
|
6
6
|
import human_readable
|
|
7
7
|
import typer
|
|
@@ -64,7 +64,7 @@ async def list(
|
|
|
64
64
|
async def set(
|
|
65
65
|
organization: Annotated[str, typer.Option(help="The organization ID or RID")],
|
|
66
66
|
secrets: builtins.list[str],
|
|
67
|
-
project: Annotated[str
|
|
67
|
+
project: Annotated[Optional[str], typer.Option(help="Project ID or RID")] = None,
|
|
68
68
|
) -> None:
|
|
69
69
|
secret_dict: dict[str, str] = {}
|
|
70
70
|
|
|
@@ -94,7 +94,22 @@ async def set(
|
|
|
94
94
|
@ensure_api_key
|
|
95
95
|
async def unset(
|
|
96
96
|
organization: Annotated[str, typer.Option(help="The organization ID or RID")],
|
|
97
|
-
|
|
97
|
+
secret_names: builtins.list[str],
|
|
98
98
|
) -> None:
|
|
99
99
|
api_client = Api(config.api_key, config.endpoint)
|
|
100
|
-
|
|
100
|
+
|
|
101
|
+
existing_secrets = await api_client.list_secrets(organization)
|
|
102
|
+
lookup = {
|
|
103
|
+
secret.name: secret.id for secret in existing_secrets
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
secret_ids: builtins.list[str] = []
|
|
107
|
+
while secret_names:
|
|
108
|
+
current = secret_names.pop()
|
|
109
|
+
if current not in lookup:
|
|
110
|
+
typer.echo(f"Error: Secret '{current}' not found.", err=True)
|
|
111
|
+
raise typer.Exit(code=1)
|
|
112
|
+
|
|
113
|
+
secret_ids.append(lookup[current])
|
|
114
|
+
|
|
115
|
+
await api_client.unset_secrets(organization, secret_ids)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import copy
|
|
2
2
|
import time
|
|
3
3
|
import webbrowser
|
|
4
|
-
from typing import Annotated, Any, cast
|
|
4
|
+
from typing import Annotated, Any, Optional, cast
|
|
5
5
|
|
|
6
6
|
import toml
|
|
7
7
|
import typer
|
|
@@ -68,7 +68,7 @@ async def _run_setup_guide(existing_config: dict[str, Any]) -> dict[str, Any]:
|
|
|
68
68
|
@ensure_api_key
|
|
69
69
|
async def default(
|
|
70
70
|
config: Annotated[
|
|
71
|
-
str
|
|
71
|
+
Optional[str], typer.Option(help="Provide a config path")
|
|
72
72
|
] = "trainwave.toml",
|
|
73
73
|
accept: Annotated[
|
|
74
74
|
bool, typer.Option(help="Accept overwrite of config without prompt")
|
|
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
|