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.
Files changed (140) hide show
  1. nextmv/__about__.py +1 -1
  2. nextmv/__entrypoint__.py +2 -1
  3. nextmv/__init__.py +4 -0
  4. nextmv/cli/CONTRIBUTING.md +40 -112
  5. nextmv/cli/cloud/__init__.py +0 -4
  6. nextmv/cli/cloud/acceptance/create.py +22 -20
  7. nextmv/cli/cloud/acceptance/delete.py +12 -8
  8. nextmv/cli/cloud/acceptance/get.py +10 -9
  9. nextmv/cli/cloud/acceptance/list.py +3 -3
  10. nextmv/cli/cloud/acceptance/update.py +6 -6
  11. nextmv/cli/cloud/account/__init__.py +3 -3
  12. nextmv/cli/cloud/account/create.py +11 -11
  13. nextmv/cli/cloud/account/delete.py +8 -7
  14. nextmv/cli/cloud/account/get.py +3 -3
  15. nextmv/cli/cloud/account/update.py +5 -5
  16. nextmv/cli/cloud/app/create.py +26 -25
  17. nextmv/cli/cloud/app/delete.py +7 -6
  18. nextmv/cli/cloud/app/exists.py +2 -2
  19. nextmv/cli/cloud/app/get.py +2 -2
  20. nextmv/cli/cloud/app/list.py +3 -3
  21. nextmv/cli/cloud/app/push.py +54 -349
  22. nextmv/cli/cloud/app/update.py +12 -12
  23. nextmv/cli/cloud/batch/create.py +28 -26
  24. nextmv/cli/cloud/batch/delete.py +10 -6
  25. nextmv/cli/cloud/batch/get.py +9 -9
  26. nextmv/cli/cloud/batch/list.py +3 -3
  27. nextmv/cli/cloud/batch/metadata.py +4 -4
  28. nextmv/cli/cloud/batch/update.py +6 -6
  29. nextmv/cli/cloud/data/__init__.py +1 -1
  30. nextmv/cli/cloud/data/upload.py +15 -15
  31. nextmv/cli/cloud/ensemble/__init__.py +0 -2
  32. nextmv/cli/cloud/ensemble/create.py +22 -21
  33. nextmv/cli/cloud/ensemble/delete.py +10 -6
  34. nextmv/cli/cloud/ensemble/get.py +4 -4
  35. nextmv/cli/cloud/ensemble/update.py +9 -9
  36. nextmv/cli/cloud/input_set/__init__.py +0 -2
  37. nextmv/cli/cloud/input_set/create.py +22 -22
  38. nextmv/cli/cloud/input_set/get.py +3 -3
  39. nextmv/cli/cloud/input_set/list.py +3 -3
  40. nextmv/cli/cloud/input_set/update.py +24 -24
  41. nextmv/cli/cloud/instance/create.py +15 -14
  42. nextmv/cli/cloud/instance/delete.py +7 -6
  43. nextmv/cli/cloud/instance/exists.py +2 -2
  44. nextmv/cli/cloud/instance/get.py +2 -2
  45. nextmv/cli/cloud/instance/list.py +3 -3
  46. nextmv/cli/cloud/instance/update.py +14 -14
  47. nextmv/cli/cloud/managed_input/create.py +16 -14
  48. nextmv/cli/cloud/managed_input/delete.py +8 -7
  49. nextmv/cli/cloud/managed_input/get.py +3 -3
  50. nextmv/cli/cloud/managed_input/list.py +3 -3
  51. nextmv/cli/cloud/managed_input/update.py +9 -9
  52. nextmv/cli/cloud/run/cancel.py +2 -2
  53. nextmv/cli/cloud/run/create.py +40 -34
  54. nextmv/cli/cloud/run/get.py +8 -8
  55. nextmv/cli/cloud/run/input.py +4 -4
  56. nextmv/cli/cloud/run/list.py +6 -6
  57. nextmv/cli/cloud/run/logs.py +10 -9
  58. nextmv/cli/cloud/run/metadata.py +4 -4
  59. nextmv/cli/cloud/run/track.py +33 -32
  60. nextmv/cli/cloud/scenario/create.py +21 -21
  61. nextmv/cli/cloud/scenario/delete.py +10 -6
  62. nextmv/cli/cloud/scenario/get.py +9 -9
  63. nextmv/cli/cloud/scenario/list.py +3 -3
  64. nextmv/cli/cloud/scenario/metadata.py +4 -4
  65. nextmv/cli/cloud/scenario/update.py +6 -6
  66. nextmv/cli/cloud/secrets/create.py +17 -17
  67. nextmv/cli/cloud/secrets/delete.py +10 -6
  68. nextmv/cli/cloud/secrets/get.py +4 -4
  69. nextmv/cli/cloud/secrets/list.py +3 -3
  70. nextmv/cli/cloud/secrets/update.py +20 -17
  71. nextmv/cli/cloud/upload/create.py +2 -2
  72. nextmv/cli/cloud/version/create.py +10 -9
  73. nextmv/cli/cloud/version/delete.py +7 -6
  74. nextmv/cli/cloud/version/exists.py +2 -2
  75. nextmv/cli/cloud/version/get.py +2 -2
  76. nextmv/cli/cloud/version/list.py +3 -3
  77. nextmv/cli/cloud/version/update.py +8 -8
  78. nextmv/cli/community/__init__.py +1 -1
  79. nextmv/cli/community/clone.py +204 -20
  80. nextmv/cli/community/list.py +125 -60
  81. nextmv/cli/configuration/config.py +10 -43
  82. nextmv/cli/configuration/create.py +7 -7
  83. nextmv/cli/configuration/delete.py +8 -8
  84. nextmv/cli/configuration/list.py +3 -3
  85. nextmv/cli/main.py +36 -26
  86. nextmv/cli/message.py +54 -71
  87. nextmv/cli/options.py +0 -28
  88. nextmv/cli/version.py +1 -1
  89. nextmv/cloud/__init__.py +38 -14
  90. nextmv/cloud/acceptance_test.py +65 -1
  91. nextmv/cloud/account.py +6 -1
  92. nextmv/cloud/application/__init__.py +75 -18
  93. nextmv/cloud/application/_acceptance.py +8 -13
  94. nextmv/cloud/application/_batch_scenario.py +19 -4
  95. nextmv/cloud/application/_input_set.py +6 -42
  96. nextmv/cloud/application/_instance.py +3 -3
  97. nextmv/cloud/application/_managed_input.py +2 -2
  98. nextmv/cloud/application/_version.py +3 -4
  99. nextmv/cloud/batch_experiment.py +1 -3
  100. nextmv/cloud/integration.py +4 -7
  101. nextmv/deprecated.py +3 -5
  102. nextmv/input.py +52 -0
  103. nextmv/local/runner.py +1 -1
  104. nextmv/model.py +11 -50
  105. nextmv/options.py +256 -11
  106. nextmv/output.py +62 -0
  107. nextmv/run.py +10 -1
  108. nextmv/status.py +51 -1
  109. {nextmv-1.0.0.dist-info → nextmv-1.0.0.dev0.dist-info}/METADATA +4 -5
  110. nextmv-1.0.0.dev0.dist-info/RECORD +158 -0
  111. nextmv/cli/cloud/ensemble/list.py +0 -63
  112. nextmv/cli/cloud/input_set/delete.py +0 -64
  113. nextmv/cli/cloud/shadow/__init__.py +0 -33
  114. nextmv/cli/cloud/shadow/create.py +0 -184
  115. nextmv/cli/cloud/shadow/delete.py +0 -64
  116. nextmv/cli/cloud/shadow/get.py +0 -61
  117. nextmv/cli/cloud/shadow/list.py +0 -63
  118. nextmv/cli/cloud/shadow/metadata.py +0 -66
  119. nextmv/cli/cloud/shadow/start.py +0 -43
  120. nextmv/cli/cloud/shadow/stop.py +0 -53
  121. nextmv/cli/cloud/shadow/update.py +0 -96
  122. nextmv/cli/cloud/switchback/__init__.py +0 -33
  123. nextmv/cli/cloud/switchback/create.py +0 -151
  124. nextmv/cli/cloud/switchback/delete.py +0 -64
  125. nextmv/cli/cloud/switchback/get.py +0 -62
  126. nextmv/cli/cloud/switchback/list.py +0 -63
  127. nextmv/cli/cloud/switchback/metadata.py +0 -68
  128. nextmv/cli/cloud/switchback/start.py +0 -43
  129. nextmv/cli/cloud/switchback/stop.py +0 -53
  130. nextmv/cli/cloud/switchback/update.py +0 -96
  131. nextmv/cli/confirm.py +0 -34
  132. nextmv/cloud/application/_shadow.py +0 -320
  133. nextmv/cloud/application/_switchback.py +0 -332
  134. nextmv/cloud/community.py +0 -446
  135. nextmv/cloud/shadow.py +0 -254
  136. nextmv/cloud/switchback.py +0 -228
  137. nextmv-1.0.0.dist-info/RECORD +0 -185
  138. nextmv-1.0.0.dist-info/entry_points.txt +0 -2
  139. {nextmv-1.0.0.dist-info → nextmv-1.0.0.dev0.dist-info}/WHEEL +0 -0
  140. {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 SSO-enabled organization.
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
- $ [dim]nextmv cloud account delete --account-id bunnies-account[/dim]
42
+ $ [green]nextmv cloud account delete --account-id bunnies-account[/green]
43
43
 
44
44
  - Delete the account without confirmation prompt.
45
- $ [dim]nextmv cloud account delete --account-id bunnies-account --yes[/dim]
45
+ $ [green]nextmv cloud account delete --account-id bunnies-account --yes[/green]
46
46
  """
47
47
 
48
48
  if not yes:
49
- confirm = get_confirmation(
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)
@@ -31,7 +31,7 @@ def get(
31
31
  profile: ProfileOption = None,
32
32
  ) -> None:
33
33
  """
34
- Get the information of a Nextmv Cloud account.
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
- $ [dim]nextmv cloud account get --account-id bunny-logistics[/dim]
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
- $ [dim]nextmv cloud account get --account-id cottontail-couriers --output account.json[/dim]
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 information of a Nextmv Cloud account.
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
- $ [dim]nextmv cloud account update --account-id hare-delivery \\
50
- --name "Hare Delivery Co"[/dim]
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
- $ [dim]nextmv cloud account update --account-id cottontail-couriers \\
54
- --name "Cottontail Express" --output updated_account.json[/dim]
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)
@@ -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 application with
88
- an ID that already exists. This is useful for scripts that need to ensure
89
- an application exists without worrying about whether it was created
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 --is-workflow flag.
93
- Workflows allow for more complex decision-making processes by leveraging
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
- $ [dim]nextmv cloud app create --name "Hare App"[/dim]
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
- $ [dim]nextmv cloud app create --name "Hare App" --app-id hare-app[/dim]
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
- $ [dim]nextmv cloud app create --name "Hare App" --app-id hare-app \\
107
- --description "An application for routing hares"[/dim]
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
- $ [dim]nextmv cloud app create --name "Hare App" --app-id hare-app --exist-ok[/dim]
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
- $ [dim]nextmv cloud app create --name "Hare Workflow" --app-id hare-workflow --is-workflow[/dim]
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
- $ [dim]nextmv cloud app create --name "Hare App" --app-id hare-app \\
117
- --default-instance-id burrow[/dim]
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
- $ [dim]nextmv cloud app create --name "Hare App" --app-id hare-app \\
121
- --default-experiment-instance experiment-v1[/dim]
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)
@@ -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
- $ [dim]nextmv cloud app delete --app-id hare-app[/dim]
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
- $ [dim]nextmv cloud app delete --app-id hare-app --yes[/dim]
43
+ $ [green]nextmv cloud app delete --app-id hare-app --yes[/green]
44
44
  """
45
45
 
46
46
  if not yes:
47
- confirm = get_confirmation(
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)
@@ -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
- $ [dim]nextmv cloud app exists --app-id hare-app[/dim]
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
- $ [dim]nextmv cloud app exists --app-id hare-app --profile hare[/dim]
34
+ $ [green]nextmv cloud app exists --app-id hare-app --profile hare[/green]
35
35
  """
36
36
 
37
37
  client = build_client(profile)
@@ -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
- $ [dim]nextmv cloud app get --app-id hare-app[/dim]
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
- $ [dim]nextmv cloud app get --app-id hare-app --output app.json[/dim]
46
+ $ [green]nextmv cloud app get --app-id hare-app --output app.json[/green]
47
47
  """
48
48
 
49
49
  client = build_client(profile)
@@ -35,13 +35,13 @@ def list(
35
35
  [bold][underline]Examples[/underline][/bold]
36
36
 
37
37
  - List all applications.
38
- $ [dim]nextmv cloud app list[/dim]
38
+ $ [green]nextmv cloud app list[/green]
39
39
 
40
40
  - List all applications using the profile named [magenta]hare[/magenta].
41
- $ [dim]nextmv cloud app list --profile hare[/dim]
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
- $ [dim]nextmv cloud app list --output apps.json[/dim]
44
+ $ [green]nextmv cloud app list --output apps.json[/green]
45
45
  """
46
46
 
47
47
  client = build_client(profile)