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
* feat: Conditional parameters (HEXA-1687)
* move check to param init
* add option to let user decide if disables when true or false
* Rename 'disable_when' to 'disableWhen' for consistency
* fix tests
"""Decorate a pipeline function by attaching a parameter to it..
256
290
@@ -282,6 +316,14 @@ def parameter(
282
316
values of the chosen type)
283
317
directory : str, optional
284
318
An optional parameter to force file selection to specific directory (only used for parameter type File). If the directory does not exist, it will be ignored.
319
+
disables : sequence of str, optional
320
+
An optional list of parameter codes to disable when this (boolean) parameter's value matches ``disable_when``.
321
+
Disabled parameters are hidden/greyed out in the run form, their required check is skipped, and they are
322
+
omitted from the run config (the pipeline function receives their default value). Only boolean parameters can
323
+
use this.
324
+
disable_when : bool, default=True
325
+
The boolean value of this parameter that triggers the disabling of the parameters listed in ``disables``.
326
+
Use ``disable_when=False`` for an "enable" toggle (the listed parameters are disabled while it is unticked).
0 commit comments