nextmv 1.0.0.dev3__py3-none-any.whl → 1.0.0.dev4__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 (115) hide show
  1. nextmv/__about__.py +1 -1
  2. nextmv/cli/CONTRIBUTING.md +81 -29
  3. nextmv/cli/cloud/acceptance/create.py +20 -22
  4. nextmv/cli/cloud/acceptance/delete.py +7 -8
  5. nextmv/cli/cloud/acceptance/get.py +9 -10
  6. nextmv/cli/cloud/acceptance/list.py +3 -3
  7. nextmv/cli/cloud/acceptance/update.py +6 -6
  8. nextmv/cli/cloud/account/__init__.py +3 -3
  9. nextmv/cli/cloud/account/create.py +11 -11
  10. nextmv/cli/cloud/account/delete.py +6 -7
  11. nextmv/cli/cloud/account/get.py +3 -3
  12. nextmv/cli/cloud/account/update.py +5 -5
  13. nextmv/cli/cloud/app/create.py +25 -26
  14. nextmv/cli/cloud/app/delete.py +5 -6
  15. nextmv/cli/cloud/app/exists.py +2 -2
  16. nextmv/cli/cloud/app/get.py +2 -2
  17. nextmv/cli/cloud/app/list.py +3 -3
  18. nextmv/cli/cloud/app/push.py +269 -45
  19. nextmv/cli/cloud/app/update.py +12 -12
  20. nextmv/cli/cloud/batch/create.py +26 -28
  21. nextmv/cli/cloud/batch/delete.py +5 -6
  22. nextmv/cli/cloud/batch/get.py +8 -8
  23. nextmv/cli/cloud/batch/list.py +3 -3
  24. nextmv/cli/cloud/batch/metadata.py +4 -4
  25. nextmv/cli/cloud/batch/update.py +6 -6
  26. nextmv/cli/cloud/data/__init__.py +1 -1
  27. nextmv/cli/cloud/data/upload.py +15 -15
  28. nextmv/cli/cloud/ensemble/__init__.py +2 -0
  29. nextmv/cli/cloud/ensemble/create.py +21 -22
  30. nextmv/cli/cloud/ensemble/delete.py +5 -6
  31. nextmv/cli/cloud/ensemble/get.py +4 -4
  32. nextmv/cli/cloud/ensemble/list.py +63 -0
  33. nextmv/cli/cloud/ensemble/update.py +9 -9
  34. nextmv/cli/cloud/input_set/create.py +20 -22
  35. nextmv/cli/cloud/input_set/get.py +3 -3
  36. nextmv/cli/cloud/input_set/list.py +3 -3
  37. nextmv/cli/cloud/input_set/update.py +24 -24
  38. nextmv/cli/cloud/instance/create.py +14 -15
  39. nextmv/cli/cloud/instance/delete.py +5 -6
  40. nextmv/cli/cloud/instance/exists.py +2 -2
  41. nextmv/cli/cloud/instance/get.py +2 -2
  42. nextmv/cli/cloud/instance/list.py +3 -3
  43. nextmv/cli/cloud/instance/update.py +14 -14
  44. nextmv/cli/cloud/managed_input/create.py +14 -16
  45. nextmv/cli/cloud/managed_input/delete.py +6 -7
  46. nextmv/cli/cloud/managed_input/get.py +3 -3
  47. nextmv/cli/cloud/managed_input/list.py +3 -3
  48. nextmv/cli/cloud/managed_input/update.py +9 -9
  49. nextmv/cli/cloud/run/cancel.py +2 -2
  50. nextmv/cli/cloud/run/create.py +32 -33
  51. nextmv/cli/cloud/run/get.py +8 -8
  52. nextmv/cli/cloud/run/input.py +4 -4
  53. nextmv/cli/cloud/run/list.py +6 -6
  54. nextmv/cli/cloud/run/logs.py +9 -10
  55. nextmv/cli/cloud/run/metadata.py +4 -4
  56. nextmv/cli/cloud/run/track.py +32 -33
  57. nextmv/cli/cloud/scenario/create.py +21 -21
  58. nextmv/cli/cloud/scenario/delete.py +5 -6
  59. nextmv/cli/cloud/scenario/get.py +8 -8
  60. nextmv/cli/cloud/scenario/list.py +3 -3
  61. nextmv/cli/cloud/scenario/metadata.py +4 -4
  62. nextmv/cli/cloud/scenario/update.py +6 -6
  63. nextmv/cli/cloud/secrets/create.py +17 -17
  64. nextmv/cli/cloud/secrets/delete.py +5 -6
  65. nextmv/cli/cloud/secrets/get.py +4 -4
  66. nextmv/cli/cloud/secrets/list.py +3 -3
  67. nextmv/cli/cloud/secrets/update.py +17 -20
  68. nextmv/cli/cloud/shadow/create.py +31 -31
  69. nextmv/cli/cloud/shadow/delete.py +5 -6
  70. nextmv/cli/cloud/shadow/get.py +2 -2
  71. nextmv/cli/cloud/shadow/list.py +3 -3
  72. nextmv/cli/cloud/shadow/metadata.py +4 -4
  73. nextmv/cli/cloud/shadow/start.py +3 -3
  74. nextmv/cli/cloud/shadow/stop.py +4 -6
  75. nextmv/cli/cloud/shadow/update.py +6 -6
  76. nextmv/cli/cloud/switchback/create.py +19 -15
  77. nextmv/cli/cloud/switchback/delete.py +5 -6
  78. nextmv/cli/cloud/switchback/get.py +3 -3
  79. nextmv/cli/cloud/switchback/list.py +3 -3
  80. nextmv/cli/cloud/switchback/metadata.py +6 -6
  81. nextmv/cli/cloud/switchback/start.py +4 -4
  82. nextmv/cli/cloud/switchback/stop.py +4 -6
  83. nextmv/cli/cloud/switchback/update.py +6 -6
  84. nextmv/cli/cloud/upload/create.py +2 -2
  85. nextmv/cli/cloud/version/create.py +9 -10
  86. nextmv/cli/cloud/version/delete.py +5 -6
  87. nextmv/cli/cloud/version/exists.py +2 -2
  88. nextmv/cli/cloud/version/get.py +2 -2
  89. nextmv/cli/cloud/version/list.py +3 -3
  90. nextmv/cli/cloud/version/update.py +8 -8
  91. nextmv/cli/community/clone.py +12 -10
  92. nextmv/cli/community/list.py +9 -9
  93. nextmv/cli/configuration/config.py +43 -10
  94. nextmv/cli/configuration/create.py +3 -3
  95. nextmv/cli/configuration/delete.py +7 -7
  96. nextmv/cli/configuration/list.py +3 -3
  97. nextmv/cli/confirm.py +32 -0
  98. nextmv/cli/main.py +27 -36
  99. nextmv/cli/message.py +2 -2
  100. nextmv/cli/version.py +1 -1
  101. nextmv/cloud/application/__init__.py +190 -54
  102. nextmv/cloud/application/_batch_scenario.py +2 -2
  103. nextmv/cloud/application/_instance.py +2 -2
  104. nextmv/cloud/application/_managed_input.py +1 -1
  105. nextmv/cloud/application/_shadow.py +1 -1
  106. nextmv/cloud/application/_switchback.py +11 -3
  107. nextmv/cloud/application/_version.py +3 -2
  108. nextmv/cloud/shadow.py +43 -4
  109. nextmv/cloud/switchback.py +46 -9
  110. {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev4.dist-info}/METADATA +1 -1
  111. nextmv-1.0.0.dev4.dist-info/RECORD +183 -0
  112. nextmv-1.0.0.dev3.dist-info/RECORD +0 -181
  113. {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev4.dist-info}/WHEEL +0 -0
  114. {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev4.dist-info}/entry_points.txt +0 -0
  115. {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev4.dist-info}/licenses/LICENSE +0 -0
nextmv/__about__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "v1.0.0.dev3"
1
+ __version__ = "v1.0.0.dev4"
@@ -173,23 +173,26 @@ guidelines:
173
173
 
174
174
  ## Confirmation prompts
175
175
 
176
- For destructive actions (like deletions), use `rich.prompt.Confirm.ask()` to
177
- ask for user confirmation before proceeding. Follow these guidelines:
176
+ For destructive actions (like deletions), use the `get_confirmation()` method
177
+ to ask for user confirmation before proceeding. The method is available from
178
+ the `cli/confirm.py` file. This method already handles sensible values used for
179
+ getting a confirmation from a user. Additionally, it handles non-interactive
180
+ sessions by defaulting to `False` if no input can be provided.
178
181
 
179
- - The confirmation message should use `[magenta]` for the variable being
182
+ When using confirmation prompts, follow these guidelines:
183
+
184
+ - The confirmation message should use `[magenta]` for the variable/s being
180
185
  affected.
181
- - Set `default=False` for safety, so the user must explicitly confirm.
182
- - Provide a `--yes` / `-y` flag to skip the confirmation prompt, useful for
183
- non-interactive sessions.
186
+ - Provide a `--yes` / `-y` flag to skip the confirmation prompt where possible,
187
+ useful for non-interactive sessions.
184
188
  - If the user declines, call `info()` with the `:bulb:` emoji and return early.
185
189
 
186
190
  Consider the `nextmv cloud app delete` command:
187
191
 
188
192
  ```python
189
193
  if not yes:
190
- confirm = Confirm.ask(
191
- f"Are you sure you want to delete application [magenta]{app_id}[/magenta]? This action cannot be undone",
192
- default=False,
194
+ confirm = get_confirmation(
195
+ f"Are you sure you want to delete application [magenta]{app_id}[/magenta]? This action cannot be undone.",
193
196
  )
194
197
 
195
198
  if not confirm:
@@ -197,14 +200,63 @@ if not yes:
197
200
  return
198
201
  ```
199
202
 
200
- ## Formatting
203
+ ## Formatting, colors, and styles
204
+
205
+ Use these Rich markup colors/styles when formatting help text and messages.
206
+ These are the main colors/styles that can be used for highlighting/contrast (we
207
+ limit colors to keep coloring consistent):
208
+
209
+ - `[code]`: commands. CLI related variables. - technical things that are CLI
210
+ commands.
211
+ - `[magenta]`: variable names, values, literals, etc. - mainly short technical things.
212
+ - `[dim]`: examples. - longer technical things.
213
+ - `[yellow]`: emphasis, highlight of special items, type contrast to
214
+ `[magenta]`. Use sparingly only.
201
215
 
202
- Use these Rich markup guidelines when formatting help text and messages.
216
+ In any case, the best advice is to follow existing examples in the codebase to
217
+ maintain consistency.
203
218
 
204
- - When talking about a command, or a command option, use the `[code]` `[/code]`
205
- tags. Take this example from the help menu of the `cloud/app/delete.py` file.
206
- In the command help, when referring to the `--yes` option, we use
207
- `[code]--yes[/code]` to format it as code.
219
+ Here are some guidelines for when to use each formatting style.
220
+
221
+ - When talking about a command use the `[code]` `[/code]` tags. Consider the
222
+ help message of the `cloud/shadow/stop.py` file. We tell the user they can
223
+ delete an experiment with the `nextmv cloud shadow delete` command. The
224
+ formatting of that command is done using the `[code]` `[/code]` tags:
225
+
226
+ ```python
227
+ @app.command()
228
+ def stop(
229
+ app_id: AppIDOption,
230
+ shadow_test_id: ShadowTestIDOption,
231
+ profile: ProfileOption = None,
232
+ ) -> None:
233
+ """
234
+ Stops a Nextmv Cloud shadow test.
235
+
236
+ Before stopping a shadow test, it must be in a started state. Experiments
237
+ in a [magenta]draft[/magenta] state, that haven't started, can be deleted
238
+ with the [code]nextmv cloud shadow delete[/code] command.
239
+
240
+ [bold][underline]Examples[/underline][/bold]
241
+
242
+ - Stop the shadow test with the ID [magenta]hop-analysis[/magenta] from application
243
+ [magenta]hare-app[/magenta].
244
+ $ [dim]nextmv cloud shadow stop --app-id hare-app --shadow-test-id hop-analysis[/dim]
245
+ """
246
+
247
+ in_progress(msg="Stopping shadow test...")
248
+ cloud_app = build_app(app_id=app_id, profile=profile)
249
+ cloud_app.stop_shadow_test(shadow_test_id=shadow_test_id)
250
+ success(
251
+ f"Shadow test [magenta]{shadow_test_id}[/magenta] stopped successfully "
252
+ f"in application [magenta]{app_id}[/magenta]."
253
+ )
254
+ ```
255
+
256
+ - When talking about a command option, there is no formatting needed. Typer
257
+ automatically adds coloring to options in the help menu. Take this example
258
+ from the help menu of the `cloud/app/delete.py` file. In the command help,
259
+ when referring to the `--yes` option:
208
260
 
209
261
  ```python
210
262
  @app.command()
@@ -223,16 +275,16 @@ Use these Rich markup guidelines when formatting help text and messages.
223
275
  """
224
276
  Deletes a Nextmv Cloud application.
225
277
 
226
- This action is permanent and cannot be undone. Use the [code]--yes[/code]
278
+ This action is permanent and cannot be undone. Use the --yes
227
279
  flag to skip the confirmation prompt.
228
280
 
229
281
  [bold][underline]Examples[/underline][/bold]
230
282
 
231
283
  - Delete the application with the ID [magenta]hare-app[/magenta].
232
- $ [green]nextmv cloud app delete --app-id hare-app[/green]
284
+ $ [dim]nextmv cloud app delete --app-id hare-app[/dim]
233
285
 
234
286
  - Delete the application with the ID [magenta]hare-app[/magenta] without confirmation prompt.
235
- $ [green]nextmv cloud app delete --app-id hare-app --yes[/green]
287
+ $ [dim]nextmv cloud app delete --app-id hare-app --yes[/dim]
236
288
  """
237
289
  ```
238
290
 
@@ -246,6 +298,12 @@ Use these Rich markup guidelines when formatting help text and messages.
246
298
  error(f"Input path [magenta]{input}[/magenta] does not exist.")
247
299
  ```
248
300
 
301
+ - When talking about longer technical things, like examples for a command
302
+ usage, or examples of a JSON object, use the `[dim]` `[/dim]` tags. Consider
303
+ the examples section of the `cloud/app/delete.py` file above. The example
304
+ commands are formatted using the `[dim]` `[/dim]` tags. The `[dim]` tag is
305
+ discussed in more detail in the command documentation section below.
306
+
249
307
  - Links to URLs should be formatted using the `[link=URL_LINK][bold]
250
308
  [/bold][/link]` tags. Consider the main help message of the `nextmv
251
309
  community` command, in the `community/__init__.py` file:
@@ -265,11 +323,6 @@ Use these Rich markup guidelines when formatting help text and messages.
265
323
  The link provided is <https://github.com/nextmv-io/community-apps>, and it will
266
324
  be applied to the text `nextmv-io/community-apps`.
267
325
 
268
- - Colors that can be used for highlighting (we limit colors to keep coloring consistent):
269
- - `[magenta]`: variable, literals, etc. - mainly short technical things (see above).
270
- - `[green]`: commands, etc. - longer technical things, or, as a type-contrast to magenta.
271
- - `[yellow]`: emphasis, highlight of special items, etc. (use sparingly only).
272
-
273
326
  ## Command documentation
274
327
 
275
328
  Every command should have good-enough documentation that guides the user on how
@@ -316,11 +369,11 @@ to use it.
316
369
  [bold][underline]Examples[/underline][/bold]
317
370
 
318
371
  - Get the application with the ID [magenta]hare-app[/magenta].
319
- $ [green]nextmv cloud app get --app-id hare-app[/green]
372
+ $ [dim]nextmv cloud app get --app-id hare-app[/dim]
320
373
 
321
374
  - Get the application with the ID [magenta]hare-app[/magenta] and save the information to an
322
375
  [magenta]app.json[/magenta] file.
323
- $ [green]nextmv cloud app get --app-id hare-app --output app.json[/green]
376
+ $ [dim]nextmv cloud app get --app-id hare-app --output app.json[/dim]
324
377
  """
325
378
 
326
379
  client = build_client(profile)
@@ -353,11 +406,10 @@ to use it.
353
406
 
354
407
  - The examples section is fenced with the `[bold][underline]
355
408
  [/underline][/bold]` tags.
356
-
357
409
  - Each example is listed as a bullet, using a hyphen (`-`).
358
410
  - Each example has a short description, followed by the command itself in a
359
411
  new line, with 4 spaces of indentation in comparison to where the hyphen is.
360
- - The command itself should be formatted using the `[green]` `[/green]` tags.
412
+ - The command itself should be formatted using the `[dim]` `[/dim]` tags.
361
413
  - The command should start with a dollar sign (`$`), followed by a space, and
362
414
  then the actual command.
363
415
  - When an example command is too long, use a double backslash (`\\`) for line
@@ -366,8 +418,8 @@ to use it.
366
418
 
367
419
  ```text
368
420
  - Create an application with an ID and description.
369
- $ [green]nextmv cloud app create --name "Hare App" --app-id hare-app \\
370
- --description "An application for routing hares"[/green]
421
+ $ [dim]nextmv cloud app create --name "Hare App" --app-id hare-app \\
422
+ --description "An application for routing hares"[/dim]
371
423
  ```
372
424
 
373
425
  ## Command options
@@ -27,24 +27,22 @@ app = typer.Typer()
27
27
 
28
28
  The acceptance test is based on a batch experiment. If the batch experiment
29
29
  with the same ID already exists, it will be reused. Otherwise, you must
30
- provide the [code]--input-set-id[/code] option to create a new batch
31
- experiment.
30
+ provide the --input-set-id option to create a new batch experiment.
32
31
 
33
- Use the [code]--wait[/code] flag to wait for the acceptance test to
34
- complete, polling for results. Using the [code]--output[/code] flag will
35
- also activate waiting, and allows you to specify a destination file for the
36
- results.
32
+ Use the --wait flag to wait for the acceptance test to complete, polling
33
+ for results. Using the --output flag will also activate waiting, and allows
34
+ you to specify a destination file for the results.
37
35
 
38
36
  [bold][underline]Metrics[/underline][/bold]
39
37
 
40
38
  Metrics are provided as [magenta]json[/magenta] objects using the
41
- [code]--metrics[/code] flag. Each metric defines how to compare the
39
+ --metrics flag. Each metric defines how to compare the
42
40
  candidate and baseline instances.
43
41
 
44
42
  You can provide metrics in three ways:
45
43
  - A single metric as a [magenta]json[/magenta] object.
46
- - Multiple metrics by repeating the [code]--metrics[/code] flag.
47
- - Multiple metrics as a [magenta]json[/magenta] array in a single [code]--metrics[/code] flag.
44
+ - Multiple metrics by repeating the --metrics flag.
45
+ - Multiple metrics as a [magenta]json[/magenta] array in a single --metrics flag.
48
46
 
49
47
  Each metric must have the following fields:
50
48
  - [magenta]field[/magenta]: Field of the metric to measure (e.g., "solution.objective").
@@ -57,7 +55,7 @@ app = typer.Typer()
57
55
  - [magenta]statistic[/magenta]: Statistical method. Allowed values: {enum_values(StatisticType)}.
58
56
 
59
57
  Object format:
60
- [green]{{
58
+ [dim]{{
61
59
  "field": "field",
62
60
  "metric_type": "type",
63
61
  "params": {{
@@ -68,12 +66,12 @@ app = typer.Typer()
68
66
  }}
69
67
  }},
70
68
  "statistic": "statistic"
71
- }}[/green]
69
+ }}[/dim]
72
70
 
73
71
  [bold][underline]Examples[/underline][/bold]
74
72
 
75
73
  - Create an acceptance test with a single metric.
76
- $ [green]METRIC='{{
74
+ $ [dim]METRIC='{{
77
75
  "field": "solution.objective",
78
76
  "metric_type": "direct-comparison",
79
77
  "params": {{
@@ -84,10 +82,10 @@ app = typer.Typer()
84
82
  }}'
85
83
  nextmv cloud acceptance create --app-id hare-app --acceptance-test-id test-123 \\
86
84
  --candidate-instance-id candidate-123 --baseline-instance-id baseline-456 \\
87
- --metrics "$METRIC" --input-set-id input-set-123[/green]
85
+ --metrics "$METRIC" --input-set-id input-set-123[/dim]
88
86
 
89
87
  - Create with multiple metrics by repeating the flag.
90
- $ [green]METRIC1='{{
88
+ $ [dim]METRIC1='{{
91
89
  "field": "solution.objective",
92
90
  "metric_type": "direct-comparison",
93
91
  "params": {{
@@ -107,10 +105,10 @@ app = typer.Typer()
107
105
  }}'
108
106
  nextmv cloud acceptance create --app-id hare-app --acceptance-test-id test-123 \\
109
107
  --candidate-instance-id candidate-123 --baseline-instance-id baseline-456 \\
110
- --metrics "$METRIC1" --metrics "$METRIC2" --input-set-id input-set-123[/green]
108
+ --metrics "$METRIC1" --metrics "$METRIC2" --input-set-id input-set-123[/dim]
111
109
 
112
110
  - Create with multiple metrics in a single [magenta]json[/magenta] array.
113
- $ [green]METRICS='[
111
+ $ [dim]METRICS='[
114
112
  {{
115
113
  "field": "solution.objective",
116
114
  "metric_type": "direct-comparison",
@@ -132,10 +130,10 @@ app = typer.Typer()
132
130
  ]'
133
131
  nextmv cloud acceptance create --app-id hare-app --acceptance-test-id test-123 \\
134
132
  --candidate-instance-id candidate-123 --baseline-instance-id baseline-456 \\
135
- --metrics "$METRICS" --input-set-id input-set-123[/green]
133
+ --metrics "$METRICS" --input-set-id input-set-123[/dim]
136
134
 
137
135
  - Create an acceptance test and wait for it to complete.
138
- $ [green]METRIC='{{
136
+ $ [dim]METRIC='{{
139
137
  "field": "solution.objective",
140
138
  "metric_type": "direct-comparison",
141
139
  "params": {{
@@ -146,10 +144,10 @@ app = typer.Typer()
146
144
  }}'
147
145
  nextmv cloud acceptance create --app-id hare-app --acceptance-test-id test-123 \\
148
146
  --candidate-instance-id candidate-123 --baseline-instance-id baseline-456 \\
149
- --metrics "$METRIC" --input-set-id input-set-123 --wait[/green]
147
+ --metrics "$METRIC" --input-set-id input-set-123 --wait[/dim]
150
148
 
151
149
  - Create an acceptance test and save the results to a file, waiting for completion.
152
- $ [green]METRIC='{{
150
+ $ [dim]METRIC='{{
153
151
  "field": "solution.objective",
154
152
  "metric_type": "direct-comparison",
155
153
  "params": {{
@@ -160,7 +158,7 @@ app = typer.Typer()
160
158
  }}'
161
159
  nextmv cloud acceptance create --app-id hare-app --acceptance-test-id test-123 \\
162
160
  --candidate-instance-id candidate-123 --baseline-instance-id baseline-456 \\
163
- --metrics "$METRIC" --input-set-id input-set-123 --output results.json[/green]
161
+ --metrics "$METRIC" --input-set-id input-set-123 --output results.json[/dim]
164
162
  """
165
163
  )
166
164
  def create(
@@ -265,7 +263,7 @@ def create(
265
263
  "--wait",
266
264
  "-w",
267
265
  help="Wait for the acceptance test to complete. Results are printed to [magenta]stdout[/magenta]. "
268
- "Specify output location with [code]--output[/code].",
266
+ "Specify output location with --output.",
269
267
  rich_help_panel="Output control",
270
268
  ),
271
269
  ] = False,
@@ -5,9 +5,9 @@ This module defines the cloud acceptance 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 AcceptanceTestIDOption, AppIDOption, ProfileOption
13
13
 
@@ -32,25 +32,24 @@ def delete(
32
32
  """
33
33
  Deletes a Nextmv Cloud acceptance test.
34
34
 
35
- This action is permanent and cannot be undone. The underlying batch experiment
36
- and associated data will also be deleted. Use the [code]--yes[/code] flag to skip
37
- the confirmation prompt.
35
+ This action is permanent and cannot be undone. The underlying batch
36
+ experiment and associated data will also be deleted. Use the --yes flag to
37
+ skip the confirmation prompt.
38
38
 
39
39
  [bold][underline]Examples[/underline][/bold]
40
40
 
41
41
  - Delete the acceptance test with the ID [magenta]test-cotton-tail[/magenta] from application
42
42
  [magenta]hare-app[/magenta].
43
- $ [green]nextmv cloud acceptance delete --app-id hare-app --acceptance-test-id test-cotton-tail[/green]
43
+ $ [dim]nextmv cloud acceptance delete --app-id hare-app --acceptance-test-id test-cotton-tail[/dim]
44
44
 
45
45
  - Delete the acceptance test without confirmation prompt.
46
- $ [green]nextmv cloud acceptance delete --app-id hare-app --acceptance-test-id test-cotton-tail --yes[/green]
46
+ $ [dim]nextmv cloud acceptance delete --app-id hare-app --acceptance-test-id test-cotton-tail --yes[/dim]
47
47
  """
48
48
 
49
49
  if not yes:
50
- confirm = Confirm.ask(
50
+ confirm = get_confirmation(
51
51
  f"Are you sure you want to delete acceptance test [magenta]{acceptance_test_id}[/magenta] "
52
52
  f"from application [magenta]{app_id}[/magenta]? This action cannot be undone.",
53
- default=False,
54
53
  )
55
54
 
56
55
  if not confirm:
@@ -42,7 +42,7 @@ def get(
42
42
  "--wait",
43
43
  "-w",
44
44
  help="Wait for the acceptance test to complete. Results are printed to [magenta]stdout[/magenta]. "
45
- "Specify output location with [code]--output[/code].",
45
+ "Specify output location with --output.",
46
46
  ),
47
47
  ] = False,
48
48
  profile: ProfileOption = None,
@@ -50,26 +50,25 @@ def get(
50
50
  """
51
51
  Get a Nextmv Cloud acceptance test.
52
52
 
53
- Use the [code]--wait[/code] flag to wait for the acceptance test to
54
- complete, polling for results. Using the [code]--output[/code] flag will
55
- also activate waiting, and allows you to specify a destination file for the
56
- results.
53
+ Use the --wait flag to wait for the acceptance test to complete, polling
54
+ for results. Using the --output flag will also activate waiting, and allows
55
+ you to specify a destination file for the results.
57
56
 
58
57
  [bold][underline]Examples[/underline][/bold]
59
58
 
60
59
  - Get the acceptance test with ID [magenta]test-123[/magenta] from application
61
60
  [magenta]hare-app[/magenta].
62
- $ [green]nextmv cloud acceptance get --app-id hare-app --acceptance-test-id test-123[/green]
61
+ $ [dim]nextmv cloud acceptance get --app-id hare-app --acceptance-test-id test-123[/dim]
63
62
 
64
63
  - Get the acceptance test and wait for it to complete if necessary.
65
- $ [green]nextmv cloud acceptance get --app-id hare-app --acceptance-test-id test-123 --wait[/green]
64
+ $ [dim]nextmv cloud acceptance get --app-id hare-app --acceptance-test-id test-123 --wait[/dim]
66
65
 
67
66
  - Get the acceptance test and save the results to a file.
68
- $ [green]nextmv cloud acceptance get --app-id hare-app \\
69
- --acceptance-test-id test-123 --output results.json[/green]
67
+ $ [dim]nextmv cloud acceptance get --app-id hare-app \\
68
+ --acceptance-test-id test-123 --output results.json[/dim]
70
69
 
71
70
  - Get the acceptance test using a specific profile.
72
- $ [green]nextmv cloud acceptance get --app-id hare-app --acceptance-test-id test-123 --profile prod[/green]
71
+ $ [dim]nextmv cloud acceptance get --app-id hare-app --acceptance-test-id test-123 --profile prod[/dim]
73
72
  """
74
73
 
75
74
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -38,13 +38,13 @@ def list(
38
38
  [bold][underline]Examples[/underline][/bold]
39
39
 
40
40
  - List all acceptance tests for application [magenta]hare-app[/magenta].
41
- $ [green]nextmv cloud acceptance list --app-id hare-app[/green]
41
+ $ [dim]nextmv cloud acceptance list --app-id hare-app[/dim]
42
42
 
43
43
  - List all acceptance tests and save to a file.
44
- $ [green]nextmv cloud acceptance list --app-id hare-app --output tests.json[/green]
44
+ $ [dim]nextmv cloud acceptance list --app-id hare-app --output tests.json[/dim]
45
45
 
46
46
  - List all acceptance tests using a specific profile.
47
- $ [green]nextmv cloud acceptance list --app-id hare-app --profile prod[/green]
47
+ $ [dim]nextmv cloud acceptance list --app-id hare-app --profile prod[/dim]
48
48
  """
49
49
 
50
50
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -57,17 +57,17 @@ def update(
57
57
  [bold][underline]Examples[/underline][/bold]
58
58
 
59
59
  - Update the name of an acceptance test.
60
- $ [green]nextmv cloud acceptance update --app-id hare-app \\
61
- --acceptance-test-id test-123 --name "Updated Test Name"[/green]
60
+ $ [dim]nextmv cloud acceptance update --app-id hare-app \\
61
+ --acceptance-test-id test-123 --name "Updated Test Name"[/dim]
62
62
 
63
63
  - Update the description of an acceptance test.
64
- $ [green]nextmv cloud acceptance update --app-id hare-app \\
65
- --acceptance-test-id test-123 --description "Updated description"[/green]
64
+ $ [dim]nextmv cloud acceptance update --app-id hare-app \\
65
+ --acceptance-test-id test-123 --description "Updated description"[/dim]
66
66
 
67
67
  - Update both name and description and save the result.
68
- $ [green]nextmv cloud acceptance update --app-id hare-app \\
68
+ $ [dim]nextmv cloud acceptance update --app-id hare-app \\
69
69
  --acceptance-test-id test-123 --name "New Name" \\
70
- --description "New description" --output updated-test.json[/green]
70
+ --description "New description" --output updated-test.json[/dim]
71
71
  """
72
72
 
73
73
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -20,9 +20,9 @@ app.add_typer(update_app)
20
20
  @app.callback()
21
21
  def callback() -> None:
22
22
  """
23
- Manage your Nextmv Cloud account (organization).
23
+ Manage SSO for your Nextmv Cloud account (organization).
24
24
 
25
- Please contact [link=https://www.nextmv.io/contact][bold]Nextmv support[/bold][/link] for assistance
26
- configuring SSO for your organization.
25
+ Please contact [link=https://www.nextmv.io/contact][bold]Nextmv support[/bold][/link]
26
+ for assistance configuring SSO for your organization.
27
27
  """
28
28
  pass
@@ -39,32 +39,32 @@ def create(
39
39
  profile: ProfileOption = None,
40
40
  ) -> None:
41
41
  """
42
- Create a new Nextmv Cloud account.
42
+ Create a new Nextmv Cloud account in your organization.
43
43
 
44
44
  To create managed accounts, SSO must be configured for your organization.
45
45
  Please contact [link=https://www.nextmv.io/contact][bold]Nextmv support[/bold][/link] for assistance.
46
46
 
47
47
  At least one administrator email address must be provided. Multiple
48
- administrators can be specified by repeating the [code]--admins[/code] flag
49
- or by separating email addresses with commas.
48
+ administrators can be specified by repeating the --admins flag or by
49
+ separating email addresses with commas.
50
50
 
51
51
  [bold][underline]Examples[/underline][/bold]
52
52
 
53
53
  - Create an account named [magenta]Bunny Logistics[/magenta] with a single administrator.
54
- $ [green]nextmv cloud account create --name "Bunny Logistics" \\
55
- --admins peter.rabbit@carrotexpress.com[/green]
54
+ $ [dim]nextmv cloud account create --name "Bunny Logistics" \\
55
+ --admins peter.rabbit@carrotexpress.com[/dim]
56
56
 
57
57
  - Create an account named [magenta]Hare Delivery Co[/magenta] with multiple administrators.
58
- $ [green]nextmv cloud account create --name "Hare Delivery Co" \\
59
- --admins bugs@acme.com --admins roger@toontown.com[/green]
58
+ $ [dim]nextmv cloud account create --name "Hare Delivery Co" \\
59
+ --admins bugs@acme.com --admins roger@toontown.com[/dim]
60
60
 
61
61
  - Create an account using the profile named [magenta]hare[/magenta].
62
- $ [green]nextmv cloud account create --name "Cottontail Couriers" \\
63
- --admins fluffy@hopmail.com --profile hare[/green]
62
+ $ [dim]nextmv cloud account create --name "Cottontail Couriers" \\
63
+ --admins fluffy@hopmail.com --profile hare[/dim]
64
64
 
65
65
  - Create an account with comma-separated administrators.
66
- $ [green]nextmv cloud account create --name "Whiskers Warehouse" \\
67
- --admins "thumper@forestmail.com,flopsy@warren.io"[/green]
66
+ $ [dim]nextmv cloud account create --name "Whiskers Warehouse" \\
67
+ --admins "thumper@forestmail.com,flopsy@warren.io"[/dim]
68
68
  """
69
69
 
70
70
  cloud_client = build_client(profile)
@@ -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
9
8
 
10
9
  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,26 +29,25 @@ def delete(
29
29
  profile: ProfileOption = None,
30
30
  ) -> None:
31
31
  """
32
- Deletes an account within your organization.
32
+ Deletes an account within your SSO-enabled 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 [code]--yes[/code]
36
+ This action is permanent and cannot be undone. Use the --yes
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
- $ [green]nextmv cloud account delete --account-id bunnies-account[/green]
42
+ $ [dim]nextmv cloud account delete --account-id bunnies-account[/dim]
43
43
 
44
44
  - Delete the account without confirmation prompt.
45
- $ [green]nextmv cloud account delete --account-id bunnies-account --yes[/green]
45
+ $ [dim]nextmv cloud account delete --account-id bunnies-account --yes[/dim]
46
46
  """
47
47
 
48
48
  if not yes:
49
- confirm = Confirm.ask(
49
+ confirm = get_confirmation(
50
50
  f"Are you sure you want to delete account [magenta]{account_id}[/magenta]? This action cannot be undone.",
51
- default=False,
52
51
  )
53
52
 
54
53
  if not confirm:
@@ -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)