From 338d1d1aae30e0a2702851bfa00e7970f24b4dd1 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Mon, 4 May 2026 08:18:14 +0200 Subject: [PATCH] feat: multi layers support --- src/rougail/user_data_yaml/__init__.py | 95 ++++++++++--------- tests/errors/results/01_disabled_family.yaml | 17 +++- .../results/02_disabled_hidden_family.yaml | 2 +- tests/result_tutorial/050/errors_02.json | 24 ++++- tests/result_tutorial/052/errors_01.json | 2 +- tests/result_tutorial/070/errors_02.json | 2 +- tests/result_tutorial/081/01_ro.json | 19 ++-- tests/result_tutorial/081/01_rw.json | 19 ++-- tests/result_tutorial/082/01_ro.json | 6 +- tests/result_tutorial/082/01_rw.json | 6 +- tests/result_tutorial/084/01_ro.json | 11 +++ tests/result_tutorial/084/01_rw.json | 11 +++ tests/result_tutorial/084/errors_01.json | 4 + tests/result_tutorial/085/01_ro.json | 11 +++ tests/result_tutorial/085/01_rw.json | 11 +++ tests/result_tutorial/085/errors_01.json | 4 + .../errors/all.json | 4 +- .../errors/mandatories.json | 12 --- .../errors/all.json | 10 +- .../errors/mandatories.json | 10 +- .../errors/all.json | 10 +- .../errors/mandatories.json | 10 +- .../17_5redefine_leadership/errors/all.json | 2 +- .../20_0family_underscore/errors/all.json | 12 +-- .../errors/all.json | 2 +- .../errors/all.json | 9 +- .../errors/mandatories.json | 2 +- .../44_0leadership_hidden/errors/all.json | 2 +- .../errors/all.json | 2 +- .../errors/all.json | 2 +- .../results/60_0family_hidden/errors/all.json | 2 +- .../errors/all.json | 10 +- .../makedict/all.json | 2 +- .../errors/all.json | 10 +- .../makedict/all.json | 2 +- .../errors/all.json | 4 +- 36 files changed, 253 insertions(+), 110 deletions(-) create mode 100644 tests/result_tutorial/084/01_ro.json create mode 100644 tests/result_tutorial/084/01_rw.json create mode 100644 tests/result_tutorial/084/errors_01.json create mode 100644 tests/result_tutorial/085/01_ro.json create mode 100644 tests/result_tutorial/085/01_rw.json create mode 100644 tests/result_tutorial/085/errors_01.json delete mode 100644 tests/results/04_5disabled_calculation_variable11/errors/mandatories.json diff --git a/src/rougail/user_data_yaml/__init__.py b/src/rougail/user_data_yaml/__init__.py index 9912270..648c1b5 100644 --- a/src/rougail/user_data_yaml/__init__.py +++ b/src/rougail/user_data_yaml/__init__.py @@ -18,21 +18,26 @@ along with this program. If not, see . from ruamel.yaml import YAML from pathlib import Path +from itertools import chain from rougail.error import ExtensionError from tiramisu.error import ValueOptionError, PropertiesOptionError, LeadershipError from rougail.utils import undefined +from tiramisu import MetaConfig from .i18n import _ from .__version__ import __version__ class RougailUserDataYaml: + has_several_layers = True + def __init__( self, config, *, rougailconfig=None, + **kwargs, ) -> None: if rougailconfig is None: from rougail import RougailConfig @@ -46,13 +51,23 @@ class RougailUserDataYaml: if "yaml" not in user_data: raise ExtensionError(_("yaml is not set in step.user_data")) self.rougailconfig = rougailconfig - self.filenames = self.rougailconfig["yaml.filename"] + self.filenames = [] + for filename in self.rougailconfig["yaml.filename"]: + filename = Path(filename) + if filename.is_file(): + self.filenames.append(filename) + else: + for name in sorted(chain(filename.glob('*.yml'), filename.glob('*.yaml'))): + self.filenames.append(name) + self.file_with_secrets = self.rougailconfig["yaml.file_with_secrets"] - self.config = config self.errors = [] self.warnings = [] self.source = _('the YAML file "{0}"') + def count_layers(self): + return len(self.filenames) + def run( self, ) -> None: @@ -61,48 +76,42 @@ class RougailUserDataYaml: if self.file_with_secrets == "last": last_filename_idx = len(self.filenames) - 1 for idx, filename in enumerate(self.filenames): - filename = Path(filename) - if filename.is_file(): - filenames = [filename] - else: - filenames = list(filename.glob('*.yml')) + list(filename.glob('*.yaml')) - for filename in sorted(filenames): - file_values = self.open(filename) - if not file_values: - continue - values = {} - if not isinstance(file_values, dict): - self.errors.append( - _( - 'cannot load "{0}", the root value is not a dict but "{1}"' - ).format(filename, file_values) - ) - else: - self.parse( - values, - "", - file_values, - filename, - ) - if self.file_with_secrets == "none": - allow_secrets_variables = False - elif self.file_with_secrets == "first": - allow_secrets_variables = idx == 0 - elif self.file_with_secrets == "last": - allow_secrets_variables = idx == last_filename_idx - else: - allow_secrets_variables = True - user_data.append( - { - "source": self.source.format(filename), - "errors": self.errors, - "warnings": self.warnings, - "values": values, - "options": { - "allow_secrets_variables": allow_secrets_variables, - }, - } + file_values = self.open(filename) + if not file_values: + continue + values = {} + if not isinstance(file_values, dict): + self.errors.append( + _( + 'cannot load "{0}", the root value is not a dict but "{1}"' + ).format(filename, file_values) ) + else: + self.parse( + values, + "", + file_values, + filename, + ) + if self.file_with_secrets == "none": + allow_secrets_variables = False + elif self.file_with_secrets == "first": + allow_secrets_variables = idx == 0 + elif self.file_with_secrets == "last": + allow_secrets_variables = idx == last_filename_idx + else: + allow_secrets_variables = True + user_data.append( + { + "source": self.source.format(filename), + "errors": self.errors, + "warnings": self.warnings, + "values": values, + "options": { + "allow_secrets_variables": allow_secrets_variables, + }, + } + ) return user_data def open(self, filename: str) -> dict: diff --git a/tests/errors/results/01_disabled_family.yaml b/tests/errors/results/01_disabled_family.yaml index 217db0a..b55bc89 100644 --- a/tests/errors/results/01_disabled_family.yaml +++ b/tests/errors/results/01_disabled_family.yaml @@ -1,4 +1,19 @@ { "errors": [], - "warnings": [] + "warnings": [ + [ + [ + "family \"family_disabled\" has property disabled, so cannot access to \"variable1\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_disabled_family.yaml\"", + "family_disabled.variable1", + null + ] + ], + [ + [ + "family \"family_disabled\" has property disabled, so cannot access to \"variable2\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_disabled_family.yaml\"", + "family_disabled.variable2", + null + ] + ] + ] } \ No newline at end of file diff --git a/tests/errors/results/02_disabled_hidden_family.yaml b/tests/errors/results/02_disabled_hidden_family.yaml index fc024b8..016879e 100644 --- a/tests/errors/results/02_disabled_hidden_family.yaml +++ b/tests/errors/results/02_disabled_hidden_family.yaml @@ -3,7 +3,7 @@ "warnings": [ [ [ - "cannot modify the option \"variable1\" because is frozen, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/02_disabled_hidden_family.yaml\"", + "family \"family_disabled_hidden\" has property disabled and hidden, so cannot access to \"variable1\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/02_disabled_hidden_family.yaml\"", "family_disabled_hidden.variable1", null ] diff --git a/tests/result_tutorial/050/errors_02.json b/tests/result_tutorial/050/errors_02.json index 217db0a..9ae7267 100644 --- a/tests/result_tutorial/050/errors_02.json +++ b/tests/result_tutorial/050/errors_02.json @@ -1,4 +1,26 @@ { "errors": [], - "warnings": [] + "warnings": [ + [ + [ + "family \"manual\" (Manual proxy configuration) has property disabled, so cannot access to \"address\" (HTTP address), it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/050/config/02/config.yml\"", + "manual.http_proxy.address", + null + ] + ], + [ + [ + "family \"manual\" (Manual proxy configuration) has property disabled, so cannot access to \"port\" (HTTP Port), it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/050/config/02/config.yml\"", + "manual.http_proxy.port", + null + ] + ], + [ + [ + "family \"manual\" (Manual proxy configuration) has property disabled, so cannot access to \"use_for_https\" (Also use this proxy for HTTPS), it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/050/config/02/config.yml\"", + "manual.use_for_https", + null + ] + ] + ] } \ No newline at end of file diff --git a/tests/result_tutorial/052/errors_01.json b/tests/result_tutorial/052/errors_01.json index e1a4a15..ff0fdae 100644 --- a/tests/result_tutorial/052/errors_01.json +++ b/tests/result_tutorial/052/errors_01.json @@ -3,7 +3,7 @@ "warnings": [ [ [ - "cannot modify the option \"address\" (HTTPS address) because is frozen, it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/052/config/01/config.yml\"", + "family \"https_proxy\" (HTTPS Proxy) has property hidden, so cannot access to \"address\" (HTTPS address), it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/052/config/01/config.yml\"", "manual.https_proxy.address", null ] diff --git a/tests/result_tutorial/070/errors_02.json b/tests/result_tutorial/070/errors_02.json index d3e41d4..ce6ed0c 100644 --- a/tests/result_tutorial/070/errors_02.json +++ b/tests/result_tutorial/070/errors_02.json @@ -3,7 +3,7 @@ "warnings": [ [ [ - "cannot modify the option \"address\" (HTTPS address) because is frozen, it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/070/config/02/config.yml\"", + "family \"https_proxy\" (HTTPS Proxy) has property hidden, so cannot access to \"address\" (HTTPS address), it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/070/config/02/config.yml\"", "manual.https_proxy.address", null ] diff --git a/tests/result_tutorial/081/01_ro.json b/tests/result_tutorial/081/01_ro.json index afca492..47c0abd 100644 --- a/tests/result_tutorial/081/01_ro.json +++ b/tests/result_tutorial/081/01_ro.json @@ -1,9 +1,10 @@ -[ - [ - [ - "mandatory variable but has no value", - "manual.socks_proxy.address", - null - ] - ] -] \ No newline at end of file +{ + "proxy_mode": "Manual proxy configuration", + "manual.http_proxy.address": "http.proxy.net", + "manual.http_proxy.port": "3128", + "manual.use_for_https": false, + "manual.https_proxy.address": "https.proxy.net", + "manual.https_proxy.port": "8080", + "manual.socks_proxy.address": "socks.proxy.net", + "manual.socks_proxy.port": "8080" +} \ No newline at end of file diff --git a/tests/result_tutorial/081/01_rw.json b/tests/result_tutorial/081/01_rw.json index afca492..47c0abd 100644 --- a/tests/result_tutorial/081/01_rw.json +++ b/tests/result_tutorial/081/01_rw.json @@ -1,9 +1,10 @@ -[ - [ - [ - "mandatory variable but has no value", - "manual.socks_proxy.address", - null - ] - ] -] \ No newline at end of file +{ + "proxy_mode": "Manual proxy configuration", + "manual.http_proxy.address": "http.proxy.net", + "manual.http_proxy.port": "3128", + "manual.use_for_https": false, + "manual.https_proxy.address": "https.proxy.net", + "manual.https_proxy.port": "8080", + "manual.socks_proxy.address": "socks.proxy.net", + "manual.socks_proxy.port": "8080" +} \ No newline at end of file diff --git a/tests/result_tutorial/082/01_ro.json b/tests/result_tutorial/082/01_ro.json index fd1231f..77b39cc 100644 --- a/tests/result_tutorial/082/01_ro.json +++ b/tests/result_tutorial/082/01_ro.json @@ -4,8 +4,8 @@ "manual.http_proxy.port": "3128", "manual.use_for_https": false, "manual.https_proxy.address": "https.proxy.net", - "manual.https_proxy.port": "3128", - "manual.socks_proxy.address": "http.proxy.net", - "manual.socks_proxy.port": "3128", + "manual.https_proxy.port": "8080", + "manual.socks_proxy.address": "socks.proxy.net", + "manual.socks_proxy.port": "8080", "manual.socks_proxy.version": "v5" } \ No newline at end of file diff --git a/tests/result_tutorial/082/01_rw.json b/tests/result_tutorial/082/01_rw.json index fd1231f..77b39cc 100644 --- a/tests/result_tutorial/082/01_rw.json +++ b/tests/result_tutorial/082/01_rw.json @@ -4,8 +4,8 @@ "manual.http_proxy.port": "3128", "manual.use_for_https": false, "manual.https_proxy.address": "https.proxy.net", - "manual.https_proxy.port": "3128", - "manual.socks_proxy.address": "http.proxy.net", - "manual.socks_proxy.port": "3128", + "manual.https_proxy.port": "8080", + "manual.socks_proxy.address": "socks.proxy.net", + "manual.socks_proxy.port": "8080", "manual.socks_proxy.version": "v5" } \ No newline at end of file diff --git a/tests/result_tutorial/084/01_ro.json b/tests/result_tutorial/084/01_ro.json new file mode 100644 index 0000000..fd1231f --- /dev/null +++ b/tests/result_tutorial/084/01_ro.json @@ -0,0 +1,11 @@ +{ + "proxy_mode": "Manual proxy configuration", + "manual.http_proxy.address": "http.proxy.net", + "manual.http_proxy.port": "3128", + "manual.use_for_https": false, + "manual.https_proxy.address": "https.proxy.net", + "manual.https_proxy.port": "3128", + "manual.socks_proxy.address": "http.proxy.net", + "manual.socks_proxy.port": "3128", + "manual.socks_proxy.version": "v5" +} \ No newline at end of file diff --git a/tests/result_tutorial/084/01_rw.json b/tests/result_tutorial/084/01_rw.json new file mode 100644 index 0000000..fd1231f --- /dev/null +++ b/tests/result_tutorial/084/01_rw.json @@ -0,0 +1,11 @@ +{ + "proxy_mode": "Manual proxy configuration", + "manual.http_proxy.address": "http.proxy.net", + "manual.http_proxy.port": "3128", + "manual.use_for_https": false, + "manual.https_proxy.address": "https.proxy.net", + "manual.https_proxy.port": "3128", + "manual.socks_proxy.address": "http.proxy.net", + "manual.socks_proxy.port": "3128", + "manual.socks_proxy.version": "v5" +} \ No newline at end of file diff --git a/tests/result_tutorial/084/errors_01.json b/tests/result_tutorial/084/errors_01.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/result_tutorial/084/errors_01.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/result_tutorial/085/01_ro.json b/tests/result_tutorial/085/01_ro.json new file mode 100644 index 0000000..fd1231f --- /dev/null +++ b/tests/result_tutorial/085/01_ro.json @@ -0,0 +1,11 @@ +{ + "proxy_mode": "Manual proxy configuration", + "manual.http_proxy.address": "http.proxy.net", + "manual.http_proxy.port": "3128", + "manual.use_for_https": false, + "manual.https_proxy.address": "https.proxy.net", + "manual.https_proxy.port": "3128", + "manual.socks_proxy.address": "http.proxy.net", + "manual.socks_proxy.port": "3128", + "manual.socks_proxy.version": "v5" +} \ No newline at end of file diff --git a/tests/result_tutorial/085/01_rw.json b/tests/result_tutorial/085/01_rw.json new file mode 100644 index 0000000..fd1231f --- /dev/null +++ b/tests/result_tutorial/085/01_rw.json @@ -0,0 +1,11 @@ +{ + "proxy_mode": "Manual proxy configuration", + "manual.http_proxy.address": "http.proxy.net", + "manual.http_proxy.port": "3128", + "manual.use_for_https": false, + "manual.https_proxy.address": "https.proxy.net", + "manual.https_proxy.port": "3128", + "manual.socks_proxy.address": "http.proxy.net", + "manual.socks_proxy.port": "3128", + "manual.socks_proxy.version": "v5" +} \ No newline at end of file diff --git a/tests/result_tutorial/085/errors_01.json b/tests/result_tutorial/085/errors_01.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/result_tutorial/085/errors_01.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_params_permissive/errors/all.json b/tests/results/00_2default_calculated_params_permissive/errors/all.json index fb53b8d..eac1223 100644 --- a/tests/results/00_2default_calculated_params_permissive/errors/all.json +++ b/tests/results/00_2default_calculated_params_permissive/errors/all.json @@ -3,14 +3,14 @@ "warnings": [ [ [ - "cannot modify the option \"var1\" (a first variable) because is frozen, it will be ignored when loading from the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"", + "family \"leadership\" has property hidden, so cannot access to \"var1\" (a first variable), it will be ignored when loading from the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"", "rougail.leadership.var1", null ] ], [ [ - "cannot modify the option \"var2\" (a first variable) at index \"0\" because is frozen, it will be ignored when loading from the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"", + "family \"leadership\" is hidden, \"var2\" (a first variable) at index \"0\", it will be ignored when loading from the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"", "rougail.leadership.var2", null ] diff --git a/tests/results/04_5disabled_calculation_variable11/errors/mandatories.json b/tests/results/04_5disabled_calculation_variable11/errors/mandatories.json deleted file mode 100644 index ae8bde1..0000000 --- a/tests/results/04_5disabled_calculation_variable11/errors/mandatories.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "errors": [], - "warnings": [ - [ - [ - "family \"condition\" (a condition) has property disabled, so cannot access to \"variable\" (a variable), it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable11/file/mandatories.yml\"", - "rougail.variable", - null - ] - ] - ] -} \ No newline at end of file diff --git a/tests/results/16_2family_redefine_calculation/errors/all.json b/tests/results/16_2family_redefine_calculation/errors/all.json index 217db0a..1f95968 100644 --- a/tests/results/16_2family_redefine_calculation/errors/all.json +++ b/tests/results/16_2family_redefine_calculation/errors/all.json @@ -1,4 +1,12 @@ { "errors": [], - "warnings": [] + "warnings": [ + [ + [ + "family \"family\" has property disabled, so cannot access to \"var1\", it will be ignored when loading from the YAML file \"tests/results/16_2family_redefine_calculation/file/all.yml\"", + "rougail.family.var1", + null + ] + ] + ] } \ No newline at end of file diff --git a/tests/results/16_2family_redefine_calculation/errors/mandatories.json b/tests/results/16_2family_redefine_calculation/errors/mandatories.json index 217db0a..0a1dbe6 100644 --- a/tests/results/16_2family_redefine_calculation/errors/mandatories.json +++ b/tests/results/16_2family_redefine_calculation/errors/mandatories.json @@ -1,4 +1,12 @@ { "errors": [], - "warnings": [] + "warnings": [ + [ + [ + "family \"family\" has property disabled, so cannot access to \"var1\", it will be ignored when loading from the YAML file \"tests/results/16_2family_redefine_calculation/file/mandatories.yml\"", + "rougail.family.var1", + null + ] + ] + ] } \ No newline at end of file diff --git a/tests/results/16_2family_redefine_disabled/errors/all.json b/tests/results/16_2family_redefine_disabled/errors/all.json index 217db0a..797ce7d 100644 --- a/tests/results/16_2family_redefine_disabled/errors/all.json +++ b/tests/results/16_2family_redefine_disabled/errors/all.json @@ -1,4 +1,12 @@ { "errors": [], - "warnings": [] + "warnings": [ + [ + [ + "family \"family\" has property disabled, so cannot access to \"var1\", it will be ignored when loading from the YAML file \"tests/results/16_2family_redefine_disabled/file/all.yml\"", + "rougail.family.var1", + null + ] + ] + ] } \ No newline at end of file diff --git a/tests/results/16_2family_redefine_disabled/errors/mandatories.json b/tests/results/16_2family_redefine_disabled/errors/mandatories.json index 217db0a..5e9afaa 100644 --- a/tests/results/16_2family_redefine_disabled/errors/mandatories.json +++ b/tests/results/16_2family_redefine_disabled/errors/mandatories.json @@ -1,4 +1,12 @@ { "errors": [], - "warnings": [] + "warnings": [ + [ + [ + "family \"family\" has property disabled, so cannot access to \"var1\", it will be ignored when loading from the YAML file \"tests/results/16_2family_redefine_disabled/file/mandatories.yml\"", + "rougail.family.var1", + null + ] + ] + ] } \ No newline at end of file diff --git a/tests/results/17_5redefine_leadership/errors/all.json b/tests/results/17_5redefine_leadership/errors/all.json index 6024269..2f094c2 100644 --- a/tests/results/17_5redefine_leadership/errors/all.json +++ b/tests/results/17_5redefine_leadership/errors/all.json @@ -3,7 +3,7 @@ "warnings": [ [ [ - "cannot modify the option \"leader\" (a leader) because is frozen, it will be ignored when loading from the YAML file \"tests/results/17_5redefine_leadership/file/all.yml\"", + "family \"leader\" (a leadership) has property hidden, so cannot access to \"leader\" (a leader), it will be ignored when loading from the YAML file \"tests/results/17_5redefine_leadership/file/all.yml\"", "rougail.leader.leader", null ] diff --git a/tests/results/20_0family_underscore/errors/all.json b/tests/results/20_0family_underscore/errors/all.json index 022d291..d55f77b 100644 --- a/tests/results/20_0family_underscore/errors/all.json +++ b/tests/results/20_0family_underscore/errors/all.json @@ -3,42 +3,42 @@ "warnings": [ [ [ - "cannot modify the option \"my_variable\" because is frozen, it will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", + "family \"my_family\" (This is a great family) has property disabled and hidden, so cannot access to \"my_variable\", it will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", "rougail.my_family.type.my_variable", null ] ], [ [ - "cannot modify the option \"my_variable\" because is frozen, it will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", + "family \"my_family\" (This is a great family) has property disabled and hidden, so cannot access to \"my_variable\", it will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", "rougail.my_family.description.my_variable", null ] ], [ [ - "cannot modify the option \"my_variable\" because is frozen, it will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", + "family \"my_family\" (This is a great family) has property disabled and hidden, so cannot access to \"my_variable\", it will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", "rougail.my_family.help.my_variable", null ] ], [ [ - "cannot modify the option \"my_variable\" because is frozen, it will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", + "family \"my_family\" (This is a great family) has property disabled and hidden, so cannot access to \"my_variable\", it will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", "rougail.my_family.mode.my_variable", null ] ], [ [ - "cannot modify the option \"my_variable\" because is frozen, it will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", + "family \"my_family\" (This is a great family) has property disabled and hidden, so cannot access to \"my_variable\", it will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", "rougail.my_family.hidden.my_variable", null ] ], [ [ - "cannot modify the option \"my_variable\" because is frozen, it will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", + "family \"my_family\" (This is a great family) has property disabled and hidden, so cannot access to \"my_variable\", it will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", "rougail.my_family.disabled.my_variable", null ] diff --git a/tests/results/24_0family_hidden_condition_variable_sub_family/errors/all.json b/tests/results/24_0family_hidden_condition_variable_sub_family/errors/all.json index 44b6df3..4c544fd 100644 --- a/tests/results/24_0family_hidden_condition_variable_sub_family/errors/all.json +++ b/tests/results/24_0family_hidden_condition_variable_sub_family/errors/all.json @@ -3,7 +3,7 @@ "warnings": [ [ [ - "cannot modify the option \"var1\" (a variable) because is frozen, it will be ignored when loading from the YAML file \"tests/results/24_0family_hidden_condition_variable_sub_family/file/all.yml\"", + "family \"family\" (possibly hidden family) has property hidden, so cannot access to \"var1\" (a variable), it will be ignored when loading from the YAML file \"tests/results/24_0family_hidden_condition_variable_sub_family/file/all.yml\"", "rougail.family.subfamily.var1", null ] diff --git a/tests/results/24_family_disabled_var_hidden/errors/all.json b/tests/results/24_family_disabled_var_hidden/errors/all.json index 2782d4c..e818bd1 100644 --- a/tests/results/24_family_disabled_var_hidden/errors/all.json +++ b/tests/results/24_family_disabled_var_hidden/errors/all.json @@ -3,7 +3,14 @@ "warnings": [ [ [ - "unable to carry out a calculation for \"var2\" (A description), cannot access to optiondescription \"family\" because has property \"disabled\" in \"/home/gnunux/git/stove/rougail-tests/structures/24_family_disabled_var_hidden/rougail/00-base.yml\", it will be ignored when loading from the YAML file \"tests/results/24_family_disabled_var_hidden/file/all.yml\"", + "family \"family\" has property disabled, so cannot access to \"var1\" (A description), it will be ignored when loading from the YAML file \"tests/results/24_family_disabled_var_hidden/file/all.yml\"", + "rougail.family.var1", + null + ] + ], + [ + [ + "family \"family\" has property disabled, so cannot access to \"var2\" (A description), it will be ignored when loading from the YAML file \"tests/results/24_family_disabled_var_hidden/file/all.yml\"", "rougail.family.var2", null ] diff --git a/tests/results/24_family_disabled_var_hidden/errors/mandatories.json b/tests/results/24_family_disabled_var_hidden/errors/mandatories.json index 09fae50..8ffc4c7 100644 --- a/tests/results/24_family_disabled_var_hidden/errors/mandatories.json +++ b/tests/results/24_family_disabled_var_hidden/errors/mandatories.json @@ -3,7 +3,7 @@ "warnings": [ [ [ - "unable to carry out a calculation for \"var2\" (A description), cannot access to optiondescription \"family\" because has property \"disabled\" in \"/home/gnunux/git/stove/rougail-tests/structures/24_family_disabled_var_hidden/rougail/00-base.yml\", it will be ignored when loading from the YAML file \"tests/results/24_family_disabled_var_hidden/file/mandatories.yml\"", + "family \"family\" has property disabled, so cannot access to \"var2\" (A description), it will be ignored when loading from the YAML file \"tests/results/24_family_disabled_var_hidden/file/mandatories.yml\"", "rougail.family.var2", null ] diff --git a/tests/results/44_0leadership_hidden/errors/all.json b/tests/results/44_0leadership_hidden/errors/all.json index 6fafbfa..44c3420 100644 --- a/tests/results/44_0leadership_hidden/errors/all.json +++ b/tests/results/44_0leadership_hidden/errors/all.json @@ -3,7 +3,7 @@ "warnings": [ [ [ - "cannot modify the option \"leader\" (a leader) because is frozen, it will be ignored when loading from the YAML file \"tests/results/44_0leadership_hidden/file/all.yml\"", + "family \"leader\" (a leadership) has property hidden, so cannot access to \"leader\" (a leader), it will be ignored when loading from the YAML file \"tests/results/44_0leadership_hidden/file/all.yml\"", "rougail.leader.leader", null ] diff --git a/tests/results/44_0leadership_leader_hidden/errors/all.json b/tests/results/44_0leadership_leader_hidden/errors/all.json index abb28b1..4d7fb4c 100644 --- a/tests/results/44_0leadership_leader_hidden/errors/all.json +++ b/tests/results/44_0leadership_leader_hidden/errors/all.json @@ -3,7 +3,7 @@ "warnings": [ [ [ - "cannot modify the option \"leader\" (a leader) because is frozen, it will be ignored when loading from the YAML file \"tests/results/44_0leadership_leader_hidden/file/all.yml\"", + "family \"leader\" (a leadership) has property hidden, so cannot access to \"leader\" (a leader), it will be ignored when loading from the YAML file \"tests/results/44_0leadership_leader_hidden/file/all.yml\"", "rougail.leader.leader", null ] diff --git a/tests/results/44_1leadership_append_hidden_follower/errors/all.json b/tests/results/44_1leadership_append_hidden_follower/errors/all.json index cd700c7..1d48cdb 100644 --- a/tests/results/44_1leadership_append_hidden_follower/errors/all.json +++ b/tests/results/44_1leadership_append_hidden_follower/errors/all.json @@ -3,7 +3,7 @@ "warnings": [ [ [ - "cannot modify the option \"leader\" (a leader) because is frozen, it will be ignored when loading from the YAML file \"tests/results/44_1leadership_append_hidden_follower/file/all.yml\"", + "family \"leader\" (a leadership) has property hidden, so cannot access to \"leader\" (a leader), it will be ignored when loading from the YAML file \"tests/results/44_1leadership_append_hidden_follower/file/all.yml\"", "rougail.leader.leader", null ] diff --git a/tests/results/60_0family_hidden/errors/all.json b/tests/results/60_0family_hidden/errors/all.json index 37da9fd..c398473 100644 --- a/tests/results/60_0family_hidden/errors/all.json +++ b/tests/results/60_0family_hidden/errors/all.json @@ -3,7 +3,7 @@ "warnings": [ [ [ - "cannot modify the option \"var\" (a variable) because is frozen, it will be ignored when loading from the YAML file \"tests/results/60_0family_hidden/file/all.yml\"", + "family \"family\" (a family) has property hidden, so cannot access to \"var\" (a variable), it will be ignored when loading from the YAML file \"tests/results/60_0family_hidden/file/all.yml\"", "rougail.family.var", null ] diff --git a/tests/results/60_5family_dynamic_calc_identifier/errors/all.json b/tests/results/60_5family_dynamic_calc_identifier/errors/all.json index 217db0a..0bbe95e 100644 --- a/tests/results/60_5family_dynamic_calc_identifier/errors/all.json +++ b/tests/results/60_5family_dynamic_calc_identifier/errors/all.json @@ -1,4 +1,12 @@ { "errors": [], - "warnings": [] + "warnings": [ + [ + [ + "variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_identifier/file/all.yml\"", + "rougail.var2", + null + ] + ] + ] } \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_identifier/makedict/all.json b/tests/results/60_5family_dynamic_calc_identifier/makedict/all.json index e824d22..d7c953a 100644 --- a/tests/results/60_5family_dynamic_calc_identifier/makedict/all.json +++ b/tests/results/60_5family_dynamic_calc_identifier/makedict/all.json @@ -3,7 +3,7 @@ "val1", "val2" ], - "rougail.var2": "string1", + "rougail.var2": "val1", "rougail.dynval1.var": "string1", "rougail.dynval2.var": "string1", "rougail.var3": "string1" diff --git a/tests/results/60_5family_dynamic_calc_identifier_multi/errors/all.json b/tests/results/60_5family_dynamic_calc_identifier_multi/errors/all.json index 217db0a..c95b8d5 100644 --- a/tests/results/60_5family_dynamic_calc_identifier_multi/errors/all.json +++ b/tests/results/60_5family_dynamic_calc_identifier_multi/errors/all.json @@ -1,4 +1,12 @@ { "errors": [], - "warnings": [] + "warnings": [ + [ + [ + "variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_identifier_multi/file/all.yml\"", + "rougail.var2", + null + ] + ] + ] } \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_identifier_multi/makedict/all.json b/tests/results/60_5family_dynamic_calc_identifier_multi/makedict/all.json index 891d87a..fb09f0f 100644 --- a/tests/results/60_5family_dynamic_calc_identifier_multi/makedict/all.json +++ b/tests/results/60_5family_dynamic_calc_identifier_multi/makedict/all.json @@ -3,7 +3,7 @@ "val1", "val2" ], - "rougail.var2": "string1", + "rougail.var2": "val1", "rougail.dynval1.var": [ "string1", "string2", diff --git a/tests/results/60_5family_dynamic_hidden_suffix/errors/all.json b/tests/results/60_5family_dynamic_hidden_suffix/errors/all.json index 1569048..bc3d729 100644 --- a/tests/results/60_5family_dynamic_hidden_suffix/errors/all.json +++ b/tests/results/60_5family_dynamic_hidden_suffix/errors/all.json @@ -3,14 +3,14 @@ "warnings": [ [ [ - "cannot modify the option \"var\" (a variable) because is frozen, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_hidden_suffix/file/all.yml\"", + "family \"dynval2\" (a dynamic family) has property hidden, so cannot access to \"var\" (a variable), it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_hidden_suffix/file/all.yml\"", "rougail.dynval2.var", null ] ], [ [ - "cannot modify the option \"var\" (a new variable) because is frozen, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_hidden_suffix/file/all.yml\"", + "family \"dynval2\" (a dynamic family) has property hidden, so cannot access to \"var\" (a new variable), it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_hidden_suffix/file/all.yml\"", "rougail.dynval2.family.var", null ]