peak-sdk 1.12.0__py3-none-any.whl → 1.13.0__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 (25) hide show
  1. peak/_metadata.py +3 -0
  2. peak/_version.py +1 -1
  3. peak/cli/press/apps/deployments.py +12 -6
  4. peak/cli/press/apps/specs.py +20 -0
  5. peak/cli/press/blocks/deployments.py +5 -6
  6. peak/cli/press/deployments.py +49 -3
  7. peak/metrics/metrics.py +1 -1
  8. peak/press/apps.py +100 -5
  9. peak/press/deployments.py +35 -0
  10. peak/sample_yaml/press/apps/deployments/create_app_deployment.yaml +12 -0
  11. peak/sample_yaml/press/apps/deployments/create_app_deployment_revision.yaml +12 -0
  12. peak/sample_yaml/press/apps/specs/create_app_spec.yaml +63 -0
  13. peak/sample_yaml/press/apps/specs/create_app_spec_release.yaml +63 -0
  14. peak/sample_yaml/press/blocks/specs/service/api/create_block_spec.yaml +28 -28
  15. peak/sample_yaml/press/blocks/specs/service/api/create_block_spec_release.yaml +28 -28
  16. peak/sample_yaml/press/blocks/specs/service/webapp/create_block_spec.yaml +28 -28
  17. peak/sample_yaml/press/blocks/specs/service/webapp/create_block_spec_release.yaml +28 -28
  18. peak/sample_yaml/press/blocks/specs/workflow/create_block_spec.yaml +32 -32
  19. peak/sample_yaml/press/blocks/specs/workflow/create_block_spec_release.yaml +32 -32
  20. peak/sample_yaml/press/patch_parameters.yaml +9 -0
  21. {peak_sdk-1.12.0.dist-info → peak_sdk-1.13.0.dist-info}/METADATA +3 -3
  22. {peak_sdk-1.12.0.dist-info → peak_sdk-1.13.0.dist-info}/RECORD +25 -24
  23. {peak_sdk-1.12.0.dist-info → peak_sdk-1.13.0.dist-info}/LICENSE +0 -0
  24. {peak_sdk-1.12.0.dist-info → peak_sdk-1.13.0.dist-info}/WHEEL +0 -0
  25. {peak_sdk-1.12.0.dist-info → peak_sdk-1.13.0.dist-info}/entry_points.txt +0 -0
peak/_metadata.py CHANGED
@@ -956,6 +956,9 @@ command_metadata: Dict[str, Any] = {
956
956
  "blocks>deployments>patch-parameters": {
957
957
  "request_body_yaml_path": "sample_yaml/press/blocks/deployments/patch_block_parameters.yaml",
958
958
  },
959
+ "deployments>patch-parameters": {
960
+ "request_body_yaml_path": "sample_yaml/press/patch_parameters.yaml",
961
+ },
959
962
  "metrics>publish": {
960
963
  "request_body_yaml_path": "sample_yaml/metrics/publish.yaml",
961
964
  },
peak/_version.py CHANGED
@@ -18,4 +18,4 @@
18
18
  # # You should have received a copy of the APACHE LICENSE, VERSION 2.0
19
19
  # # along with this program. If not, see <https://apache.org/licenses/LICENSE-2.0>
20
20
  #
21
- __version__: str = "1.12.0"
21
+ __version__: str = "1.13.0"
@@ -66,10 +66,13 @@ def create(
66
66
  imageUrl (string | required: false): URL of the image to be associated with the app deployment.
67
67
  tags (list(map) | required: false):
68
68
  - name (string): Name of the tag.
69
+ appParameters (map | required: false):
70
+ build (map | required: false): Dictionary of parameters specific to the 'build' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
71
+ run (map | required: false): Dictionary of parameters specific to the 'run' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
69
72
  parameters (map | required: false):
70
- <blockName> (map): Dictionary of parameters for the block. Here the key is the name of the block.
71
- <parameterType> (map): Dictionary of parameters. Here the key is the type of the parameter. Accepted values are "build" or "run".
72
- <parameterName> (string | boolean | number | list(string)): Value of the parameter. Here the key is the name of the parameter.
73
+ <blockName> (map): Dictionary of parameters specific to each block, where each key represents the block name.
74
+ build (map | required: false): Dictionary of parameters for the block's 'build' phase. Keys are parameter names, and values can be of type string, boolean, number, dictionary or list (string, number, dictionary).
75
+ run (map | required: false): Dictionary of parameters for the block's 'run' phase. Keys are parameter names, and values can be of type string, boolean, number, dictionary or list (string, number, dictionary).
73
76
  revision (map | required: false):
74
77
  notes (string | required: false): Notes for the deployment revision.
75
78
  spec (map):
@@ -348,10 +351,13 @@ def create_revision(
348
351
  🧩 ***Input file schema (yaml):***<br/>
349
352
  ```yaml
350
353
  body (map):
354
+ appParameters (map | required: false):
355
+ build (map | required: false): Dictionary of parameters specific to the 'build' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
356
+ run (map | required: false): Dictionary of parameters specific to the 'run' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
351
357
  parameters (map | required: false):
352
- <blockName> (map): Dictionary of blocks within the app, for which to provide parameters. Must be a valid block name.
353
- <parameterType> (map): Dictionary of parameters. Here the key is the type of the parameter. Accepted values are "build" or "run".
354
- <parameterName> (string | boolean | number | list(string)): Value of the parameter. Here the key is the name of the parameter.
358
+ <blockName> (map): Dictionary of parameters specific to each block, where each key represents the block name.
359
+ build (map | required: false): Dictionary of parameters for the block's 'build' phase. Keys are parameter names, and values can be of type string, boolean, number, dictionary or list (string, number, dictionary).
360
+ run (map | required: false): Dictionary of parameters for the block's 'run' phase. Keys are parameter names, and values can be of type string, boolean, number, dictionary or list (string, number, dictionary).
355
361
  release (map):
356
362
  version (string): A valid semantic release version of the app spec.
357
363
  revision (map | required: false):
@@ -76,6 +76,16 @@ def create(
76
76
  release (map):
77
77
  version (string): A valid semantic release version of the block spec.
78
78
  autoRunOnDeploy (bool | required: false): Whether to execute the resource after the app is deployed. By default it is False.
79
+ parameters (map | required: false):
80
+ <parameterType> (list(map)): List containing the parameter objects. Here the key is the type of the parameter. Accepted values are "build" or "run".
81
+ name (string): Name of the parameter.
82
+ type (string): Type of the parameter. Should be one of "boolean", "string", "string_array", "number", "number_array", "object" and "object_array".
83
+ required (boolean): Whether the parameter is required.
84
+ description (string | required: false): Description of the parameter.
85
+ defaultValue (string | required: false): Default value of the parameter.
86
+ title (string | required: false): Title of the parameter.
87
+ options (list(str) | required: false): List of options for the parameter. If provided, it must have at least one object with "title" and "value" field.
88
+ hideValue(boolean | required: false): Can be optionally provided to parameters of type "string", to mask the parameter's value when it has been set at deployment time.
79
89
  ```
80
90
 
81
91
  \b
@@ -332,6 +342,16 @@ def create_release(
332
342
  release (map):
333
343
  version (string): A valid semantic release version of the block spec.
334
344
  autoRunOnDeploy (bool | required: false): Whether to execute the resource after the app is deployed. By default it is False.
345
+ parameters (map | required: false):
346
+ <parameterType> (list(map)): List containing the parameter objects. Here the key is the type of the parameter. Accepted values are "build" or "run".
347
+ name (string): Name of the parameter.
348
+ type (string): Type of the parameter. Should be one of "boolean", "string", "string_array", "number", "number_array", "object" and "object_array".
349
+ required (boolean): Whether the parameter is required.
350
+ description (string | required: false): Description of the parameter.
351
+ defaultValue (string | required: false): Default value of the parameter.
352
+ title (string | required: false): Title of the parameter.
353
+ options (list(str) | required: false): List of options for the parameter. If provided, it must have at least one object with "title" and "value" field.
354
+ hideValue(boolean | required: false): Can be optionally provided to parameters of type "string", to mask the parameter's value when it has been set at deployment time.
335
355
  ```
336
356
 
337
357
  \b
@@ -75,8 +75,8 @@ def create(
75
75
  tags (list(map) | required: false):
76
76
  - name (string): Name of the tag.
77
77
  parameters (map | required: false):
78
- <parameterType> (map): Dictionary of parameters. Here the key is the type of the parameter. Accepted values are "build" or "run".
79
- <parameterName> (string | boolean | number | list(string)): Value of the parameter. Here the key is the name of the parameter.
78
+ build (map | required: false): Dictionary of parameters specific to the 'build' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
79
+ run (map | required: false): Dictionary of parameters specific to the 'run' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
80
80
  revision (map | required: false):
81
81
  notes (string | required: false): Notes for the deployment revision.
82
82
  spec (map):
@@ -362,8 +362,8 @@ def create_revision(
362
362
  ```yaml
363
363
  body (map):
364
364
  parameters (map | required: false):
365
- <parameterType> (map): Dictionary of parameters. Here the key is the type of the parameter. Accepted values are "build" or "run".
366
- <parameterName> (string | boolean | number | list(string)): Value of the parameter. Here the key is the name of the parameter.
365
+ build (map | required: false): Dictionary of parameters specific to the 'build' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
366
+ run (map | required: false): Dictionary of parameters specific to the 'run' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
367
367
  release (map):
368
368
  version (string): A valid semantic release version of the block spec.
369
369
  revision (map | required: false):
@@ -550,8 +550,7 @@ def patch_parameters(
550
550
  \b
551
551
  🧩 ***Input file schema (yaml):***<br/>
552
552
  ```yaml
553
- body (map):
554
- <key> (string | boolean | number | list(string)): Value of the parameter. Here the key is the name of the parameter.
553
+ body (map): Dictionary of parameters specific to the 'run' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
555
554
  ```
556
555
 
557
556
  \b
@@ -23,9 +23,9 @@
23
23
  from typing import List, Optional
24
24
 
25
25
  import typer
26
- from peak.cli import args
27
- from peak.cli.args import OUTPUT_TYPES, PAGING
28
- from peak.constants import OutputTypes
26
+ from peak.cli import args, helpers
27
+ from peak.cli.args import DRY_RUN, GENERATE_YAML, OUTPUT_TYPES, PAGING
28
+ from peak.constants import OutputTypes, OutputTypesNoTable
29
29
  from peak.output import Writer
30
30
  from peak.press.deployments import Deployment
31
31
  from rich.console import Console
@@ -36,6 +36,8 @@ app = typer.Typer(
36
36
  )
37
37
  console = Console()
38
38
 
39
+ _DEPLOYMENT_ID = typer.Argument(..., help="ID of the Block deployment to be used in this operation")
40
+
39
41
 
40
42
  @app.command("list", short_help="List App and Block deployments.")
41
43
  def list_deployments(
@@ -123,3 +125,47 @@ def execute_resources(
123
125
  with writer.pager():
124
126
  response = deployment_client.execute_resources(deployment_id)
125
127
  writer.write(response)
128
+
129
+
130
+ @app.command(short_help="Update the parameters for a deployment at run time.")
131
+ def patch_parameters(
132
+ ctx: typer.Context,
133
+ deployment_id: str = _DEPLOYMENT_ID,
134
+ file: str = args.TEMPLATE_PATH,
135
+ params_file: Optional[str] = args.TEMPLATE_PARAMS_FILE,
136
+ params: Optional[List[str]] = args.TEMPLATE_PARAMS,
137
+ dry_run: Optional[bool] = DRY_RUN, # noqa: ARG001
138
+ paging: Optional[bool] = PAGING, # noqa: ARG001
139
+ output_type: Optional[OutputTypesNoTable] = OUTPUT_TYPES, # noqa: ARG001
140
+ generate: Optional[bool] = GENERATE_YAML, # noqa: ARG001
141
+ ) -> None:
142
+ """***Update*** the parameters for a deployment at run time.
143
+
144
+ \b
145
+ 🧩 ***Input file schema (yaml):***<br/>
146
+ ```yaml
147
+ body (map): Dictionary of parameters specific to the 'run' phase. Keys are parameter names, and values are the parameter values, which can be of type string, boolean, number, dictionary or list (string, number, dictionary).
148
+ ```
149
+
150
+ \b
151
+ 📝 ***Example usage:***
152
+ ```bash
153
+ peak deployments patch-parameters <deployment-id> /path/to/body.yaml -v /path/to/params.yaml
154
+ ```
155
+
156
+ \b
157
+ 🆗 ***Response:***
158
+ ```
159
+ {...}
160
+ ```
161
+
162
+ 🔗 [**API Documentation**](https://press.peak.ai/api-docs/index.htm#/Deployment%20Parameters/patch_v1_deployments__deploymentId__parameters_run)
163
+ """
164
+ body = helpers.template_handler(file, params_file, params)
165
+ deployments_client: Deployment = ctx.obj["client"]
166
+ body = helpers.remove_unknown_args(body, deployments_client.patch_parameters)
167
+ writer: Writer = ctx.obj["writer"]
168
+
169
+ with writer.pager():
170
+ response = deployments_client.patch_parameters(deployment_id, **body)
171
+ writer.write(response)
peak/metrics/metrics.py CHANGED
@@ -550,4 +550,4 @@ def get_client(session: Optional[Session] = None) -> Metric:
550
550
  return Metric(session)
551
551
 
552
552
 
553
- __all__ = ["get_client"]
553
+ __all__: List[str] = ["get_client"]
peak/press/apps.py CHANGED
@@ -147,6 +147,7 @@ class App(BaseClient):
147
147
  featured: Optional[bool] = None,
148
148
  scope: Optional[str] = None,
149
149
  tenants: Optional[List[str]] = None,
150
+ parameters: Optional[Dict[str, List[Dict[str, Any]]]] = None,
150
151
  ) -> Dict[str, str]:
151
152
  """Creates a new App spec.
152
153
 
@@ -166,6 +167,10 @@ class App(BaseClient):
166
167
  and `shared` allows specifying what set of tenants can access and use this spec.
167
168
  By default it is `private`.
168
169
  tenants (List[str] | None): Given a shared scope, specify what other tenants can discover and deploy this spec.
170
+ parameters (Optional[Dict[str, List[Dict[str, Any]]]]): A dictionary containing optional keys `build` and `run`. The structure of the dictionary is as follows:
171
+
172
+ - `build` (List[Dict[str, Any]], optional): A list of parameter objects, the values of which will be given and used at deployment time.
173
+ - `run` (List[Dict[str, Any]], optional): A list of parameter objects, the values of which will be given at deployment time and will be used at run time.
169
174
 
170
175
  Returns:
171
176
  Dict[str, str]: Id of the created app spec.
@@ -203,6 +208,37 @@ class App(BaseClient):
203
208
  }
204
209
  ]
205
210
  }
211
+ SCHEMA(Parameters):
212
+ The valid types for parameters are `boolean`, `string`, `string_array`, `number`, `number_array`, `object` and `object_array`.
213
+
214
+ .. code-block:: json
215
+
216
+ {
217
+ "build": [
218
+ {
219
+ "name": "string(required)",
220
+ "type": "string(required)",
221
+ "required": "boolean(required)",
222
+ "description": "string",
223
+ "defaultValue": "string(required)",
224
+ "title": "string",
225
+ "options": "list(str)",
226
+ "hideValue": "boolean",
227
+ }
228
+ ],
229
+ "run": [
230
+ {
231
+ "name": "string(required)",
232
+ "type": "string(required)",
233
+ "required": "boolean(required)",
234
+ "description": "string",
235
+ "defaultValue": "string(required)",
236
+ "title": "string",
237
+ "options": "list(str)",
238
+ "hideValue": "boolean",
239
+ }
240
+ ]
241
+ }
206
242
 
207
243
  Raises:
208
244
  BadRequestException: The given parameters are invalid.
@@ -218,6 +254,7 @@ class App(BaseClient):
218
254
  "spec": json.dumps(body),
219
255
  "featured": json.dumps(featured),
220
256
  "scope": scope,
257
+ "parameters": json.dumps(parameters),
221
258
  }
222
259
 
223
260
  if tenants:
@@ -319,7 +356,12 @@ class App(BaseClient):
319
356
  subdomain="press",
320
357
  )
321
358
 
322
- def create_spec_release(self, spec_id: str, body: Dict[str, Any]) -> Dict[str, str]:
359
+ def create_spec_release(
360
+ self,
361
+ spec_id: str,
362
+ body: Dict[str, Any],
363
+ parameters: Optional[Dict[str, List[Dict[str, Any]]]] = None,
364
+ ) -> Dict[str, str]:
323
365
  """Publish a new release to an existing App spec.
324
366
 
325
367
  Spec details (Block spec ID and Release version) needs to be added to the `config` key.
@@ -331,6 +373,10 @@ class App(BaseClient):
331
373
  Args:
332
374
  spec_id (str): Id of the spec in which new release will be created
333
375
  body (Dict[str, Any]): Dictionary containing updated release and config in the expected format.
376
+ parameters (Optional[Dict[str, List[Dict[str, Any]]]]): A dictionary containing optional keys `build` and `run`. The structure of the dictionary is as follows:
377
+
378
+ - `build` (List[Dict[str, Any]], optional): A list of parameter objects, the values of which will be given and used at deployment time.
379
+ - `run` (List[Dict[str, Any]], optional): A list of parameter objects, the values of which will be given at deployment time and will be used at run time.
334
380
 
335
381
  Returns:
336
382
  Dict[str, str]: Dictionary containing spec id and release version
@@ -354,6 +400,36 @@ class App(BaseClient):
354
400
  }
355
401
  }
356
402
 
403
+ SCHEMA(Parameters):
404
+ The valid types for parameters are `boolean`, `string`, `string_array`, `number`, `number_array`, `object` and `object_array`.
405
+
406
+ .. code-block:: json
407
+
408
+ {
409
+ "build": [
410
+ {
411
+ "defaultValue": "string(required)",
412
+ "description": "string",
413
+ "hideValue": "boolean",
414
+ "name": "string(required)",
415
+ "required": "boolean(required)",
416
+ "title": "string",
417
+ "type": "string(required)",
418
+ }
419
+ ],
420
+ "run": [
421
+ {
422
+ "defaultValue": "string(required)",
423
+ "description": "string",
424
+ "hideValue": "boolean",
425
+ "name": "string(required)",
426
+ "required": "boolean(required)",
427
+ "title": "string",
428
+ "type": "string(required)",
429
+ }
430
+ ]
431
+ }
432
+
357
433
  Raises:
358
434
  BadRequestException: The given parameters are invalid.
359
435
  UnauthorizedException: The credentials are invalid.
@@ -369,7 +445,10 @@ class App(BaseClient):
369
445
  endpoint,
370
446
  method,
371
447
  content_type=ContentType.APPLICATION_JSON,
372
- body=body,
448
+ body={
449
+ **body,
450
+ "parameters": parameters,
451
+ },
373
452
  subdomain="press",
374
453
  )
375
454
 
@@ -517,7 +596,7 @@ class App(BaseClient):
517
596
  subdomain="press",
518
597
  )
519
598
 
520
- def create_deployment(self, body: Dict[str, str]) -> Dict[str, str]:
599
+ def create_deployment(self, body: Dict[str, Any]) -> Dict[str, str]:
521
600
  """Creates a new deployment from App spec.
522
601
 
523
602
  Uses the latest spec release if release version is not provided.
@@ -548,6 +627,14 @@ class App(BaseClient):
548
627
  ],
549
628
  "title": "string"
550
629
  },
630
+ "appParameters": {
631
+ "build": {
632
+ "param_name": "param_value (string | number | boolean | array)"
633
+ },
634
+ "run": {
635
+ "param_name": "param_value (string | number | boolean | array)"
636
+ }
637
+ },
551
638
  "parameters": {
552
639
  "spec_name": {
553
640
  "build": {
@@ -772,7 +859,7 @@ class App(BaseClient):
772
859
  subdomain="press",
773
860
  )
774
861
 
775
- def create_deployment_revision(self, deployment_id: str, body: Dict[str, str]) -> Dict[str, str]:
862
+ def create_deployment_revision(self, deployment_id: str, body: Dict[str, Any]) -> Dict[str, str]:
776
863
  """Creates a new Revision of a Deployment, from a selected App Spec Release.
777
864
 
778
865
  Publish a new revision of an App Deployment. The payload must specify the release version of the parent spec that you wish to use (if one is not provided, the latest available will be used),
@@ -798,6 +885,14 @@ class App(BaseClient):
798
885
  "revision": {
799
886
  "notes": "string",
800
887
  },
888
+ "appParameters": {
889
+ "build": {
890
+ "param_name": "param_value (string | number | boolean | array)"
891
+ },
892
+ "run": {
893
+ "param_name": "param_value (string | number | boolean | array)"
894
+ }
895
+ },
801
896
  "parameters": {
802
897
  "block-name-1":{
803
898
  "build": {
@@ -984,7 +1079,7 @@ class App(BaseClient):
984
1079
  "summary": "string",
985
1080
  "tags": [
986
1081
  {
987
- "name": "string",
1082
+ "name": "string",
988
1083
  }
989
1084
  ],
990
1085
  "title": "string",
peak/press/deployments.py CHANGED
@@ -153,6 +153,41 @@ class Deployment(BaseClient):
153
153
  subdomain="press",
154
154
  )
155
155
 
156
+ def patch_parameters(
157
+ self,
158
+ deployment_id: str,
159
+ body: Dict[str, Any],
160
+ ) -> Dict[str, Any]:
161
+ """Get the parameters for a deployment at run time.
162
+
163
+ REFERENCE:
164
+ 🔗 `API Documentation <https://press.peak.ai/api-docs/index.htm#/Deployment%20Parameters/patch_v1_deployments__deploymentId__parameters_run>`__
165
+
166
+ Args:
167
+ deployment_id (str): The ID of the deployment.
168
+ body (Dict[str, Any]): Dictionary containing the updated parameters.
169
+
170
+ Returns:
171
+ Dict[str, Any]: Dictionary containing the updated parameters.
172
+
173
+ Raises:
174
+ BadRequestException: The given parameters are invalid.
175
+ UnauthorizedException: The credentials are invalid.
176
+ ForbiddenException: The user does not have permission to perform the operation.
177
+ NotFoundException: The given deployment does not exist.
178
+ InternalServerErrorException: The server encountered an unexpected condition that
179
+ prevented it from fulfilling the request.
180
+ """
181
+ method, endpoint = HttpMethods.PATCH, f"v1/deployments/{deployment_id}/parameters/run"
182
+
183
+ return self.session.create_request( # type: ignore[no-any-return]
184
+ endpoint,
185
+ method,
186
+ body=body,
187
+ content_type=ContentType.APPLICATION_JSON,
188
+ subdomain="press",
189
+ )
190
+
156
191
 
157
192
  def get_client(session: Optional[Session] = None) -> Deployment:
158
193
  """Returns a Deployment client.
@@ -10,6 +10,18 @@ body:
10
10
  imageUrl: https://my-block-pics.com/image-0.jpg
11
11
  tags:
12
12
  - name: CLI
13
+ appParameters:
14
+ build:
15
+ watcher_user: "abc@123.com"
16
+ use_cache: true
17
+ runtime_exceeded: 10
18
+ run:
19
+ agg_type: "SUM"
20
+ num_iterations: 50
21
+ email_notifications: true
22
+ file_names:
23
+ - input.csv
24
+ - output.csv
13
25
  parameters:
14
26
  block-1:
15
27
  build:
@@ -1,6 +1,18 @@
1
1
  # app_deployment_revision.yaml
2
2
 
3
3
  body:
4
+ appParameters:
5
+ build:
6
+ watcher_user: "abc@123.com"
7
+ use_cache: true
8
+ runtime_exceeded: 10
9
+ run:
10
+ agg_type: "SUM"
11
+ num_iterations: 50
12
+ email_notifications: true
13
+ file_names:
14
+ - input.csv
15
+ - output.csv
4
16
  parameters:
5
17
  block-1:
6
18
  build:
@@ -24,6 +24,69 @@ body:
24
24
  release:
25
25
  version: 1.0.0
26
26
  autoRunOnDeploy: False
27
+ parameters:
28
+ build:
29
+ - name: watcher_user
30
+ type: string
31
+ required: true
32
+ title: Watcher User Email
33
+ description: Set the watcher user email
34
+ defaultValue: user@peak.ai
35
+ hideValue: false
36
+ - name: use_cache
37
+ type: boolean
38
+ required: false
39
+ title: Image Caching
40
+ description: Enable image caching for the workflow
41
+ defaultValue: false
42
+ - name: runtime_exceeded
43
+ type: number
44
+ required: false
45
+ title: Runtime Exceeded
46
+ description: Select the runtime exceeded value to trigger a failed notification for the workflow (in minutes)
47
+ options:
48
+ - title: Low
49
+ value: 10
50
+ - title: Medium
51
+ value: 50
52
+ - title: High
53
+ value: 100
54
+ defaultValue: 10
55
+ run:
56
+ - name: agg_type
57
+ type: string
58
+ required: false
59
+ title: Agg Type
60
+ description: Select an aggregation function (e.g., AVG, SUM, COUNT)
61
+ defaultValue: AVG
62
+ hideValue: true
63
+ - name: email_notifications
64
+ type: boolean
65
+ required: false
66
+ title: Email Notifications
67
+ description: Enable email notifications
68
+ defaultValue: false
69
+ - name: num_iterations
70
+ type: number
71
+ required: false
72
+ title: Number of Iterations
73
+ description: Select the number of iterations
74
+ options:
75
+ - title: Low
76
+ value: 10
77
+ - title: Medium
78
+ value: 50
79
+ - title: High
80
+ value: 100
81
+ defaultValue: 10
82
+ - name: file_names
83
+ type: string_array
84
+ required: true
85
+ title: File Names
86
+ description: Specify input and output file names
87
+ defaultValue:
88
+ - input.csv
89
+ - output.csv
27
90
  featured: true
28
91
  scope: shared
29
92
  tenants:
@@ -13,3 +13,66 @@ body:
13
13
  release:
14
14
  version: 2.0.0
15
15
  autoRunOnDeploy: False
16
+ parameters:
17
+ build:
18
+ - name: watcher_user
19
+ type: string
20
+ required: true
21
+ title: Watcher User Email
22
+ description: Set the watcher user email
23
+ defaultValue: user@peak.ai
24
+ hideValue: false
25
+ - name: use_cache
26
+ type: boolean
27
+ required: false
28
+ title: Image Caching
29
+ description: Enable image caching for the workflow
30
+ defaultValue: false
31
+ - name: runtime_exceeded
32
+ type: number
33
+ required: false
34
+ title: Runtime Exceeded
35
+ description: Select the runtime exceeded value to trigger a failed notification for the workflow (in minutes)
36
+ options:
37
+ - title: Low
38
+ value: 10
39
+ - title: Medium
40
+ value: 50
41
+ - title: High
42
+ value: 100
43
+ defaultValue: 10
44
+ run:
45
+ - name: agg_type
46
+ type: string
47
+ required: false
48
+ title: Agg Type
49
+ description: Select an aggregation function (e.g., AVG, SUM, COUNT)
50
+ defaultValue: AVG
51
+ hideValue: true
52
+ - name: email_notifications
53
+ type: boolean
54
+ required: false
55
+ title: Email Notifications
56
+ description: Enable email notifications
57
+ defaultValue: false
58
+ - name: num_iterations
59
+ type: number
60
+ required: false
61
+ title: Number of Iterations
62
+ description: Select the number of iterations
63
+ options:
64
+ - title: Low
65
+ value: 10
66
+ - title: Medium
67
+ value: 50
68
+ - title: High
69
+ value: 100
70
+ defaultValue: 10
71
+ - name: file_names
72
+ type: string_array
73
+ required: true
74
+ title: File Names
75
+ description: Specify input and output file names
76
+ defaultValue:
77
+ - input.csv
78
+ - output.csv