nextmv 1.0.0.dev3__py3-none-any.whl → 1.0.0.dev5__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 (135) hide show
  1. nextmv/__about__.py +1 -1
  2. nextmv/__entrypoint__.py +1 -2
  3. nextmv/__init__.py +0 -4
  4. nextmv/_serialization.py +1 -1
  5. nextmv/cli/CONTRIBUTING.md +81 -29
  6. nextmv/cli/cloud/acceptance/create.py +24 -26
  7. nextmv/cli/cloud/acceptance/delete.py +7 -8
  8. nextmv/cli/cloud/acceptance/get.py +9 -10
  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 +6 -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 +25 -26
  17. nextmv/cli/cloud/app/delete.py +5 -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 +368 -54
  22. nextmv/cli/cloud/app/update.py +12 -12
  23. nextmv/cli/cloud/batch/create.py +26 -28
  24. nextmv/cli/cloud/batch/delete.py +5 -6
  25. nextmv/cli/cloud/batch/get.py +8 -8
  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 +2 -0
  32. nextmv/cli/cloud/ensemble/create.py +21 -22
  33. nextmv/cli/cloud/ensemble/delete.py +5 -6
  34. nextmv/cli/cloud/ensemble/get.py +4 -4
  35. nextmv/cli/cloud/ensemble/list.py +63 -0
  36. nextmv/cli/cloud/ensemble/update.py +9 -9
  37. nextmv/cli/cloud/input_set/create.py +20 -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 +14 -15
  42. nextmv/cli/cloud/instance/delete.py +5 -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 +14 -16
  48. nextmv/cli/cloud/managed_input/delete.py +6 -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 +32 -33
  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 +9 -10
  58. nextmv/cli/cloud/run/metadata.py +4 -4
  59. nextmv/cli/cloud/run/track.py +32 -33
  60. nextmv/cli/cloud/scenario/create.py +21 -21
  61. nextmv/cli/cloud/scenario/delete.py +5 -6
  62. nextmv/cli/cloud/scenario/get.py +8 -8
  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 +5 -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 +17 -20
  71. nextmv/cli/cloud/shadow/create.py +31 -31
  72. nextmv/cli/cloud/shadow/delete.py +5 -6
  73. nextmv/cli/cloud/shadow/get.py +2 -2
  74. nextmv/cli/cloud/shadow/list.py +3 -3
  75. nextmv/cli/cloud/shadow/metadata.py +4 -4
  76. nextmv/cli/cloud/shadow/start.py +3 -3
  77. nextmv/cli/cloud/shadow/stop.py +4 -6
  78. nextmv/cli/cloud/shadow/update.py +6 -6
  79. nextmv/cli/cloud/switchback/create.py +19 -15
  80. nextmv/cli/cloud/switchback/delete.py +5 -6
  81. nextmv/cli/cloud/switchback/get.py +3 -3
  82. nextmv/cli/cloud/switchback/list.py +3 -3
  83. nextmv/cli/cloud/switchback/metadata.py +6 -6
  84. nextmv/cli/cloud/switchback/start.py +4 -4
  85. nextmv/cli/cloud/switchback/stop.py +4 -6
  86. nextmv/cli/cloud/switchback/update.py +6 -6
  87. nextmv/cli/cloud/upload/create.py +2 -2
  88. nextmv/cli/cloud/version/create.py +9 -10
  89. nextmv/cli/cloud/version/delete.py +5 -6
  90. nextmv/cli/cloud/version/exists.py +2 -2
  91. nextmv/cli/cloud/version/get.py +2 -2
  92. nextmv/cli/cloud/version/list.py +3 -3
  93. nextmv/cli/cloud/version/update.py +8 -8
  94. nextmv/cli/community/clone.py +12 -10
  95. nextmv/cli/community/list.py +9 -9
  96. nextmv/cli/configuration/config.py +43 -10
  97. nextmv/cli/configuration/create.py +3 -3
  98. nextmv/cli/configuration/delete.py +7 -7
  99. nextmv/cli/configuration/list.py +3 -3
  100. nextmv/cli/confirm.py +34 -0
  101. nextmv/cli/main.py +27 -36
  102. nextmv/cli/message.py +2 -2
  103. nextmv/cli/version.py +1 -1
  104. nextmv/cloud/__init__.py +0 -38
  105. nextmv/cloud/acceptance_test.py +1 -65
  106. nextmv/cloud/account.py +1 -6
  107. nextmv/cloud/application/__init__.py +192 -54
  108. nextmv/cloud/application/_batch_scenario.py +4 -19
  109. nextmv/cloud/application/_instance.py +3 -3
  110. nextmv/cloud/application/_managed_input.py +2 -2
  111. nextmv/cloud/application/_run.py +8 -1
  112. nextmv/cloud/application/_shadow.py +2 -2
  113. nextmv/cloud/application/_switchback.py +12 -4
  114. nextmv/cloud/application/_version.py +4 -3
  115. nextmv/cloud/client.py +1 -1
  116. nextmv/cloud/shadow.py +43 -4
  117. nextmv/cloud/switchback.py +46 -9
  118. nextmv/default_app/main.py +4 -6
  119. nextmv/deprecated.py +5 -3
  120. nextmv/input.py +0 -52
  121. nextmv/local/executor.py +83 -3
  122. nextmv/local/geojson_handler.py +1 -1
  123. nextmv/local/runner.py +1 -1
  124. nextmv/manifest.py +11 -7
  125. nextmv/model.py +2 -2
  126. nextmv/options.py +10 -255
  127. nextmv/output.py +57 -83
  128. nextmv/run.py +13 -13
  129. nextmv/status.py +1 -51
  130. {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev5.dist-info}/METADATA +1 -1
  131. nextmv-1.0.0.dev5.dist-info/RECORD +183 -0
  132. nextmv-1.0.0.dev3.dist-info/RECORD +0 -181
  133. {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev5.dist-info}/WHEEL +0 -0
  134. {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev5.dist-info}/entry_points.txt +0 -0
  135. {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev5.dist-info}/licenses/LICENSE +0 -0
@@ -31,7 +31,7 @@ def get(
31
31
  profile: ProfileOption = None,
32
32
  ) -> None:
33
33
  """
34
- Get a Nextmv Cloud account.
34
+ Get the information of 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
- $ [green]nextmv cloud account get --account-id bunny-logistics[/green]
42
+ $ [dim]nextmv cloud account get --account-id bunny-logistics[/dim]
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
- $ [green]nextmv cloud account get --account-id cottontail-couriers --output account.json[/green]
46
+ $ [dim]nextmv cloud account get --account-id cottontail-couriers --output account.json[/dim]
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 a Nextmv Cloud account.
42
+ Updates information of 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
- $ [green]nextmv cloud account update --account-id hare-delivery \\
50
- --name "Hare Delivery Co"[/green]
49
+ $ [dim]nextmv cloud account update --account-id hare-delivery \\
50
+ --name "Hare Delivery Co"[/dim]
51
51
 
52
52
  - Update an account and save the updated information to an [magenta]updated_account.json[/magenta] file.
53
- $ [green]nextmv cloud account update --account-id cottontail-couriers \\
54
- --name "Cottontail Express" --output updated_account.json[/green]
53
+ $ [dim]nextmv cloud account update --account-id cottontail-couriers \\
54
+ --name "Cottontail Express" --output updated_account.json[/dim]
55
55
  """
56
56
 
57
57
  cloud_account = build_account(account_id=account_id, profile=profile)
@@ -17,15 +17,6 @@ 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
- ],
29
20
  app_id: Annotated[
30
21
  str | None,
31
22
  typer.Option(
@@ -79,47 +70,55 @@ def create(
79
70
  help="Whether the application is a workflow.",
80
71
  ),
81
72
  ] = 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 [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.
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.
91
91
 
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
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
95
94
  [link=https://github.com/nextmv-io/nextpipe][bold]Nextpipe[/bold][/link] to
96
95
  orchestrate multiple decision models.
97
96
 
98
97
  [bold][underline]Examples[/underline][/bold]
99
98
 
100
99
  - Create an application with the name [magenta]Hare App[/magenta]. A random ID will be generated.
101
- $ [green]nextmv cloud app create --name "Hare App"[/green]
100
+ $ [dim]nextmv cloud app create --name "Hare App"[/dim]
102
101
 
103
102
  - Create an application with the specific ID [magenta]hare-app[/magenta].
104
- $ [green]nextmv cloud app create --name "Hare App" --app-id hare-app[/green]
103
+ $ [dim]nextmv cloud app create --name "Hare App" --app-id hare-app[/dim]
105
104
 
106
105
  - Create an application with an ID and description.
107
- $ [green]nextmv cloud app create --name "Hare App" --app-id hare-app \\
108
- --description "An application for routing hares"[/green]
106
+ $ [dim]nextmv cloud app create --name "Hare App" --app-id hare-app \\
107
+ --description "An application for routing hares"[/dim]
109
108
 
110
109
  - Create an application, or get it if it already exists.
111
- $ [green]nextmv cloud app create --name "Hare App" --app-id hare-app --exist-ok[/green]
110
+ $ [dim]nextmv cloud app create --name "Hare App" --app-id hare-app --exist-ok[/dim]
112
111
 
113
112
  - Create a workflow application.
114
- $ [green]nextmv cloud app create --name "Hare Workflow" --app-id hare-workflow --is-workflow[/green]
113
+ $ [dim]nextmv cloud app create --name "Hare Workflow" --app-id hare-workflow --is-workflow[/dim]
115
114
 
116
115
  - Create an application with a default instance ID.
117
- $ [green]nextmv cloud app create --name "Hare App" --app-id hare-app \\
118
- --default-instance-id burrow[/green]
116
+ $ [dim]nextmv cloud app create --name "Hare App" --app-id hare-app \\
117
+ --default-instance-id burrow[/dim]
119
118
 
120
119
  - Create an application with a default experiment instance.
121
- $ [green]nextmv cloud app create --name "Hare App" --app-id hare-app \\
122
- --default-experiment-instance experiment-v1[/green]
120
+ $ [dim]nextmv cloud app create --name "Hare App" --app-id hare-app \\
121
+ --default-experiment-instance experiment-v1[/dim]
123
122
  """
124
123
 
125
124
  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
9
8
 
10
9
  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,22 +31,21 @@ def delete(
31
31
  """
32
32
  Deletes a Nextmv Cloud application.
33
33
 
34
- This action is permanent and cannot be undone. Use the [code]--yes[/code]
34
+ This action is permanent and cannot be undone. Use the --yes
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
- $ [green]nextmv cloud app delete --app-id hare-app[/green]
40
+ $ [dim]nextmv cloud app delete --app-id hare-app[/dim]
41
41
 
42
42
  - Delete the application with the ID [magenta]hare-app[/magenta] without confirmation prompt.
43
- $ [green]nextmv cloud app delete --app-id hare-app --yes[/green]
43
+ $ [dim]nextmv cloud app delete --app-id hare-app --yes[/dim]
44
44
  """
45
45
 
46
46
  if not yes:
47
- confirm = Confirm.ask(
47
+ confirm = get_confirmation(
48
48
  f"Are you sure you want to delete application [magenta]{app_id}[/magenta]? This action cannot be undone.",
49
- default=False,
50
49
  )
51
50
 
52
51
  if not confirm:
@@ -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
- $ [green]nextmv cloud app exists --app-id hare-app[/green]
30
+ $ [dim]nextmv cloud app exists --app-id hare-app[/dim]
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
- $ [green]nextmv cloud app exists --app-id hare-app --profile hare[/green]
34
+ $ [dim]nextmv cloud app exists --app-id hare-app --profile hare[/dim]
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
- $ [green]nextmv cloud app get --app-id hare-app[/green]
42
+ $ [dim]nextmv cloud app get --app-id hare-app[/dim]
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
- $ [green]nextmv cloud app get --app-id hare-app --output app.json[/green]
46
+ $ [dim]nextmv cloud app get --app-id hare-app --output app.json[/dim]
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
- $ [green]nextmv cloud app list[/green]
38
+ $ [dim]nextmv cloud app list[/dim]
39
39
 
40
40
  - List all applications using the profile named [magenta]hare[/magenta].
41
- $ [green]nextmv cloud app list --profile hare[/green]
41
+ $ [dim]nextmv cloud app list --profile hare[/dim]
42
42
 
43
43
  - List all applications and save the information to an [magenta]apps.json[/magenta] file.
44
- $ [green]nextmv cloud app list --output apps.json[/green]
44
+ $ [dim]nextmv cloud app list --output apps.json[/dim]
45
45
  """
46
46
 
47
47
  client = build_client(profile)