gws_core

Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

ConfigSpecs

Attributes
specs: Dict
Functions
__init__

Define the spec of a task or a view Example: ConfigSpecs({ "param1": IntParam(human_name="Param 1", default_value=1), "param2": StrParam(human_name="Param 2", default_value="Hello") })

specs : Dict
_description_
add_or_update_spec
spec_name : str
spec : ParamSpec
add_spec
spec_name : str
spec : ParamSpec
all_config_are_optional

Check if all the config are optional

Return type : bool
build_config_params

Build the ConfigParams from the param_specs and param_values. ConfigParam is supposed to be used directly not stored. Check the param_values with params_specs and return ConfigParams if ok. ConfigParams contains all value and default value if not provided

param_values : Dict
[description]
Return type : ConfigParams
check_config_specs

Check that the config specs are valid

check_spec_exists
spec_name : str
get_and_check_values

Check and validate all values based on spec Returns all the parameters including default value if not provided

raises MissingConfigsException: If one or more mandatory params where not provided it raises a MissingConfigsException

param_values : Dict
Return type : Dict
get_default_values
Return type : Dict
get_spec
spec_name : str
Return type : ParamSpec
has_spec
spec_name : str
Return type : bool
has_specs
Return type : bool
has_visible_config_specs

Check if the config has visible specs

Return type : bool
mandatory_values_are_set

check that all mandatory configs are provided

param_values : Dict
Return type : bool
merge_specs

Merge two ConfigSpecs objects

specs2 : ConfigSpecs
Return type : ConfigSpecs
remove_spec
spec_name : str
to_dto

convert the config specs to json

skip_private : bool - True
Return type : Dict
to_json_dict

convert the config specs to json

skip_private : bool - True
Return type : Dict
update_spec
spec_name : str
spec : ParamSpec
from_dto @classmethod

Create a config specs from a dto

dict_ : Dict
Return type : ConfigSpecs
from_json @classmethod

Create a config specs from a json

dict_ : Dict
Return type : ConfigSpecs