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
@@ -24,11 +24,11 @@ def cancel(
24
24
  [bold][underline]Examples[/underline][/bold]
25
25
 
26
26
  - Cancel the run with ID [magenta]burrow-123[/magenta] belonging to an app with ID [magenta]hare-app[/magenta].
27
- $ [green]nextmv cloud run cancel --app-id hare-app --run-id burrow-123[/green]
27
+ $ [dim]nextmv cloud run cancel --app-id hare-app --run-id burrow-123[/dim]
28
28
 
29
29
  - Cancel the run with ID [magenta]burrow-123[/magenta] belonging to an app with ID [magenta]hare-app[/magenta].
30
30
  Use the profile named [magenta]hare[/magenta].
31
- $ [green]nextmv cloud run cancel --app-id hare-app --run-id burrow-123 --profile hare[/green]
31
+ $ [dim]nextmv cloud run cancel --app-id hare-app --run-id burrow-123 --profile hare[/dim]
32
32
  """
33
33
 
34
34
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -68,7 +68,7 @@ def create(
68
68
  "--tail",
69
69
  "-t",
70
70
  help="Tail the logs until the run completes. Logs are streamed to [magenta]stderr[/magenta]. "
71
- "Specify log output location with [code]--logs[/code].",
71
+ "Specify log output location with --logs.",
72
72
  rich_help_panel="Output control",
73
73
  ),
74
74
  ] = False,
@@ -79,7 +79,7 @@ def create(
79
79
  "-w",
80
80
  help="Wait for the run to complete. Run result is printed to [magenta]stdout[/magenta] for "
81
81
  "[magenta]json[/magenta], to a dir for [magenta]multi-file[/magenta]. "
82
- "Specify output location with [code]--output[/code].",
82
+ "Specify output location with --output.",
83
83
  rich_help_panel="Output control",
84
84
  ),
85
85
  ] = False,
@@ -210,101 +210,100 @@ def create(
210
210
  Create a new Nextmv Cloud application run.
211
211
 
212
212
  Input for the run should be given through [magenta]stdin[/magenta] or the
213
- [code]--input[/code] flag. When using the [code]--input[/code] flag, the
214
- value can be one of the following:
213
+ --input flag. When using the --input flag, the value can be one of the
214
+ following:
215
215
 
216
- - [green]<FILE_PATH>[/green]: path to a [magenta]file[/magenta] containing
216
+ - [yellow]<FILE_PATH>[/yellow]: path to a [magenta]file[/magenta] containing
217
217
  the input data. Use with the [magenta]json[/magenta], and
218
218
  [magenta]text[/magenta] content formats.
219
- - [green]<DIR_PATH>[/green]: path to a [magenta]directory[/magenta]
219
+ - [yellow]<DIR_PATH>[/yellow]: path to a [magenta]directory[/magenta]
220
220
  containing the input data files. Use with the
221
221
  [magenta]multi-file[/magenta] content format.
222
- - [green]<.tar.gz_PATH>[/green]: path to a [magenta].tar.gz[/magenta] file
222
+ - [yellow]<.tar.gz PATH>[/yellow]: path to a [magenta].tar.gz[/magenta] file
223
223
  containing tarred input data files. Use with the
224
224
  [magenta]multi-file[/magenta] content format.
225
225
 
226
226
  The CLI determines how to send the input to the application based on the
227
227
  value.
228
228
 
229
- Use the [code]--wait[/code] flag to wait for the run to complete, polling
230
- for results. Using the [code]--output[/code] flag will also activate
231
- waiting, and allows you to specify a destination (file or dir) for the
232
- output, depending on the content type.
229
+ Use the --wait flag to wait for the run to complete, polling for results.
230
+ Using the --output flag will also activate waiting, and allows you to
231
+ specify a destination (file or dir) for the output, depending on the
232
+ content type.
233
233
 
234
- Use the [code]--tail[/code] flag to stream logs to
235
- [magenta]stderr[/magenta] until the run completes. Using the
236
- [code]--logs[/code] flag will also activate waiting, and allows you to
237
- specify a file to write the logs to.
234
+ Use the --tail flag to stream logs to [magenta]stderr[/magenta] until the
235
+ run completes. Using the --logs flag will also activate waiting, and allows
236
+ you to specify a file to write the logs to.
238
237
 
239
238
  An application run executes against a specific instance. An instance
240
239
  represents the combination of executable code and configuration. You can
241
- specify the instance with the [code]--instance-id[/code] flag. These are
242
- the possible values for this flag:
240
+ specify the instance with the --instance-id flag. These are the possible
241
+ values for this flag:
243
242
 
244
- - [green]latest[/green]: uses the special [magenta]latest[/magenta]
243
+ - [yellow]latest[/yellow]: uses the special [magenta]latest[/magenta]
245
244
  instance of the application. This corresponds to the latest pushed
246
245
  executable. This is the default behavior.
247
- - [green]default[/green]: if the application has a [italic]default[/italic]
246
+ - [yellow]default[/yellow]: if the application has a [italic]default[/italic]
248
247
  instance configured, then it uses that instance. Setting the flag's value
249
- to [code]''[/code] (empty string) has the same effect.
250
- - [green]<INSTANCE_ID>[/green]: uses the instance with the given ID.
248
+ to [magenta]''[/magenta] (empty string) has the same effect.
249
+ - [yellow]<INSTANCE_ID>[/yellow]: uses the instance with the given ID.
251
250
 
252
251
  [bold][underline]Examples[/underline][/bold]
253
252
 
254
253
  - Read a [magenta]json[/magenta] input via [magenta]stdin[/magenta], from an [magenta]input.json[/magenta] file,
255
254
  and submit a run to an app with ID [magenta]hare-app[/magenta], using the [magenta]latest[/magenta] instance.
256
- $ [green]cat input.json | nextmv cloud run create --app-id hare-app[/green]
255
+ $ [dim]cat input.json | nextmv cloud run create --app-id hare-app[/dim]
257
256
 
258
257
  - Read a [magenta]json[/magenta] input from an [magenta]input.json[/magenta] file, and
259
258
  submit a run to an app with ID [magenta]hare-app[/magenta], using the [magenta]latest[/magenta] instance.
260
- $ [green]nextmv cloud run create --app-id hare-app --input input.json[/green]
259
+ $ [dim]nextmv cloud run create --app-id hare-app --input input.json[/dim]
261
260
 
262
261
  - Read a [magenta]json[/magenta] input from an [magenta]input.json[/magenta] file, and
263
262
  submit a run to an app with ID [magenta]hare-app[/magenta], using the [magenta]latest[/magenta] instance.
264
263
  Wait for the run to complete and print the result to [magenta]stdout[/magenta].
265
- $ [green]nextmv cloud run create --app-id hare-app --input input.json --wait[/green]
264
+ $ [dim]nextmv cloud run create --app-id hare-app --input input.json --wait[/dim]
266
265
 
267
266
  - Read a [magenta]json[/magenta] input from an [magenta]input.json[/magenta] file, and
268
267
  submit a run to an app with ID [magenta]hare-app[/magenta], using the [magenta]latest[/magenta] instance.
269
268
  Tail the run's logs, streaming to [magenta]stderr[/magenta].
270
- $ [green]nextmv cloud run create --app-id hare-app --input input.json --tail[/green]
269
+ $ [dim]nextmv cloud run create --app-id hare-app --input input.json --tail[/dim]
271
270
 
272
271
  - Read a [magenta]json[/magenta] input from an [magenta]input.json[/magenta] file, and
273
272
  submit a run to an app with ID [magenta]hare-app[/magenta], using the [magenta]latest[/magenta] instance.
274
273
  Wait for the run to complete and write the result to an [magenta]output.json[/magenta] file.
275
- $ [green]nextmv cloud run create --app-id hare-app --input input.json --output output.json[/green]
274
+ $ [dim]nextmv cloud run create --app-id hare-app --input input.json --output output.json[/dim]
276
275
 
277
276
  - Read a [magenta]json[/magenta] input from an [magenta]input.json[/magenta] file, and
278
277
  submit a run to an app with ID [magenta]hare-app[/magenta], using the [magenta]latest[/magenta] instance.
279
278
  Wait for the run to complete, and write the logs to a [magenta]logs.log[/magenta] file.
280
- $ [green]nextmv cloud run create --app-id hare-app --input input.json --logs logs.log[/green]
279
+ $ [dim]nextmv cloud run create --app-id hare-app --input input.json --logs logs.log[/dim]
281
280
 
282
281
  - Read a [magenta]json[/magenta] input from an [magenta]input.json[/magenta] file, and submit a run to an app with
283
282
  ID [magenta]hare-app[/magenta], using the [magenta]latest[/magenta] instance. Wait for the run to complete. Tail
284
283
  the run's logs, streaming to [magenta]stderr[/magenta]. Write the logs to a [magenta]logs.log[/magenta] file.
285
284
  Write the result to an [magenta]output.json[/magenta] file.
286
- $ [green]nextmv cloud run create --app-id hare-app --input input.json --tail --logs logs.log \\
287
- --output output.json [/green]
285
+ $ [dim]nextmv cloud run create --app-id hare-app --input input.json --tail --logs logs.log \\
286
+ --output output.json [/dim]
288
287
 
289
288
  - Read a [magenta]multi-file[/magenta] input from an [magenta]inputs[/magenta] directory, and
290
289
  submit a run to an app with ID [magenta]hare-app[/magenta], using the [magenta]default[/magenta] instance.
291
- $ [green]nextmv cloud run create --app-id hare-app --input inputs --instance-id default[/green]
290
+ $ [dim]nextmv cloud run create --app-id hare-app --input inputs --instance-id default[/dim]
292
291
 
293
292
  - Read a [magenta]multi-file[/magenta] input from an [magenta]inputs[/magenta] directory, and
294
293
  submit a run to an app with ID [magenta]hare-app[/magenta], using the [magenta]default[/magenta] instance.
295
294
  Wait for the run to complete, and save the results to the default location (a directory named after the run ID).
296
- $ [green]nextmv cloud run create --app-id hare-app --input inputs --instance-id default --wait[/green]
295
+ $ [dim]nextmv cloud run create --app-id hare-app --input inputs --instance-id default --wait[/dim]
297
296
 
298
297
  - Read a [magenta]multi-file[/magenta] input from an [magenta]inputs[/magenta] directory, and
299
298
  submit a run to an app with ID [magenta]hare-app[/magenta], using the [magenta]burrow[/magenta] instance.
300
299
  Wait for the run to complete and download the result files to an [magenta]outputs[/magenta] directory.
301
- $ [green]nextmv cloud run create --app-id hare-app --input inputs --instance-id burrow --output outputs[/green]
300
+ $ [dim]nextmv cloud run create --app-id hare-app --input inputs --instance-id burrow --output outputs[/dim]
302
301
  """
303
302
 
304
303
  # Validate that input is provided.
305
304
  stdin = sys.stdin.read().strip() if sys.stdin.isatty() is False else None
306
305
  if stdin is None and (input is None or input == ""):
307
- error("Input data must be provided via the [code]--input[/code] flag or [magenta]stdin[/magenta].")
306
+ error("Input data must be provided via the --input flag or [magenta]stdin[/magenta].")
308
307
 
309
308
  # Instantiate the basic requirements to start a new run.
310
309
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -46,7 +46,7 @@ def get(
46
46
  "-w",
47
47
  help="Wait for the run to complete. Run result is printed to [magenta]stdout[/magenta] for "
48
48
  "[magenta]json[/magenta], to a dir for [magenta]multi-file[/magenta]. "
49
- "Specify output location with [code]--output[/code].",
49
+ "Specify output location with --output.",
50
50
  ),
51
51
  ] = False,
52
52
  profile: ProfileOption = None,
@@ -54,8 +54,8 @@ def get(
54
54
  """
55
55
  Get the result (output) of a Nextmv Cloud application run.
56
56
 
57
- Use the [code]--wait[/code] flag to wait for the run to complete, polling
58
- for results. Using the [code]--output[/code] flag will also activate
57
+ Use the --wait flag to wait for the run to complete, polling
58
+ for results. Using the --output flag will also activate
59
59
  waiting, and allows you to specify a destination (file or dir) for the
60
60
  output, depending on the content type.
61
61
 
@@ -63,25 +63,25 @@ def get(
63
63
 
64
64
  - Get the results of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
65
65
  [magenta]hare-app[/magenta].
66
- $ [green]nextmv cloud run get --app-id hare-app --run-id burrow-123[/green]
66
+ $ [dim]nextmv cloud run get --app-id hare-app --run-id burrow-123[/dim]
67
67
 
68
68
  - Get the results of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
69
69
  [magenta]hare-app[/magenta]. Wait for the run to complete if necessary.
70
- $ [green]nextmv cloud run get --app-id hare-app --run-id burrow-123 --wait[/green]
70
+ $ [dim]nextmv cloud run get --app-id hare-app --run-id burrow-123 --wait[/dim]
71
71
 
72
72
  - Get the results of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
73
73
  [magenta]hare-app[/magenta]. The app is a [magenta]json[/magenta] app.
74
74
  Save the results to a [magenta]results.json[/magenta] file.
75
- $ [green]nextmv cloud run get --app-id hare-app --run-id burrow-123 --output results.json[/green]
75
+ $ [dim]nextmv cloud run get --app-id hare-app --run-id burrow-123 --output results.json[/dim]
76
76
 
77
77
  - Get the results of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
78
78
  [magenta]hare-app[/magenta]. The app is a [magenta]multi-file[/magenta] app.
79
79
  Save the results to the [magenta]results[/magenta] dir.
80
- $ [green]nextmv cloud run get --app-id hare-app --run-id burrow-123 --output results[/green]
80
+ $ [dim]nextmv cloud run get --app-id hare-app --run-id burrow-123 --output results[/dim]
81
81
 
82
82
  - Get the results of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
83
83
  [magenta]hare-app[/magenta]. Use the profile named [magenta]hare[/magenta].
84
- $ [green]nextmv cloud run get --app-id hare-app --run-id burrow-123 --profile hare[/green]
84
+ $ [dim]nextmv cloud run get --app-id hare-app --run-id burrow-123 --profile hare[/dim]
85
85
  """
86
86
 
87
87
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -35,21 +35,21 @@ def input(
35
35
  Get the input of a Nextmv Cloud application run.
36
36
 
37
37
  By default, the input is fetched and printed to [magenta]stdout[/magenta].
38
- Use the [code]--output[/code] flag to save the input to a file.
38
+ Use the --output flag to save the input to a file.
39
39
 
40
40
  [bold][underline]Examples[/underline][/bold]
41
41
 
42
42
  - Get the input of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
43
43
  [magenta]hare-app[/magenta]. Input is printed to [magenta]stdout[/magenta].
44
- $ [green]nextmv cloud run input --app-id hare-app --run-id burrow-123[/green]
44
+ $ [dim]nextmv cloud run input --app-id hare-app --run-id burrow-123[/dim]
45
45
 
46
46
  - Get the input of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
47
47
  [magenta]hare-app[/magenta]. Save the input to a [magenta]input.json[/magenta] file.
48
- $ [green]nextmv cloud run input --app-id hare-app --run-id burrow-123 --output input.json[/green]
48
+ $ [dim]nextmv cloud run input --app-id hare-app --run-id burrow-123 --output input.json[/dim]
49
49
 
50
50
  - Get the input of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
51
51
  [magenta]hare-app[/magenta]. Use the profile named [magenta]hare[/magenta].
52
- $ [green]nextmv cloud run input --app-id hare-app --run-id burrow-123 --profile hare[/green]
52
+ $ [dim]nextmv cloud run input --app-id hare-app --run-id burrow-123 --profile hare[/dim]
53
53
  """
54
54
 
55
55
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -43,25 +43,25 @@ def list(
43
43
  Get the list of runs for a Nextmv Cloud application.
44
44
 
45
45
  By default, the list of runs is fetched and printed to [magenta]stdout[/magenta].
46
- Use the [code]--output[/code] flag to save the list to a file.
46
+ Use the --output flag to save the list to a file.
47
47
 
48
- You can use the optional [code]--status[/code] flag to filter runs by their status.
48
+ You can use the optional --status flag to filter runs by their status.
49
49
 
50
50
  [bold][underline]Examples[/underline][/bold]
51
51
 
52
52
  - Get the list of runs for an app with ID [magenta]hare-app[/magenta]. List is printed to [magenta]stdout[/magenta].
53
- $ [green]nextmv cloud run list --app-id hare-app[/green]
53
+ $ [dim]nextmv cloud run list --app-id hare-app[/dim]
54
54
 
55
55
  - Get the list of runs for an app with ID [magenta]hare-app[/magenta]. Save the list to a
56
56
  [magenta]runs.json[/magenta] file.
57
- $ [green]nextmv cloud run list --app-id hare-app --output runs.json[/green]
57
+ $ [dim]nextmv cloud run list --app-id hare-app --output runs.json[/dim]
58
58
 
59
59
  - Get the list of runs for an app with ID [magenta]hare-app[/magenta].
60
60
  Use the profile named [magenta]hare[/magenta].
61
- $ [green]nextmv cloud run list --app-id hare-app --profile hare[/green]
61
+ $ [dim]nextmv cloud run list --app-id hare-app --profile hare[/dim]
62
62
 
63
63
  - Get the list of [magenta]queued[/magenta] runs for an app with ID [magenta]hare-app[/magenta].
64
- $ [green]nextmv cloud run list --app-id hare-app --status queued[/green]
64
+ $ [dim]nextmv cloud run list --app-id hare-app --status queued[/dim]
65
65
  """
66
66
 
67
67
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -38,7 +38,7 @@ def logs(
38
38
  "--tail",
39
39
  "-t",
40
40
  help="Tail the logs until the run completes. Logs are streamed to [magenta]stderr[/magenta]. "
41
- "Specify log output location with [code]--output[/code].",
41
+ "Specify log output location with --output.",
42
42
  ),
43
43
  ] = False,
44
44
  timeout: Annotated[
@@ -54,32 +54,31 @@ def logs(
54
54
  Get the logs of a Nextmv Cloud application run.
55
55
 
56
56
  By default, the logs are fetched and printed to [magenta]stderr[/magenta].
57
- Use the [code]--tail[/code] flag to stream logs to
58
- [magenta]stderr[/magenta] until the run completes. Using the
59
- [code]--output[/code] flag will also activate waiting, and allows you to
60
- specify a file to write the logs to.
57
+ Use the --tail flag to stream logs to [magenta]stderr[/magenta] until the
58
+ run completes. Using the --output flag will also activate waiting, and
59
+ allows you to specify a file to write the logs to.
61
60
 
62
61
  [bold][underline]Examples[/underline][/bold]
63
62
 
64
63
  - Get the logs of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
65
64
  [magenta]hare-app[/magenta]. Logs are printed to [magenta]stderr[/magenta].
66
- $ [green]nextmv cloud run logs --app-id hare-app --run-id burrow-123[/green]
65
+ $ [dim]nextmv cloud run logs --app-id hare-app --run-id burrow-123[/dim]
67
66
 
68
67
  - Get the logs of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
69
68
  [magenta]hare-app[/magenta]. Tail the logs until the run completes.
70
- $ [green]nextmv cloud run logs --app-id hare-app --run-id burrow-123 --tail[/green]
69
+ $ [dim]nextmv cloud run logs --app-id hare-app --run-id burrow-123 --tail[/dim]
71
70
 
72
71
  - Get the logs of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
73
72
  [magenta]hare-app[/magenta]. Save the logs to a [magenta]logs.log[/magenta] file.
74
- $ [green]nextmv cloud run logs --app-id hare-app --run-id burrow-123 --output logs.log[/green]
73
+ $ [dim]nextmv cloud run logs --app-id hare-app --run-id burrow-123 --output logs.log[/dim]
75
74
 
76
75
  - Get the logs of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
77
76
  [magenta]hare-app[/magenta]. Tail the logs and save them to a [magenta]logs.log[/magenta] file.
78
- $ [green]nextmv cloud run logs --app-id hare-app --run-id burrow-123 --tail --output logs.log[/green]
77
+ $ [dim]nextmv cloud run logs --app-id hare-app --run-id burrow-123 --tail --output logs.log[/dim]
79
78
 
80
79
  - Get the logs of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
81
80
  [magenta]hare-app[/magenta]. Use the profile named [magenta]hare[/magenta].
82
- $ [green]nextmv cloud run logs --app-id hare-app --run-id burrow-123 --profile hare[/green]
81
+ $ [dim]nextmv cloud run logs --app-id hare-app --run-id burrow-123 --profile hare[/dim]
83
82
  """
84
83
 
85
84
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -34,21 +34,21 @@ def metadata(
34
34
  Get the metadata of a Nextmv Cloud application run.
35
35
 
36
36
  By default, the metadata is fetched and printed to [magenta]stdout[/magenta].
37
- Use the [code]--output[/code] flag to save the metadata to a file.
37
+ Use the --output flag to save the metadata to a file.
38
38
 
39
39
  [bold][underline]Examples[/underline][/bold]
40
40
 
41
41
  - Get the metadata of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
42
42
  [magenta]hare-app[/magenta]. Metadata is printed to [magenta]stdout[/magenta].
43
- $ [green]nextmv cloud run metadata --app-id hare-app --run-id burrow-123[/green]
43
+ $ [dim]nextmv cloud run metadata --app-id hare-app --run-id burrow-123[/dim]
44
44
 
45
45
  - Get the metadata of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
46
46
  [magenta]hare-app[/magenta]. Save the metadata to a [magenta]metadata.json[/magenta] file.
47
- $ [green]nextmv cloud run metadata --app-id hare-app --run-id burrow-123 --output metadata.json[/green]
47
+ $ [dim]nextmv cloud run metadata --app-id hare-app --run-id burrow-123 --output metadata.json[/dim]
48
48
 
49
49
  - Get the metadata of a run with ID [magenta]burrow-123[/magenta], belonging to an app with ID
50
50
  [magenta]hare-app[/magenta]. Use the profile named [magenta]hare[/magenta].
51
- $ [green]nextmv cloud run metadata --app-id hare-app --run-id burrow-123 --profile hare[/green]
51
+ $ [dim]nextmv cloud run metadata --app-id hare-app --run-id burrow-123 --profile hare[/dim]
52
52
  """
53
53
 
54
54
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -143,87 +143,86 @@ def track(
143
143
  """
144
144
  Track an external run as a Nextmv Cloud application run.
145
145
 
146
- Please see the help of the [code]--content-type[/code] option for details
147
- on valid content types.
146
+ Please see the help of the --content-type option for details on valid
147
+ content types.
148
148
 
149
149
  If the content type is [magenta]json[/magenta] or [magenta]text[/magenta],
150
150
  then input for the run can be given through [magenta]stdin[/magenta]. The
151
- [code]--input[/code] option allows you to specify a file or directory path
152
- for the input, instead of using [magenta]stdin[/magenta]. In the case of
151
+ --input option allows you to specify a file or directory path for the
152
+ input, instead of using [magenta]stdin[/magenta]. In the case of
153
153
  [magenta]multi-file[/magenta] content type, the input must be given through
154
- a directory specified via the [code]--input[/code] option.
154
+ a directory specified via the --input option.
155
155
 
156
- The [code]--output[/code] option allows you to specify a file or directory
157
- path for the output of the run. The behavior depends on the content type.
158
- If the content type is [magenta]json[/magenta] or [magenta]text[/magenta],
159
- then a file path must be provided. If the content type is
156
+ The --output option allows you to specify a file or directory path for the
157
+ output of the run. The behavior depends on the content type. If the content
158
+ type is [magenta]json[/magenta] or [magenta]text[/magenta], then a file
159
+ path must be provided. If the content type is
160
160
  [magenta]multi-file[/magenta], then a directory path must be provided.
161
161
 
162
162
  Run logs, assets, and statistics can be provided via files using the
163
- [code]--logs[/code], [code]--assets[/code], and [code]--statistics[/code]
164
- options, respectively. Assets and statistics must be provided as
165
- [magenta]json[/magenta] files, while logs must be provided as a utf-8
166
- encoded text file.
163
+ --logs, --assets, and --statistics options, respectively. Assets and
164
+ statistics must be provided as [magenta]json[/magenta] files, while logs
165
+ must be provided as a utf-8 encoded text file.
167
166
 
168
167
  [bold][underline]Examples[/underline][/bold]
169
168
 
170
169
  - Track a [magenta]successful[/magenta] [magenta]json[/magenta] run via [magenta]stdin[/magenta]
171
170
  input, for an app with ID [magenta]hare-app[/magenta].
172
- $ [green]cat input.json | nextmv cloud run track --app-id hare-app --status succeeded[/green]
171
+ $ [dim]cat input.json | nextmv cloud run track --app-id hare-app --status succeeded[/dim]
173
172
 
174
173
  - Track a [magenta]successful[/magenta] [magenta]json[/magenta] run with input from an
175
174
  [magenta]input.json[/magenta] file and output from an
176
175
  [magenta]output.json[/magenta] file, for an app with ID
177
176
  [magenta]hare-app[/magenta].
178
- $ [green]nextmv cloud run track --app-id hare-app --status succeeded --input input.json \\
179
- --output output.json[/green]
177
+ $ [dim]nextmv cloud run track --app-id hare-app --status succeeded --input input.json \\
178
+ --output output.json[/dim]
180
179
 
181
180
  - Track a [magenta]successful[/magenta] [magenta]json[/magenta] run including logs from a
182
181
  [magenta]logs.log[/magenta] file, for an app with ID
183
182
  [magenta]hare-app[/magenta].
184
- $ [green]nextmv cloud run track --app-id hare-app --status succeeded --input input.json \\
185
- --output output.json --logs logs.log[/green]
183
+ $ [dim]nextmv cloud run track --app-id hare-app --status succeeded --input input.json \\
184
+ --output output.json --logs logs.log[/dim]
186
185
 
187
186
  - Track a [magenta]successful[/magenta] [magenta]json[/magenta] run with assets and statistics
188
187
  from [magenta]json[/magenta] files, for an app with ID
189
188
  [magenta]hare-app[/magenta].
190
- $ [green]nextmv cloud run track --app-id hare-app --status succeeded --input input.json \\
191
- --output output.json --assets assets.json --statistics statistics.json[/green]
189
+ $ [dim]nextmv cloud run track --app-id hare-app --status succeeded --input input.json \\
190
+ --output output.json --assets assets.json --statistics statistics.json[/dim]
192
191
 
193
192
  - Track a [magenta]failed[/magenta] run with an error message, for an app with ID
194
193
  [magenta]hare-app[/magenta].
195
- $ [green]nextmv cloud run track --app-id hare-app --status failed --input input.json \\
196
- --error-msg "Solver timed out"[/green]
194
+ $ [dim]nextmv cloud run track --app-id hare-app --status failed --input input.json \\
195
+ --error-msg "Solver timed out"[/dim]
197
196
 
198
197
  - Track a [magenta]successful[/magenta] [magenta]text[/magenta] run with text content type,
199
198
  for an app with ID [magenta]hare-app[/magenta].
200
- $ [green]nextmv cloud run track --app-id hare-app --status succeeded --input input.txt \\
201
- --output output.txt --content-type text[/green]
199
+ $ [dim]nextmv cloud run track --app-id hare-app --status succeeded --input input.txt \\
200
+ --output output.txt --content-type text[/dim]
202
201
 
203
202
  - Track a [magenta]successful[/magenta] [magenta]multi-file[/magenta] run from an
204
203
  [magenta]inputs[/magenta] directory with output to an
205
204
  [magenta]outputs[/magenta] directory, for an app with ID
206
205
  [magenta]hare-app[/magenta], using the [magenta]default[/magenta]
207
206
  instance.
208
- $ [green]nextmv cloud run track --app-id hare-app --status succeeded --input inputs \\
209
- --output outputs --content-type multi-file --instance-id default[/green]
207
+ $ [dim]nextmv cloud run track --app-id hare-app --status succeeded --input inputs \\
208
+ --output outputs --content-type multi-file --instance-id default[/dim]
210
209
 
211
210
  - Track a [magenta]successful[/magenta] run with a name, description, and duration, for an app
212
211
  with ID [magenta]hare-app[/magenta].
213
- $ [green]nextmv cloud run track --app-id hare-app --status succeeded --input input.json \\
214
- --output output.json --name "Production run" --description "Weekly optimization" --duration 5000[/green]
212
+ $ [dim]nextmv cloud run track --app-id hare-app --status succeeded --input input.json \\
213
+ --output output.json --name "Production run" --description "Weekly optimization" --duration 5000[/dim]
215
214
 
216
215
  - Track a [magenta]successful[/magenta] [magenta]json[/magenta] run with all available options,
217
216
  for an app with ID [magenta]hare-app[/magenta].
218
- $ [green]nextmv cloud run track --app-id hare-app --status succeeded --input input.json \\
217
+ $ [dim]nextmv cloud run track --app-id hare-app --status succeeded --input input.json \\
219
218
  --output output.json --logs logs.log --assets assets.json --statistics statistics.json \\
220
- --name "Full run" --description "Complete example" --duration 10000 --instance-id burrow[/green]
219
+ --name "Full run" --description "Complete example" --duration 10000 --instance-id burrow[/dim]
221
220
  """
222
221
 
223
222
  # Validate that input is provided.
224
223
  stdin = sys.stdin.read().strip() if sys.stdin.isatty() is False else None
225
224
  if stdin is None and (input is None or input == ""):
226
- error("Input data must be provided via the [code]--input[/code] flag or [magenta]stdin[/magenta].")
225
+ error("Input data must be provided via the --input flag or [magenta]stdin[/magenta].")
227
226
 
228
227
  # Instantiate the basic requirements to start a new run.
229
228
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -393,7 +392,7 @@ def resolve_input(
393
392
  error(
394
393
  "Input provided via [magenta]stdin[/magenta] is [magenta]json[/magenta], "
395
394
  f"but the specified content format is {content_format.value}. "
396
- "[code]--content-format[/code] should be set to [magenta]json[/magenta]."
395
+ "--content-format should be set to [magenta]json[/magenta]."
397
396
  )
398
397
 
399
398
  except json.JSONDecodeError:
@@ -402,7 +401,7 @@ def resolve_input(
402
401
  error(
403
402
  "Input provided via [magenta]stdin[/magenta] is [magenta]text[/magenta], "
404
403
  f"but the specified content format is {content_format.value}. "
405
- "[code]--content-format[/code] should be set to [magenta]text[/magenta]."
404
+ "--content-format should be set to [magenta]text[/magenta]."
406
405
  )
407
406
 
408
407
  tracked_run.input = input_data
@@ -100,7 +100,7 @@ def create(
100
100
  "--wait",
101
101
  "-w",
102
102
  help="Wait for the scenario test to complete. Results are printed to [magenta]stdout[/magenta]. "
103
- "Specify output location with [code]--output[/code].",
103
+ "Specify output location with --output.",
104
104
  rich_help_panel="Output control",
105
105
  ),
106
106
  ] = False,
@@ -112,21 +112,21 @@ def create(
112
112
  A scenario test allows you to run multiple scenarios with different inputs,
113
113
  instances/versions, and configurations in a single test.
114
114
 
115
- Use the [code]--wait[/code] flag to wait for the scenario test to complete,
116
- polling for results. Using the [code]--output[/code] flag will also
115
+ Use the --wait flag to wait for the scenario test to complete,
116
+ polling for results. Using the --output flag will also
117
117
  activate waiting, and allows you to specify a destination file for the
118
118
  results.
119
119
 
120
120
  [bold][underline]Scenarios[/underline][/bold]
121
121
 
122
122
  Scenarios are provided as [magenta]json[/magenta] objects using the
123
- [code]--scenarios[/code] flag. Each scenario defines the configuration for
124
- a scenario test execution.
123
+ --scenarios flag. Each scenario defines the configuration for a scenario
124
+ test execution.
125
125
 
126
126
  You can provide scenarios in three ways:
127
127
  - A single scenario as a [magenta]json[/magenta] object.
128
- - Multiple scenarios by repeating the [code]--scenarios[/code] flag.
129
- - Multiple scenarios as a [magenta]json[/magenta] array in a single [code]--scenarios[/code] flag.
128
+ - Multiple scenarios by repeating the --scenarios flag.
129
+ - Multiple scenarios as a [magenta]json[/magenta] array in a single --scenarios flag.
130
130
 
131
131
  Each scenario must have the following fields:
132
132
  - [magenta]instance_id[/magenta]: ID of the instance to use for this scenario (required).
@@ -142,7 +142,7 @@ def create(
142
142
  - [magenta]values[/magenta]: List of values for the configuration option.
143
143
 
144
144
  Example object format:
145
- [green]{
145
+ [dim]{
146
146
  "instance_id": "bunny-hopper-v2",
147
147
  "scenario_input": {
148
148
  "scenario_input_type": "input_set",
@@ -157,12 +157,12 @@ def create(
157
157
  "values": ["optimized", "balanced", "safe"]
158
158
  }
159
159
  ]
160
- }[/green]
160
+ }[/dim]
161
161
 
162
162
  [bold][underline]Examples[/underline][/bold]
163
163
 
164
164
  - Create a scenario test with a single scenario.
165
- $ [green]SCENARIO='{
165
+ $ [dim]SCENARIO='{
166
166
  "instance_id": "warren-planner-v1",
167
167
  "scenario_input": {
168
168
  "scenario_input_type": "input_set",
@@ -172,10 +172,10 @@ def create(
172
172
  }
173
173
  }
174
174
  }'
175
- nextmv cloud scenario create --app-id hare-app --name "Spring Meadow Routes" --scenarios "$SCENARIO"[/green]
175
+ nextmv cloud scenario create --app-id hare-app --name "Spring Meadow Routes" --scenarios "$SCENARIO"[/dim]
176
176
 
177
177
  - Create with multiple scenarios by repeating the flag.
178
- $ [green]SCENARIO1='{
178
+ $ [dim]SCENARIO1='{
179
179
  "instance_id": "hop-optimizer",
180
180
  "scenario_input": {
181
181
  "scenario_input_type": "input_set",
@@ -196,10 +196,10 @@ def create(
196
196
  }
197
197
  }'
198
198
  nextmv cloud scenario create --app-id hare-app --name "Lettuce Delivery Optimization" \\
199
- --scenarios "$SCENARIO1" --scenarios "$SCENARIO2"[/green]
199
+ --scenarios "$SCENARIO1" --scenarios "$SCENARIO2"[/dim]
200
200
 
201
201
  - Create with multiple scenarios in a single [magenta]json[/magenta] array.
202
- $ [green]SCENARIOS='[
202
+ $ [dim]SCENARIOS='[
203
203
  {
204
204
  "instance_id": "burrow-builder",
205
205
  "scenario_input": {
@@ -222,10 +222,10 @@ def create(
222
222
  }
223
223
  ]'
224
224
  nextmv cloud scenario create --app-id hare-app --name "Warren Construction Plans" \\
225
- --scenarios "$SCENARIOS"[/green]
225
+ --scenarios "$SCENARIOS"[/dim]
226
226
 
227
227
  - Create a scenario test and wait for it to complete.
228
- $ [green]SCENARIO='{
228
+ $ [dim]SCENARIO='{
229
229
  "instance_id": "foraging-route",
230
230
  "scenario_input": {
231
231
  "scenario_input_type": "input_set",
@@ -236,10 +236,10 @@ def create(
236
236
  }
237
237
  }'
238
238
  nextmv cloud scenario create --app-id hare-app --name "Autumn Carrot Collection" --scenarios "$SCENARIO" \\
239
- --wait[/green]
239
+ --wait[/dim]
240
240
 
241
241
  - Create a scenario test and save the results to a file, waiting for completion.
242
- $ [green]SCENARIO='{
242
+ $ [dim]SCENARIO='{
243
243
  "instance_id": "safe-hopper",
244
244
  "scenario_input": {
245
245
  "scenario_input_type": "input_set",
@@ -250,10 +250,10 @@ def create(
250
250
  }
251
251
  }'
252
252
  nextmv cloud scenario create --app-id hare-app --name "Fox Avoidance Routes" --scenarios "$SCENARIO" \\
253
- --output bunny-safety-results.json[/green]
253
+ --output bunny-safety-results.json[/dim]
254
254
 
255
255
  - Create a scenario test with configuration options.
256
- $ [green]SCENARIO='{
256
+ $ [dim]SCENARIO='{
257
257
  "instance_id": "hop-optimizer",
258
258
  "scenario_input": {
259
259
  "scenario_input_type": "input_set",
@@ -269,7 +269,7 @@ def create(
269
269
  }
270
270
  ]
271
271
  }'
272
- nextmv cloud scenario create --app-id hare-app --name "Speed Analysis" --scenarios "$SCENARIO"[/green]
272
+ nextmv cloud scenario create --app-id hare-app --name "Speed Analysis" --scenarios "$SCENARIO"[/dim]
273
273
  """
274
274
 
275
275
  cloud_app = build_app(app_id=app_id, profile=profile)