You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, templates define variables without specifying any metadata.
To take advantage of the jinja templating tool, it would be nice to support type validation, enumerations and default values as specified here SwissDataScienceCenter/renku-project-template#109
Describe the solution you'd like
The new properties of a variable would be:
name: variable name, currently taken from the key. It must be unique (check when validating the template)
description: a short description for the variable intended use, currently taken from the value.
type: variable type. We should support at least string, enum, number, boolean. The validation should be done at project creation (check the specified values is valid/allowed when validating the template). Requiring the specific type is probably the easiest solution, but I would relax the constrain to accept also stringy numbers ("12" instead of 12), as well as 0 / 1, "0" / "1" or "true" / "false" (any capitalization) for booleans.
enum: an array of allowed values. This is mandatory when the type is "enum" and can't be specified when it is any other type (check when validating the template).
default: optional default value. It must have a valid type (check when validating the template).
The renku-core endpoint templates.read_manifest should change accordingly, providing the variables as an array of objects with the same properties specified above.
Describe alternatives you've considered
The primary goal is to support enumerations. Any alternative solution is welcome
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, templates define variables without specifying any metadata.
To take advantage of the jinja templating tool, it would be nice to support type validation, enumerations and default values as specified here SwissDataScienceCenter/renku-project-template#109
Describe the solution you'd like
The new properties of a variable would be:
name
: variable name, currently taken from the key. It must be unique (check when validating the template)description
: a short description for the variable intended use, currently taken from the value.type
: variable type. We should support at leaststring
,enum
,number
,boolean
. The validation should be done at project creation (check the specified values is valid/allowed when validating the template). Requiring the specific type is probably the easiest solution, but I would relax the constrain to accept also stringy numbers ("12"
instead of12
), as well as0
/1
,"0"
/"1"
or"true"
/"false"
(any capitalization) for booleans.enum
: an array of allowed values. This is mandatory when the type is "enum" and can't be specified when it is any other type (check when validating the template).default
: optional default value. It must have a valid type (check when validating the template).The renku-core endpoint
templates.read_manifest
should change accordingly, providing the variables as an array of objects with the same properties specified above.Describe alternatives you've considered
The primary goal is to support enumerations. Any alternative solution is welcome
The text was updated successfully, but these errors were encountered: