nextmv 0.18.0__py3-none-any.whl → 1.0.0.dev2__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 (175) hide show
  1. nextmv/__about__.py +1 -1
  2. nextmv/__entrypoint__.py +8 -13
  3. nextmv/__init__.py +53 -0
  4. nextmv/_serialization.py +96 -0
  5. nextmv/base_model.py +54 -9
  6. nextmv/cli/CONTRIBUTING.md +511 -0
  7. nextmv/cli/__init__.py +0 -0
  8. nextmv/cli/cloud/__init__.py +47 -0
  9. nextmv/cli/cloud/acceptance/__init__.py +27 -0
  10. nextmv/cli/cloud/acceptance/create.py +393 -0
  11. nextmv/cli/cloud/acceptance/delete.py +68 -0
  12. nextmv/cli/cloud/acceptance/get.py +104 -0
  13. nextmv/cli/cloud/acceptance/list.py +62 -0
  14. nextmv/cli/cloud/acceptance/update.py +95 -0
  15. nextmv/cli/cloud/account/__init__.py +28 -0
  16. nextmv/cli/cloud/account/create.py +83 -0
  17. nextmv/cli/cloud/account/delete.py +60 -0
  18. nextmv/cli/cloud/account/get.py +66 -0
  19. nextmv/cli/cloud/account/update.py +70 -0
  20. nextmv/cli/cloud/app/__init__.py +35 -0
  21. nextmv/cli/cloud/app/create.py +141 -0
  22. nextmv/cli/cloud/app/delete.py +58 -0
  23. nextmv/cli/cloud/app/exists.py +44 -0
  24. nextmv/cli/cloud/app/get.py +66 -0
  25. nextmv/cli/cloud/app/list.py +61 -0
  26. nextmv/cli/cloud/app/push.py +137 -0
  27. nextmv/cli/cloud/app/update.py +124 -0
  28. nextmv/cli/cloud/batch/__init__.py +29 -0
  29. nextmv/cli/cloud/batch/create.py +454 -0
  30. nextmv/cli/cloud/batch/delete.py +68 -0
  31. nextmv/cli/cloud/batch/get.py +104 -0
  32. nextmv/cli/cloud/batch/list.py +63 -0
  33. nextmv/cli/cloud/batch/metadata.py +66 -0
  34. nextmv/cli/cloud/batch/update.py +95 -0
  35. nextmv/cli/cloud/data/__init__.py +26 -0
  36. nextmv/cli/cloud/data/upload.py +162 -0
  37. nextmv/cli/cloud/ensemble/__init__.py +31 -0
  38. nextmv/cli/cloud/ensemble/create.py +414 -0
  39. nextmv/cli/cloud/ensemble/delete.py +67 -0
  40. nextmv/cli/cloud/ensemble/get.py +65 -0
  41. nextmv/cli/cloud/ensemble/update.py +103 -0
  42. nextmv/cli/cloud/input_set/__init__.py +30 -0
  43. nextmv/cli/cloud/input_set/create.py +170 -0
  44. nextmv/cli/cloud/input_set/get.py +63 -0
  45. nextmv/cli/cloud/input_set/list.py +63 -0
  46. nextmv/cli/cloud/input_set/update.py +123 -0
  47. nextmv/cli/cloud/instance/__init__.py +35 -0
  48. nextmv/cli/cloud/instance/create.py +290 -0
  49. nextmv/cli/cloud/instance/delete.py +62 -0
  50. nextmv/cli/cloud/instance/exists.py +39 -0
  51. nextmv/cli/cloud/instance/get.py +62 -0
  52. nextmv/cli/cloud/instance/list.py +60 -0
  53. nextmv/cli/cloud/instance/update.py +216 -0
  54. nextmv/cli/cloud/managed_input/__init__.py +31 -0
  55. nextmv/cli/cloud/managed_input/create.py +146 -0
  56. nextmv/cli/cloud/managed_input/delete.py +65 -0
  57. nextmv/cli/cloud/managed_input/get.py +63 -0
  58. nextmv/cli/cloud/managed_input/list.py +60 -0
  59. nextmv/cli/cloud/managed_input/update.py +97 -0
  60. nextmv/cli/cloud/run/__init__.py +37 -0
  61. nextmv/cli/cloud/run/cancel.py +37 -0
  62. nextmv/cli/cloud/run/create.py +530 -0
  63. nextmv/cli/cloud/run/get.py +199 -0
  64. nextmv/cli/cloud/run/input.py +86 -0
  65. nextmv/cli/cloud/run/list.py +80 -0
  66. nextmv/cli/cloud/run/logs.py +167 -0
  67. nextmv/cli/cloud/run/metadata.py +67 -0
  68. nextmv/cli/cloud/run/track.py +501 -0
  69. nextmv/cli/cloud/scenario/__init__.py +29 -0
  70. nextmv/cli/cloud/scenario/create.py +451 -0
  71. nextmv/cli/cloud/scenario/delete.py +65 -0
  72. nextmv/cli/cloud/scenario/get.py +102 -0
  73. nextmv/cli/cloud/scenario/list.py +63 -0
  74. nextmv/cli/cloud/scenario/metadata.py +67 -0
  75. nextmv/cli/cloud/scenario/update.py +93 -0
  76. nextmv/cli/cloud/secrets/__init__.py +33 -0
  77. nextmv/cli/cloud/secrets/create.py +206 -0
  78. nextmv/cli/cloud/secrets/delete.py +67 -0
  79. nextmv/cli/cloud/secrets/get.py +66 -0
  80. nextmv/cli/cloud/secrets/list.py +60 -0
  81. nextmv/cli/cloud/secrets/update.py +147 -0
  82. nextmv/cli/cloud/shadow/__init__.py +33 -0
  83. nextmv/cli/cloud/shadow/create.py +184 -0
  84. nextmv/cli/cloud/shadow/delete.py +68 -0
  85. nextmv/cli/cloud/shadow/get.py +61 -0
  86. nextmv/cli/cloud/shadow/list.py +63 -0
  87. nextmv/cli/cloud/shadow/metadata.py +66 -0
  88. nextmv/cli/cloud/shadow/start.py +43 -0
  89. nextmv/cli/cloud/shadow/stop.py +43 -0
  90. nextmv/cli/cloud/shadow/update.py +95 -0
  91. nextmv/cli/cloud/upload/__init__.py +22 -0
  92. nextmv/cli/cloud/upload/create.py +39 -0
  93. nextmv/cli/cloud/version/__init__.py +33 -0
  94. nextmv/cli/cloud/version/create.py +97 -0
  95. nextmv/cli/cloud/version/delete.py +62 -0
  96. nextmv/cli/cloud/version/exists.py +39 -0
  97. nextmv/cli/cloud/version/get.py +62 -0
  98. nextmv/cli/cloud/version/list.py +60 -0
  99. nextmv/cli/cloud/version/update.py +92 -0
  100. nextmv/cli/community/__init__.py +24 -0
  101. nextmv/cli/community/clone.py +270 -0
  102. nextmv/cli/community/list.py +265 -0
  103. nextmv/cli/configuration/__init__.py +23 -0
  104. nextmv/cli/configuration/config.py +195 -0
  105. nextmv/cli/configuration/create.py +94 -0
  106. nextmv/cli/configuration/delete.py +67 -0
  107. nextmv/cli/configuration/list.py +77 -0
  108. nextmv/cli/main.py +188 -0
  109. nextmv/cli/message.py +153 -0
  110. nextmv/cli/options.py +206 -0
  111. nextmv/cli/version.py +38 -0
  112. nextmv/cloud/__init__.py +71 -17
  113. nextmv/cloud/acceptance_test.py +757 -51
  114. nextmv/cloud/account.py +406 -17
  115. nextmv/cloud/application/__init__.py +957 -0
  116. nextmv/cloud/application/_acceptance.py +419 -0
  117. nextmv/cloud/application/_batch_scenario.py +860 -0
  118. nextmv/cloud/application/_ensemble.py +251 -0
  119. nextmv/cloud/application/_input_set.py +227 -0
  120. nextmv/cloud/application/_instance.py +289 -0
  121. nextmv/cloud/application/_managed_input.py +227 -0
  122. nextmv/cloud/application/_run.py +1393 -0
  123. nextmv/cloud/application/_secrets.py +294 -0
  124. nextmv/cloud/application/_shadow.py +314 -0
  125. nextmv/cloud/application/_utils.py +54 -0
  126. nextmv/cloud/application/_version.py +303 -0
  127. nextmv/cloud/assets.py +48 -0
  128. nextmv/cloud/batch_experiment.py +294 -33
  129. nextmv/cloud/client.py +307 -66
  130. nextmv/cloud/ensemble.py +247 -0
  131. nextmv/cloud/input_set.py +120 -2
  132. nextmv/cloud/instance.py +133 -8
  133. nextmv/cloud/integration.py +533 -0
  134. nextmv/cloud/package.py +168 -53
  135. nextmv/cloud/scenario.py +410 -0
  136. nextmv/cloud/secrets.py +234 -0
  137. nextmv/cloud/shadow.py +190 -0
  138. nextmv/cloud/url.py +73 -0
  139. nextmv/cloud/version.py +132 -4
  140. nextmv/default_app/.gitignore +1 -0
  141. nextmv/default_app/README.md +32 -0
  142. nextmv/default_app/app.yaml +12 -0
  143. nextmv/default_app/input.json +5 -0
  144. nextmv/default_app/main.py +37 -0
  145. nextmv/default_app/requirements.txt +2 -0
  146. nextmv/default_app/src/__init__.py +0 -0
  147. nextmv/default_app/src/visuals.py +36 -0
  148. nextmv/deprecated.py +47 -0
  149. nextmv/input.py +861 -90
  150. nextmv/local/__init__.py +5 -0
  151. nextmv/local/application.py +1251 -0
  152. nextmv/local/executor.py +1042 -0
  153. nextmv/local/geojson_handler.py +323 -0
  154. nextmv/local/local.py +97 -0
  155. nextmv/local/plotly_handler.py +61 -0
  156. nextmv/local/runner.py +274 -0
  157. nextmv/logger.py +80 -9
  158. nextmv/manifest.py +1466 -0
  159. nextmv/model.py +241 -66
  160. nextmv/options.py +708 -115
  161. nextmv/output.py +1301 -274
  162. nextmv/polling.py +325 -0
  163. nextmv/run.py +1702 -0
  164. nextmv/safe.py +145 -0
  165. nextmv/status.py +122 -0
  166. nextmv-1.0.0.dev2.dist-info/METADATA +311 -0
  167. nextmv-1.0.0.dev2.dist-info/RECORD +170 -0
  168. {nextmv-0.18.0.dist-info → nextmv-1.0.0.dev2.dist-info}/WHEEL +1 -1
  169. nextmv-1.0.0.dev2.dist-info/entry_points.txt +2 -0
  170. nextmv/cloud/application.py +0 -1405
  171. nextmv/cloud/manifest.py +0 -234
  172. nextmv/cloud/status.py +0 -29
  173. nextmv-0.18.0.dist-info/METADATA +0 -770
  174. nextmv-0.18.0.dist-info/RECORD +0 -25
  175. {nextmv-0.18.0.dist-info → nextmv-1.0.0.dev2.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,66 @@
1
+ """
2
+ This module defines the cloud app get command for the Nextmv CLI.
3
+ """
4
+
5
+ import json
6
+ from typing import Annotated
7
+
8
+ import typer
9
+
10
+ from nextmv.cli.configuration.config import build_client
11
+ from nextmv.cli.message import in_progress, print_json, success
12
+ from nextmv.cli.options import AppIDOption, ProfileOption
13
+ from nextmv.cloud.application import Application
14
+
15
+ # Set up subcommand application.
16
+ app = typer.Typer()
17
+
18
+
19
+ @app.command()
20
+ def get(
21
+ app_id: AppIDOption,
22
+ output: Annotated[
23
+ str | None,
24
+ typer.Option(
25
+ "--output",
26
+ "-o",
27
+ help="Saves the app information to this location.",
28
+ metavar="OUTPUT_PATH",
29
+ ),
30
+ ] = None,
31
+ profile: ProfileOption = None,
32
+ ) -> None:
33
+ """
34
+ Get a Nextmv Cloud application.
35
+
36
+ This command is useful to get the attributes of an existing Nextmv Cloud
37
+ application by its ID.
38
+
39
+ [bold][underline]Examples[/underline][/bold]
40
+
41
+ - Get the application with the ID [magenta]hare-app[/magenta].
42
+ $ [green]nextmv cloud app get --app-id hare-app[/green]
43
+
44
+ - Get the application with the ID [magenta]hare-app[/magenta] and save the information to an
45
+ [magenta]app.json[/magenta] file.
46
+ $ [green]nextmv cloud app get --app-id hare-app --output app.json[/green]
47
+ """
48
+
49
+ client = build_client(profile)
50
+ in_progress(msg="Getting application...")
51
+
52
+ cloud_app = Application.get(
53
+ client=client,
54
+ id=app_id,
55
+ )
56
+ cloud_app_dict = cloud_app.to_dict()
57
+
58
+ if output is not None and output != "":
59
+ with open(output, "w") as f:
60
+ json.dump(cloud_app_dict, f, indent=2)
61
+
62
+ success(msg=f"Application information saved to [magenta]{output}[/magenta].")
63
+
64
+ return
65
+
66
+ print_json(cloud_app_dict)
@@ -0,0 +1,61 @@
1
+ """
2
+ This module defines the cloud app list command for the Nextmv CLI.
3
+ """
4
+
5
+ import json
6
+ from typing import Annotated
7
+
8
+ import typer
9
+
10
+ from nextmv.cli.configuration.config import build_client
11
+ from nextmv.cli.message import in_progress, print_json, success
12
+ from nextmv.cli.options import ProfileOption
13
+ from nextmv.cloud.application import list_applications
14
+
15
+ # Set up subcommand application.
16
+ app = typer.Typer()
17
+
18
+
19
+ @app.command()
20
+ def list(
21
+ output: Annotated[
22
+ str | None,
23
+ typer.Option(
24
+ "--output",
25
+ "-o",
26
+ help="Saves the app list information to this location.",
27
+ metavar="OUTPUT_PATH",
28
+ ),
29
+ ] = None,
30
+ profile: ProfileOption = None,
31
+ ) -> None:
32
+ """
33
+ List all Nextmv Cloud applications.
34
+
35
+ [bold][underline]Examples[/underline][/bold]
36
+
37
+ - List all applications.
38
+ $ [green]nextmv cloud app list[/green]
39
+
40
+ - List all applications using the profile named [magenta]hare[/magenta].
41
+ $ [green]nextmv cloud app list --profile hare[/green]
42
+
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]
45
+ """
46
+
47
+ client = build_client(profile)
48
+ in_progress(msg="Listing applications...")
49
+
50
+ cloud_apps = list_applications(client)
51
+ cloud_apps_dicts = [app.to_dict() for app in cloud_apps]
52
+
53
+ if output is not None and output != "":
54
+ with open(output, "w") as f:
55
+ json.dump(cloud_apps_dicts, f, indent=2)
56
+
57
+ success(msg=f"Application list information saved to [magenta]{output}[/magenta].")
58
+
59
+ return
60
+
61
+ print_json(cloud_apps_dicts)
@@ -0,0 +1,137 @@
1
+ """
2
+ This module defines the cloud app push command for the Nextmv CLI.
3
+ """
4
+
5
+ from typing import Annotated
6
+
7
+ import typer
8
+
9
+ from nextmv.cli.configuration.config import build_app
10
+ from nextmv.cli.options import AppIDOption, ProfileOption
11
+ from nextmv.manifest import Manifest
12
+
13
+ # Set up subcommand application.
14
+ app = typer.Typer()
15
+
16
+
17
+ @app.command()
18
+ def push(
19
+ app_id: AppIDOption,
20
+ app_dir: Annotated[
21
+ str | None,
22
+ typer.Option(
23
+ "--app-dir",
24
+ "-d",
25
+ help="The path to the application's root directory.",
26
+ metavar="APP_DIR",
27
+ ),
28
+ ] = ".",
29
+ manifest: Annotated[
30
+ str | None,
31
+ typer.Option(
32
+ "--manifest",
33
+ "-m",
34
+ help="Path to the application manifest file ([magenta]app.yaml[/magenta]).",
35
+ metavar="MANIFEST_PATH",
36
+ ),
37
+ ] = None,
38
+ no_version: Annotated[
39
+ bool,
40
+ typer.Option(
41
+ "--no-version",
42
+ "-n",
43
+ help="The application will be pushed without creating a new version. "
44
+ "Default is to create a new version on each push.",
45
+ rich_help_panel="Versioning control",
46
+ ),
47
+ ] = False,
48
+ version_id: Annotated[
49
+ str | None,
50
+ typer.Option(
51
+ "--version-id",
52
+ "-v",
53
+ help="Custom version ID when pushing the application. Automatically generated if not provided.",
54
+ rich_help_panel="Versioning control",
55
+ metavar="VERSION_ID",
56
+ ),
57
+ ] = None,
58
+ version_name: Annotated[
59
+ str | None,
60
+ typer.Option(
61
+ "--version-name",
62
+ "-e",
63
+ help="Custom version name when pushing the application. Automatically generated if not provided.",
64
+ rich_help_panel="Versioning control",
65
+ metavar="VERSION_NAME",
66
+ ),
67
+ ] = None,
68
+ version_description: Annotated[
69
+ str | None,
70
+ typer.Option(
71
+ "--version-description",
72
+ "-r",
73
+ help="Custom version description when pushing the application. Automatically generated if not provided.",
74
+ rich_help_panel="Versioning control",
75
+ metavar="VERSION_DESCRIPTION",
76
+ ),
77
+ ] = None,
78
+ profile: ProfileOption = None,
79
+ ) -> None:
80
+ """
81
+ Push (deploy) a Nextmv application to Nextmv Cloud.
82
+
83
+ Use the [code]--app-dir[/code] option to specify the path to your
84
+ application's root directory. By default, the current working directory is
85
+ used.
86
+
87
+ You can also provide a custom manifest file using the [code]--manifest[/code]
88
+ option. If not provided, the CLI will look for a file named [magenta]app.yaml[/magenta]
89
+ in the application's root.
90
+
91
+ The default behavior of this command is to create a new application version
92
+ [italic]after[/italic] the app has been pushed. You can use the
93
+ [code]--no-version[/code] option to skip this step. The
94
+ [code]--version-...[/code] options allow you to customize the attributes of
95
+ the version that is created. If any of these options are not provided,
96
+ automatically generated values will be used.
97
+
98
+ [bold][underline]Examples[/underline][/bold]
99
+
100
+ - Push an application, with ID [magenta]hare-app[/magenta], from the current directory.
101
+ $ [green]nextmv cloud app push --app-id hare-app[/green]
102
+
103
+ - Push an application, with ID [magenta]hare-app[/magenta], from the [magenta]./my-app[/magenta] directory.
104
+ $ [green]nextmv cloud app push --app-id hare-app --app-dir ./my-app[/green]
105
+
106
+ - Push an application, with ID [magenta]hare-app[/magenta], using a custom manifest file.
107
+ $ [green]nextmv cloud app push --app-id hare-app --manifest ./custom-manifest.yaml[/green]
108
+
109
+ - Push an application, with ID [magenta]hare-app[/magenta], from a specific
110
+ [magenta]./my-app[/magenta] directory with a custom manifest under [magenta]./custom-manifest.yaml[/magenta].
111
+ $ [green]nextmv cloud app push --app-id hare-app --app-dir ./my-app \\
112
+ --manifest ./custom-manifest.yaml[/green]
113
+
114
+ - Push an application without creating a new version.
115
+ $ [green]nextmv cloud app push --app-id hare-app --no-version[/green]
116
+
117
+ - Push an application with a custom version ID.
118
+ $ [green]nextmv cloud app push --app-id hare-app --version-id v1.0.0[/green]
119
+
120
+ - Push an application with custom version ID, name, and description.
121
+ $ [green]nextmv cloud app push --app-id hare-app --version-id v1.0.0 \\
122
+ --version-name "Release 1.0.0" \\
123
+ --version-description "First stable release"[/green]
124
+ """
125
+
126
+ cloud_app = build_app(app_id=app_id, profile=profile)
127
+ loaded_manifest = Manifest.from_yaml(dirpath=manifest) if manifest is not None and manifest != "" else None
128
+ cloud_app.push(
129
+ manifest=loaded_manifest,
130
+ app_dir=app_dir,
131
+ verbose=True,
132
+ rich_print=True,
133
+ no_version=no_version,
134
+ version_id=version_id,
135
+ version_name=version_name,
136
+ version_description=version_description,
137
+ )
@@ -0,0 +1,124 @@
1
+ """
2
+ This module defines the cloud app update command for the Nextmv CLI.
3
+ """
4
+
5
+ import json
6
+ from typing import Annotated
7
+
8
+ import typer
9
+
10
+ from nextmv.cli.configuration.config import build_app
11
+ from nextmv.cli.message import error, print_json, success
12
+ from nextmv.cli.options import AppIDOption, ProfileOption
13
+
14
+ # Set up subcommand application.
15
+ app = typer.Typer()
16
+
17
+
18
+ @app.command()
19
+ def update(
20
+ app_id: AppIDOption,
21
+ default_experiment_instance: Annotated[
22
+ str | None,
23
+ typer.Option(
24
+ "--default-experiment-instance",
25
+ "-x",
26
+ help="A new default experiment instance ID for the application.",
27
+ metavar="DEFAULT_EXPERIMENT_INSTANCE",
28
+ ),
29
+ ] = None,
30
+ default_instance_id: Annotated[
31
+ str | None,
32
+ typer.Option(
33
+ "--default-instance-id",
34
+ "-i",
35
+ help="A new default instance ID for the application.",
36
+ metavar="DEFAULT_INSTANCE_ID",
37
+ ),
38
+ ] = None,
39
+ description: Annotated[
40
+ str | None,
41
+ typer.Option(
42
+ "--description",
43
+ "-d",
44
+ help="A new description for the application.",
45
+ metavar="DESCRIPTION",
46
+ ),
47
+ ] = None,
48
+ name: Annotated[
49
+ str | None,
50
+ typer.Option(
51
+ "--name",
52
+ "-n",
53
+ help="A new name for the application.",
54
+ metavar="NAME",
55
+ ),
56
+ ] = None,
57
+ output: Annotated[
58
+ str | None,
59
+ typer.Option(
60
+ "--output",
61
+ "-o",
62
+ help="Saves the updated app information to this location.",
63
+ metavar="OUTPUT_PATH",
64
+ ),
65
+ ] = None,
66
+ profile: ProfileOption = None,
67
+ ) -> None:
68
+ """
69
+ Updates a Nextmv Cloud application.
70
+
71
+ Please note that you cannot change the type of an application, you must
72
+ create a new one.
73
+
74
+ [bold][underline]Examples[/underline][/bold]
75
+
76
+ - Update an application's name.
77
+ $ [green]nextmv cloud app update --app-id hare-app --name "New Hare App"[/green]
78
+
79
+ - Update an application's description.
80
+ $ [green]nextmv cloud app update --app-id hare-app --name "Hare App" \\
81
+ --description "An updated description for routing hares"[/green]
82
+
83
+ - Update an application's default instance ID.
84
+ $ [green]nextmv cloud app update --app-id hare-app --name "Hare App" \\
85
+ --default-instance-id burrow[/green]
86
+
87
+ - Update an application's default experiment instance.
88
+ $ [green]nextmv cloud app update --app-id hare-app --name "Hare App" \\
89
+ --default-experiment-instance experiment-v1[/green]
90
+
91
+ - Update multiple application properties at once.
92
+ $ [green]nextmv cloud app update --app-id hare-app --name "Hare App" \\
93
+ --description "Updated description" --default-instance-id burrow \\
94
+ --default-experiment-instance experiment-v1[/green]
95
+
96
+ - Update an application and save the updated information to an [magenta]updated_app.json[/magenta] file.
97
+ $ [green]nextmv cloud app update --app-id hare-app --name "New Hare App" --output updated_app.json[/green]
98
+ """
99
+
100
+ if name is None and description is None and default_instance_id is None and default_experiment_instance is None:
101
+ error(
102
+ "Provide at least one option to update: [code]--name[/code], [code]--description[/code], "
103
+ "[code]--default-instance-id[/code], or [code]--default-experiment-instance[/code]."
104
+ )
105
+
106
+ cloud_app = build_app(app_id=app_id, profile=profile)
107
+ updated_app = cloud_app.update(
108
+ name=name,
109
+ description=description,
110
+ default_instance_id=default_instance_id,
111
+ default_experiment_instance=default_experiment_instance,
112
+ )
113
+ success(f"Application [magenta]{app_id}[/magenta] updated successfully.")
114
+ updated_app_dict = updated_app.to_dict()
115
+
116
+ if output is not None and output != "":
117
+ with open(output, "w") as f:
118
+ json.dump(updated_app_dict, f, indent=2)
119
+
120
+ success(msg=f"Updated application information saved to [magenta]{output}[/magenta].")
121
+
122
+ return
123
+
124
+ print_json(updated_app_dict)
@@ -0,0 +1,29 @@
1
+ """
2
+ This module defines the cloud batch command tree for the Nextmv CLI.
3
+ """
4
+
5
+ import typer
6
+
7
+ from nextmv.cli.cloud.batch.create import app as create_app
8
+ from nextmv.cli.cloud.batch.delete import app as delete_app
9
+ from nextmv.cli.cloud.batch.get import app as get_app
10
+ from nextmv.cli.cloud.batch.list import app as list_app
11
+ from nextmv.cli.cloud.batch.metadata import app as metadata_app
12
+ from nextmv.cli.cloud.batch.update import app as update_app
13
+
14
+ # Set up subcommand application.
15
+ app = typer.Typer()
16
+ app.add_typer(create_app)
17
+ app.add_typer(delete_app)
18
+ app.add_typer(get_app)
19
+ app.add_typer(list_app)
20
+ app.add_typer(metadata_app)
21
+ app.add_typer(update_app)
22
+
23
+
24
+ @app.callback()
25
+ def callback() -> None:
26
+ """
27
+ Create and manage Nextmv Cloud batch experiments.
28
+ """
29
+ pass