nextmv 1.0.0__py3-none-any.whl → 1.0.0.dev0__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.
- nextmv/__about__.py +1 -1
- nextmv/__entrypoint__.py +2 -1
- nextmv/__init__.py +4 -0
- nextmv/cli/CONTRIBUTING.md +40 -112
- nextmv/cli/cloud/__init__.py +0 -4
- nextmv/cli/cloud/acceptance/create.py +22 -20
- nextmv/cli/cloud/acceptance/delete.py +12 -8
- nextmv/cli/cloud/acceptance/get.py +10 -9
- nextmv/cli/cloud/acceptance/list.py +3 -3
- nextmv/cli/cloud/acceptance/update.py +6 -6
- nextmv/cli/cloud/account/__init__.py +3 -3
- nextmv/cli/cloud/account/create.py +11 -11
- nextmv/cli/cloud/account/delete.py +8 -7
- nextmv/cli/cloud/account/get.py +3 -3
- nextmv/cli/cloud/account/update.py +5 -5
- nextmv/cli/cloud/app/create.py +26 -25
- nextmv/cli/cloud/app/delete.py +7 -6
- nextmv/cli/cloud/app/exists.py +2 -2
- nextmv/cli/cloud/app/get.py +2 -2
- nextmv/cli/cloud/app/list.py +3 -3
- nextmv/cli/cloud/app/push.py +54 -349
- nextmv/cli/cloud/app/update.py +12 -12
- nextmv/cli/cloud/batch/create.py +28 -26
- nextmv/cli/cloud/batch/delete.py +10 -6
- nextmv/cli/cloud/batch/get.py +9 -9
- nextmv/cli/cloud/batch/list.py +3 -3
- nextmv/cli/cloud/batch/metadata.py +4 -4
- nextmv/cli/cloud/batch/update.py +6 -6
- nextmv/cli/cloud/data/__init__.py +1 -1
- nextmv/cli/cloud/data/upload.py +15 -15
- nextmv/cli/cloud/ensemble/__init__.py +0 -2
- nextmv/cli/cloud/ensemble/create.py +22 -21
- nextmv/cli/cloud/ensemble/delete.py +10 -6
- nextmv/cli/cloud/ensemble/get.py +4 -4
- nextmv/cli/cloud/ensemble/update.py +9 -9
- nextmv/cli/cloud/input_set/__init__.py +0 -2
- nextmv/cli/cloud/input_set/create.py +22 -22
- nextmv/cli/cloud/input_set/get.py +3 -3
- nextmv/cli/cloud/input_set/list.py +3 -3
- nextmv/cli/cloud/input_set/update.py +24 -24
- nextmv/cli/cloud/instance/create.py +15 -14
- nextmv/cli/cloud/instance/delete.py +7 -6
- nextmv/cli/cloud/instance/exists.py +2 -2
- nextmv/cli/cloud/instance/get.py +2 -2
- nextmv/cli/cloud/instance/list.py +3 -3
- nextmv/cli/cloud/instance/update.py +14 -14
- nextmv/cli/cloud/managed_input/create.py +16 -14
- nextmv/cli/cloud/managed_input/delete.py +8 -7
- nextmv/cli/cloud/managed_input/get.py +3 -3
- nextmv/cli/cloud/managed_input/list.py +3 -3
- nextmv/cli/cloud/managed_input/update.py +9 -9
- nextmv/cli/cloud/run/cancel.py +2 -2
- nextmv/cli/cloud/run/create.py +40 -34
- nextmv/cli/cloud/run/get.py +8 -8
- nextmv/cli/cloud/run/input.py +4 -4
- nextmv/cli/cloud/run/list.py +6 -6
- nextmv/cli/cloud/run/logs.py +10 -9
- nextmv/cli/cloud/run/metadata.py +4 -4
- nextmv/cli/cloud/run/track.py +33 -32
- nextmv/cli/cloud/scenario/create.py +21 -21
- nextmv/cli/cloud/scenario/delete.py +10 -6
- nextmv/cli/cloud/scenario/get.py +9 -9
- nextmv/cli/cloud/scenario/list.py +3 -3
- nextmv/cli/cloud/scenario/metadata.py +4 -4
- nextmv/cli/cloud/scenario/update.py +6 -6
- nextmv/cli/cloud/secrets/create.py +17 -17
- nextmv/cli/cloud/secrets/delete.py +10 -6
- nextmv/cli/cloud/secrets/get.py +4 -4
- nextmv/cli/cloud/secrets/list.py +3 -3
- nextmv/cli/cloud/secrets/update.py +20 -17
- nextmv/cli/cloud/upload/create.py +2 -2
- nextmv/cli/cloud/version/create.py +10 -9
- nextmv/cli/cloud/version/delete.py +7 -6
- nextmv/cli/cloud/version/exists.py +2 -2
- nextmv/cli/cloud/version/get.py +2 -2
- nextmv/cli/cloud/version/list.py +3 -3
- nextmv/cli/cloud/version/update.py +8 -8
- nextmv/cli/community/__init__.py +1 -1
- nextmv/cli/community/clone.py +204 -20
- nextmv/cli/community/list.py +125 -60
- nextmv/cli/configuration/config.py +10 -43
- nextmv/cli/configuration/create.py +7 -7
- nextmv/cli/configuration/delete.py +8 -8
- nextmv/cli/configuration/list.py +3 -3
- nextmv/cli/main.py +36 -26
- nextmv/cli/message.py +54 -71
- nextmv/cli/options.py +0 -28
- nextmv/cli/version.py +1 -1
- nextmv/cloud/__init__.py +38 -14
- nextmv/cloud/acceptance_test.py +65 -1
- nextmv/cloud/account.py +6 -1
- nextmv/cloud/application/__init__.py +75 -18
- nextmv/cloud/application/_acceptance.py +8 -13
- nextmv/cloud/application/_batch_scenario.py +19 -4
- nextmv/cloud/application/_input_set.py +6 -42
- nextmv/cloud/application/_instance.py +3 -3
- nextmv/cloud/application/_managed_input.py +2 -2
- nextmv/cloud/application/_version.py +3 -4
- nextmv/cloud/batch_experiment.py +1 -3
- nextmv/cloud/integration.py +4 -7
- nextmv/deprecated.py +3 -5
- nextmv/input.py +52 -0
- nextmv/local/runner.py +1 -1
- nextmv/model.py +11 -50
- nextmv/options.py +256 -11
- nextmv/output.py +62 -0
- nextmv/run.py +10 -1
- nextmv/status.py +51 -1
- {nextmv-1.0.0.dist-info → nextmv-1.0.0.dev0.dist-info}/METADATA +4 -5
- nextmv-1.0.0.dev0.dist-info/RECORD +158 -0
- nextmv/cli/cloud/ensemble/list.py +0 -63
- nextmv/cli/cloud/input_set/delete.py +0 -64
- nextmv/cli/cloud/shadow/__init__.py +0 -33
- nextmv/cli/cloud/shadow/create.py +0 -184
- nextmv/cli/cloud/shadow/delete.py +0 -64
- nextmv/cli/cloud/shadow/get.py +0 -61
- nextmv/cli/cloud/shadow/list.py +0 -63
- nextmv/cli/cloud/shadow/metadata.py +0 -66
- nextmv/cli/cloud/shadow/start.py +0 -43
- nextmv/cli/cloud/shadow/stop.py +0 -53
- nextmv/cli/cloud/shadow/update.py +0 -96
- nextmv/cli/cloud/switchback/__init__.py +0 -33
- nextmv/cli/cloud/switchback/create.py +0 -151
- nextmv/cli/cloud/switchback/delete.py +0 -64
- nextmv/cli/cloud/switchback/get.py +0 -62
- nextmv/cli/cloud/switchback/list.py +0 -63
- nextmv/cli/cloud/switchback/metadata.py +0 -68
- nextmv/cli/cloud/switchback/start.py +0 -43
- nextmv/cli/cloud/switchback/stop.py +0 -53
- nextmv/cli/cloud/switchback/update.py +0 -96
- nextmv/cli/confirm.py +0 -34
- nextmv/cloud/application/_shadow.py +0 -320
- nextmv/cloud/application/_switchback.py +0 -332
- nextmv/cloud/community.py +0 -446
- nextmv/cloud/shadow.py +0 -254
- nextmv/cloud/switchback.py +0 -228
- nextmv-1.0.0.dist-info/RECORD +0 -185
- nextmv-1.0.0.dist-info/entry_points.txt +0 -2
- {nextmv-1.0.0.dist-info → nextmv-1.0.0.dev0.dist-info}/WHEEL +0 -0
- {nextmv-1.0.0.dist-info → nextmv-1.0.0.dev0.dist-info}/licenses/LICENSE +0 -0
|
@@ -5,9 +5,9 @@ This module defines the cloud account delete command for the Nextmv CLI.
|
|
|
5
5
|
from typing import Annotated
|
|
6
6
|
|
|
7
7
|
import typer
|
|
8
|
+
from rich.prompt import Confirm
|
|
8
9
|
|
|
9
10
|
from nextmv.cli.configuration.config import build_account
|
|
10
|
-
from nextmv.cli.confirm import get_confirmation
|
|
11
11
|
from nextmv.cli.message import info, success
|
|
12
12
|
from nextmv.cli.options import AccountIDOption, ProfileOption
|
|
13
13
|
|
|
@@ -29,29 +29,30 @@ def delete(
|
|
|
29
29
|
profile: ProfileOption = None,
|
|
30
30
|
) -> None:
|
|
31
31
|
"""
|
|
32
|
-
Deletes an account within your
|
|
32
|
+
Deletes an account within your organization.
|
|
33
33
|
|
|
34
34
|
You must have the [magenta]administrator[/magenta] role on that account in order to delete it.
|
|
35
35
|
|
|
36
|
-
This action is permanent and cannot be undone. Use the --yes
|
|
36
|
+
This action is permanent and cannot be undone. Use the [code]--yes[/code]
|
|
37
37
|
flag to skip the confirmation prompt.
|
|
38
38
|
|
|
39
39
|
[bold][underline]Examples[/underline][/bold]
|
|
40
40
|
|
|
41
41
|
- Delete the account with the ID [magenta]bunnies-account[/magenta].
|
|
42
|
-
$ [
|
|
42
|
+
$ [green]nextmv cloud account delete --account-id bunnies-account[/green]
|
|
43
43
|
|
|
44
44
|
- Delete the account without confirmation prompt.
|
|
45
|
-
$ [
|
|
45
|
+
$ [green]nextmv cloud account delete --account-id bunnies-account --yes[/green]
|
|
46
46
|
"""
|
|
47
47
|
|
|
48
48
|
if not yes:
|
|
49
|
-
confirm =
|
|
49
|
+
confirm = Confirm.ask(
|
|
50
50
|
f"Are you sure you want to delete account [magenta]{account_id}[/magenta]? This action cannot be undone.",
|
|
51
|
+
default=False,
|
|
51
52
|
)
|
|
52
53
|
|
|
53
54
|
if not confirm:
|
|
54
|
-
info(f"Account [magenta]{account_id}[/magenta] will not be deleted.")
|
|
55
|
+
info(msg=f"Account [magenta]{account_id}[/magenta] will not be deleted.", emoji=":bulb:")
|
|
55
56
|
return
|
|
56
57
|
|
|
57
58
|
cloud_account = build_account(account_id=account_id, profile=profile)
|
nextmv/cli/cloud/account/get.py
CHANGED
|
@@ -31,7 +31,7 @@ def get(
|
|
|
31
31
|
profile: ProfileOption = None,
|
|
32
32
|
) -> None:
|
|
33
33
|
"""
|
|
34
|
-
Get
|
|
34
|
+
Get a Nextmv Cloud account.
|
|
35
35
|
|
|
36
36
|
This command is useful to get the attributes of an existing Nextmv Cloud
|
|
37
37
|
account by its ID.
|
|
@@ -39,11 +39,11 @@ def get(
|
|
|
39
39
|
[bold][underline]Examples[/underline][/bold]
|
|
40
40
|
|
|
41
41
|
- Get the account with the ID [magenta]bunny-logistics[/magenta].
|
|
42
|
-
$ [
|
|
42
|
+
$ [green]nextmv cloud account get --account-id bunny-logistics[/green]
|
|
43
43
|
|
|
44
44
|
- Get the account with the ID [magenta]cottontail-couriers[/magenta] and save the information to an
|
|
45
45
|
[magenta]account.json[/magenta] file.
|
|
46
|
-
$ [
|
|
46
|
+
$ [green]nextmv cloud account get --account-id cottontail-couriers --output account.json[/green]
|
|
47
47
|
"""
|
|
48
48
|
|
|
49
49
|
client = build_client(profile)
|
|
@@ -39,19 +39,19 @@ def update(
|
|
|
39
39
|
profile: ProfileOption = None,
|
|
40
40
|
) -> None:
|
|
41
41
|
"""
|
|
42
|
-
Updates
|
|
42
|
+
Updates a Nextmv Cloud account.
|
|
43
43
|
|
|
44
44
|
This command allows you to update the name of an existing account.
|
|
45
45
|
|
|
46
46
|
[bold][underline]Examples[/underline][/bold]
|
|
47
47
|
|
|
48
48
|
- Update the account named [magenta]hare-delivery[/magenta] to [magenta]Hare Delivery Co[/magenta].
|
|
49
|
-
$ [
|
|
50
|
-
--name "Hare Delivery Co"[/
|
|
49
|
+
$ [green]nextmv cloud account update --account-id hare-delivery \\
|
|
50
|
+
--name "Hare Delivery Co"[/green]
|
|
51
51
|
|
|
52
52
|
- Update an account and save the updated information to an [magenta]updated_account.json[/magenta] file.
|
|
53
|
-
$ [
|
|
54
|
-
--name "Cottontail Express" --output updated_account.json[/
|
|
53
|
+
$ [green]nextmv cloud account update --account-id cottontail-couriers \\
|
|
54
|
+
--name "Cottontail Express" --output updated_account.json[/green]
|
|
55
55
|
"""
|
|
56
56
|
|
|
57
57
|
cloud_account = build_account(account_id=account_id, profile=profile)
|
nextmv/cli/cloud/app/create.py
CHANGED
|
@@ -17,6 +17,15 @@ app = typer.Typer()
|
|
|
17
17
|
|
|
18
18
|
@app.command()
|
|
19
19
|
def create(
|
|
20
|
+
name: Annotated[
|
|
21
|
+
str,
|
|
22
|
+
typer.Option(
|
|
23
|
+
"--name",
|
|
24
|
+
"-n",
|
|
25
|
+
help="A name for the application.",
|
|
26
|
+
metavar="NAME",
|
|
27
|
+
),
|
|
28
|
+
],
|
|
20
29
|
app_id: Annotated[
|
|
21
30
|
str | None,
|
|
22
31
|
typer.Option(
|
|
@@ -70,55 +79,47 @@ def create(
|
|
|
70
79
|
help="Whether the application is a workflow.",
|
|
71
80
|
),
|
|
72
81
|
] = False,
|
|
73
|
-
name: Annotated[
|
|
74
|
-
str | None,
|
|
75
|
-
typer.Option(
|
|
76
|
-
"--name",
|
|
77
|
-
"-n",
|
|
78
|
-
help="An optional name for the application. If not provided, the application ID will be used as the name.",
|
|
79
|
-
metavar="NAME",
|
|
80
|
-
),
|
|
81
|
-
] = None,
|
|
82
82
|
profile: ProfileOption = None,
|
|
83
83
|
) -> None:
|
|
84
84
|
"""
|
|
85
85
|
Create a new Nextmv Cloud application.
|
|
86
86
|
|
|
87
|
-
Use the --exist-ok flag to avoid errors when creating an
|
|
88
|
-
an ID that already exists. This is useful for scripts that
|
|
89
|
-
an application exists without worrying about whether it was
|
|
90
|
-
previously.
|
|
87
|
+
Use the [code]--exist-ok[/code] flag to avoid errors when creating an
|
|
88
|
+
application with an ID that already exists. This is useful for scripts that
|
|
89
|
+
need to ensure an application exists without worrying about whether it was
|
|
90
|
+
created previously.
|
|
91
91
|
|
|
92
|
-
An application can be marked as a workflow using the
|
|
93
|
-
Workflows allow for more complex
|
|
92
|
+
An application can be marked as a workflow using the
|
|
93
|
+
[code]--is-workflow[/code] flag. Workflows allow for more complex
|
|
94
|
+
decision-making processes by leveraging
|
|
94
95
|
[link=https://github.com/nextmv-io/nextpipe][bold]Nextpipe[/bold][/link] to
|
|
95
96
|
orchestrate multiple decision models.
|
|
96
97
|
|
|
97
98
|
[bold][underline]Examples[/underline][/bold]
|
|
98
99
|
|
|
99
100
|
- Create an application with the name [magenta]Hare App[/magenta]. A random ID will be generated.
|
|
100
|
-
$ [
|
|
101
|
+
$ [green]nextmv cloud app create --name "Hare App"[/green]
|
|
101
102
|
|
|
102
103
|
- Create an application with the specific ID [magenta]hare-app[/magenta].
|
|
103
|
-
$ [
|
|
104
|
+
$ [green]nextmv cloud app create --name "Hare App" --app-id hare-app[/green]
|
|
104
105
|
|
|
105
106
|
- Create an application with an ID and description.
|
|
106
|
-
$ [
|
|
107
|
-
--description "An application for routing hares"[/
|
|
107
|
+
$ [green]nextmv cloud app create --name "Hare App" --app-id hare-app \\
|
|
108
|
+
--description "An application for routing hares"[/green]
|
|
108
109
|
|
|
109
110
|
- Create an application, or get it if it already exists.
|
|
110
|
-
$ [
|
|
111
|
+
$ [green]nextmv cloud app create --name "Hare App" --app-id hare-app --exist-ok[/green]
|
|
111
112
|
|
|
112
113
|
- Create a workflow application.
|
|
113
|
-
$ [
|
|
114
|
+
$ [green]nextmv cloud app create --name "Hare Workflow" --app-id hare-workflow --is-workflow[/green]
|
|
114
115
|
|
|
115
116
|
- Create an application with a default instance ID.
|
|
116
|
-
$ [
|
|
117
|
-
--default-instance-id burrow[/
|
|
117
|
+
$ [green]nextmv cloud app create --name "Hare App" --app-id hare-app \\
|
|
118
|
+
--default-instance-id burrow[/green]
|
|
118
119
|
|
|
119
120
|
- Create an application with a default experiment instance.
|
|
120
|
-
$ [
|
|
121
|
-
--default-experiment-instance experiment-v1[/
|
|
121
|
+
$ [green]nextmv cloud app create --name "Hare App" --app-id hare-app \\
|
|
122
|
+
--default-experiment-instance experiment-v1[/green]
|
|
122
123
|
"""
|
|
123
124
|
|
|
124
125
|
client = build_client(profile)
|
nextmv/cli/cloud/app/delete.py
CHANGED
|
@@ -5,9 +5,9 @@ This module defines the cloud app delete command for the Nextmv CLI.
|
|
|
5
5
|
from typing import Annotated
|
|
6
6
|
|
|
7
7
|
import typer
|
|
8
|
+
from rich.prompt import Confirm
|
|
8
9
|
|
|
9
10
|
from nextmv.cli.configuration.config import build_app
|
|
10
|
-
from nextmv.cli.confirm import get_confirmation
|
|
11
11
|
from nextmv.cli.message import info, success
|
|
12
12
|
from nextmv.cli.options import AppIDOption, ProfileOption
|
|
13
13
|
|
|
@@ -31,25 +31,26 @@ def delete(
|
|
|
31
31
|
"""
|
|
32
32
|
Deletes a Nextmv Cloud application.
|
|
33
33
|
|
|
34
|
-
This action is permanent and cannot be undone. Use the --yes
|
|
34
|
+
This action is permanent and cannot be undone. Use the [code]--yes[/code]
|
|
35
35
|
flag to skip the confirmation prompt.
|
|
36
36
|
|
|
37
37
|
[bold][underline]Examples[/underline][/bold]
|
|
38
38
|
|
|
39
39
|
- Delete the application with the ID [magenta]hare-app[/magenta].
|
|
40
|
-
$ [
|
|
40
|
+
$ [green]nextmv cloud app delete --app-id hare-app[/green]
|
|
41
41
|
|
|
42
42
|
- Delete the application with the ID [magenta]hare-app[/magenta] without confirmation prompt.
|
|
43
|
-
$ [
|
|
43
|
+
$ [green]nextmv cloud app delete --app-id hare-app --yes[/green]
|
|
44
44
|
"""
|
|
45
45
|
|
|
46
46
|
if not yes:
|
|
47
|
-
confirm =
|
|
47
|
+
confirm = Confirm.ask(
|
|
48
48
|
f"Are you sure you want to delete application [magenta]{app_id}[/magenta]? This action cannot be undone.",
|
|
49
|
+
default=False,
|
|
49
50
|
)
|
|
50
51
|
|
|
51
52
|
if not confirm:
|
|
52
|
-
info(f"Application [magenta]{app_id}[/magenta] will not be deleted.")
|
|
53
|
+
info(msg=f"Application [magenta]{app_id}[/magenta] will not be deleted.", emoji=":bulb:")
|
|
53
54
|
return
|
|
54
55
|
|
|
55
56
|
cloud_app = build_app(app_id=app_id, profile=profile)
|
nextmv/cli/cloud/app/exists.py
CHANGED
|
@@ -27,11 +27,11 @@ def exists(
|
|
|
27
27
|
[bold][underline]Examples[/underline][/bold]
|
|
28
28
|
|
|
29
29
|
- Check if the application with the ID [magenta]hare-app[/magenta] exists.
|
|
30
|
-
$ [
|
|
30
|
+
$ [green]nextmv cloud app exists --app-id hare-app[/green]
|
|
31
31
|
|
|
32
32
|
- Check if the application with the ID [magenta]hare-app[/magenta] exists.
|
|
33
33
|
Use the profile named [magenta]hare[/magenta].
|
|
34
|
-
$ [
|
|
34
|
+
$ [green]nextmv cloud app exists --app-id hare-app --profile hare[/green]
|
|
35
35
|
"""
|
|
36
36
|
|
|
37
37
|
client = build_client(profile)
|
nextmv/cli/cloud/app/get.py
CHANGED
|
@@ -39,11 +39,11 @@ def get(
|
|
|
39
39
|
[bold][underline]Examples[/underline][/bold]
|
|
40
40
|
|
|
41
41
|
- Get the application with the ID [magenta]hare-app[/magenta].
|
|
42
|
-
$ [
|
|
42
|
+
$ [green]nextmv cloud app get --app-id hare-app[/green]
|
|
43
43
|
|
|
44
44
|
- Get the application with the ID [magenta]hare-app[/magenta] and save the information to an
|
|
45
45
|
[magenta]app.json[/magenta] file.
|
|
46
|
-
$ [
|
|
46
|
+
$ [green]nextmv cloud app get --app-id hare-app --output app.json[/green]
|
|
47
47
|
"""
|
|
48
48
|
|
|
49
49
|
client = build_client(profile)
|
nextmv/cli/cloud/app/list.py
CHANGED
|
@@ -35,13 +35,13 @@ def list(
|
|
|
35
35
|
[bold][underline]Examples[/underline][/bold]
|
|
36
36
|
|
|
37
37
|
- List all applications.
|
|
38
|
-
$ [
|
|
38
|
+
$ [green]nextmv cloud app list[/green]
|
|
39
39
|
|
|
40
40
|
- List all applications using the profile named [magenta]hare[/magenta].
|
|
41
|
-
$ [
|
|
41
|
+
$ [green]nextmv cloud app list --profile hare[/green]
|
|
42
42
|
|
|
43
43
|
- List all applications and save the information to an [magenta]apps.json[/magenta] file.
|
|
44
|
-
$ [
|
|
44
|
+
$ [green]nextmv cloud app list --output apps.json[/green]
|
|
45
45
|
"""
|
|
46
46
|
|
|
47
47
|
client = build_client(profile)
|