Compare commits

...

2 commits

Author SHA1 Message Date
d7fccac742 fix: doc 2025-12-29 12:15:56 +01:00
7fadb7f473 fix: update tests 2025-12-29 11:56:56 +01:00
98 changed files with 935 additions and 154 deletions

20
README.fr.md Normal file
View file

@ -0,0 +1,20 @@
---
gitea: none
include_toc: true
---
[🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md)
## Charger les données utilisateur à partir d'un fichier YAML
> [!NOTE]
>
> **Chemin** : yaml\
> *`désactivé`*\
> **Désactivé** : si "[Charger les données utilisateur à partir d'un fichier YAML](#yaml)" n'est pas défini dans "[Sélection pour données utilisateur](#step.user_data)"
| Variable | Description | Valeur par défaut | Type | Validateur |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|--------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="yaml.filename" name="yaml.filename">yaml.filename</a>**<br/>**Ligne de commande** : <br/>-yf, --yaml.filename<br/>**Variable d'environnement** : YAML.FILENAME | Noms de fichier ou répertoire où sont enregistré les données utilisateur.<br/>Si un répertoire est défini, tous les fichiers avec l&#x27;extension &quot;yml&quot; ou &quot;yaml&quot; seront chargés dans l&#x27;ordre alphanumérique. | | [`UNIX filename`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` `obligatoire` | `unique`<br/>&nbsp;le nom de fichier peut être une chemin relatif<br/>&nbsp;le fichier doit exister<br/>&nbsp;type de fichier autorisé: "fichier" et "répertoire". |
| **<a id="yaml.file_with_secrets" name="yaml.file_with_secrets">yaml.file_with_secrets</a>**<br/>**Ligne de commande** : <br/>--yaml.file_with_secrets<br/>**Variable d'environnement** : YAML.FILE_WITH_SECRETS | Le fichier peut contenir des secrets.<br/>Par défaut, tous les fichiers peuvent contenir des secrets. Il peut être intéressant de définir plus précisément quels fichiers peuvent contenir ces secrets. | all | [`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | **Choix** : <br/>&nbsp;all<br/>&nbsp;first<br/>&nbsp;last<br/>&nbsp;none |

View file

@ -1,2 +1,20 @@
# rougail-user-data-yaml ---
gitea: none
include_toc: true
---
[🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md)
## Charge user data from YAML file
> [!NOTE]
>
> **Path**: yaml\
> *`disabled`*\
> **Disabled**: if yaml is not set in "[Select for user datas](#step.user_data)"
| Variable | Description | Default value | Type | Validator |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="yaml.filename" name="yaml.filename">yaml.filename</a>**<br/>**Command line**: <br/>-yf, --yaml.filename<br/>**Environment variable**: YAML.FILENAME | File or directory names where user data are stored.<br/>If a directory is set, all files with &quot;yml&quot; ou &quot;yaml&quot; extension will be load with alphanum order. | | [`UNIX filename`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` `mandatory` | `unique`<br/>&nbsp;this filename could be a relative path<br/>&nbsp;this file must exist<br/>&nbsp;file type allowed: "directory" and "file". |
| **<a id="yaml.file_with_secrets" name="yaml.file_with_secrets">yaml.file_with_secrets</a>**<br/>**Command line**: <br/>--yaml.file_with_secrets<br/>**Environment variable**: YAML.FILE_WITH_SECRETS | File that may contain secrets.<br/>By default, all files can contain secrets. It might be useful to define more precisely which files can contain these secrets. | all | [`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | **Choices**: <br/>&nbsp;all<br/>&nbsp;first<br/>&nbsp;last<br/>&nbsp;none |

View file

@ -5,8 +5,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"POT-Creation-Date: 2025-05-14 08:28+0200\n" "POT-Creation-Date: 2025-12-29 12:15+0100\n"
"PO-Revision-Date: 2025-05-14 08:29+0200\n" "PO-Revision-Date: 2025-12-29 12:15+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: fr\n" "Language: fr\n"
@ -14,13 +14,13 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 3.5\n" "X-Generator: Poedit 3.8\n"
#: src/rougail/user_data_yaml/__init__.py:46 #: src/rougail/user_data_yaml/__init__.py:46
msgid "yaml is not set in step.user_data" msgid "yaml is not set in step.user_data"
msgstr "\"yaml\" n'est pas défini dans step.user_data" msgstr "\"yaml\" n'est pas défini dans step.user_data"
#: src/rougail/user_data_yaml/__init__.py:72 #: src/rougail/user_data_yaml/__init__.py:74
msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\"" msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\""
msgstr "" msgstr ""
"ne peut charger \"{0}\", la valeur racine n'est pas une dictionnaire mais " "ne peut charger \"{0}\", la valeur racine n'est pas une dictionnaire mais "
@ -35,17 +35,41 @@ msgid "\"{0}\" in {1} has an unknown value"
msgstr "\"{0}\" dans {1} a une valeur inconnue" msgstr "\"{0}\" dans {1} a une valeur inconnue"
#: src/rougail/user_data_yaml/config.py:30 #: src/rougail/user_data_yaml/config.py:30
msgid "Configuration rougail-user-data-yaml" msgid "Charge user data from YAML file"
msgstr "Configuration de rougail-user-data-yaml" msgstr "Charger les données utilisateur à partir d'un fichier YAML"
#: src/rougail/user_data_yaml/config.py:35
msgid "if yaml is not set in \"step.user_data\""
msgstr "si \"yaml\" n'est pas défini dans \"step.user_data\""
#: src/rougail/user_data_yaml/config.py:38
msgid "File or directory names where user data are stored"
msgstr ""
"Noms de fichier ou répertoire où sont enregistré les données utilisateur"
#: src/rougail/user_data_yaml/config.py:39 #: src/rougail/user_data_yaml/config.py:39
msgid "File or directory name where user datas are stored" msgid ""
"If a directory is set, all files with \"yml\" ou \"yaml\" extension will be "
"load with alphanum order."
msgstr "" msgstr ""
"Nom du fichier ou répertoire où sont enregistré les données utilisateur" "Si un répertoire est défini, tous les fichiers avec l'extension \"yml\" ou "
"\"yaml\" seront chargés dans l'ordre alphanumérique."
#: src/rougail/user_data_yaml/config.py:48 #: src/rougail/user_data_yaml/config.py:48
msgid "File that may contain secrets" msgid "File that may contain secrets"
msgstr "Le fichier peut contenir des secrets" msgstr "Le fichier peut contenir des secrets"
#: src/rougail/user_data_yaml/config.py:49
msgid ""
"By default, all files can contain secrets. It might be useful to define more "
"precisely which files can contain these secrets."
msgstr ""
"Par défaut, tous les fichiers peuvent contenir des secrets. Il peut être "
"intéressant de définir plus précisément quels fichiers peuvent contenir ces "
"secrets."
#~ msgid "Configuration rougail-user-data-yaml"
#~ msgstr "Configuration de rougail-user-data-yaml"
#~ msgid "Filename" #~ msgid "Filename"
#~ msgstr "Nom du fichier" #~ msgstr "Nom du fichier"

View file

@ -5,7 +5,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-05-14 08:29+0200\n" "POT-Creation-Date: 2025-12-29 12:15+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -19,7 +19,7 @@ msgstr ""
msgid "yaml is not set in step.user_data" msgid "yaml is not set in step.user_data"
msgstr "" msgstr ""
#: src/rougail/user_data_yaml/__init__.py:72 #: src/rougail/user_data_yaml/__init__.py:74
msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\"" msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\""
msgstr "" msgstr ""
@ -32,14 +32,26 @@ msgid "\"{0}\" in {1} has an unknown value"
msgstr "" msgstr ""
#: src/rougail/user_data_yaml/config.py:30 #: src/rougail/user_data_yaml/config.py:30
msgid "Configuration rougail-user-data-yaml" msgid "Charge user data from YAML file"
msgstr ""
#: src/rougail/user_data_yaml/config.py:35
msgid "if yaml is not set in \"step.user_data\""
msgstr ""
#: src/rougail/user_data_yaml/config.py:38
msgid "File or directory names where user data are stored"
msgstr "" msgstr ""
#: src/rougail/user_data_yaml/config.py:39 #: src/rougail/user_data_yaml/config.py:39
msgid "File or directory name where user datas are stored" msgid "If a directory is set, all files with \"yml\" ou \"yaml\" extension will be load with alphanum order."
msgstr "" msgstr ""
#: src/rougail/user_data_yaml/config.py:48 #: src/rougail/user_data_yaml/config.py:48
msgid "File that may contain secrets" msgid "File that may contain secrets"
msgstr "" msgstr ""
#: src/rougail/user_data_yaml/config.py:49
msgid "By default, all files can contain secrets. It might be useful to define more precisely which files can contain these secrets."
msgstr ""

View file

@ -27,15 +27,16 @@ def get_rougail_config(
) -> dict: ) -> dict:
options = f""" options = f"""
yaml: yaml:
description: {_("Configuration rougail-user-data-yaml")} description: {_("Charge user data from YAML file")}
disabled: disabled:
jinja: | jinja: >-
{{% if step.user_data is propertyerror or 'yaml' not in step.user_data %}} {{{{ step.user_data is not propertyerror or 'yaml' not in step.user_data }}}}
disabled return_type: boolean
{{% endif %}} description: {_('if yaml is not set in "step.user_data"')}
filename: filename:
description: {_("File or directory name where user datas are stored")} description: {_("File or directory names where user data are stored")}
help: {_('If a directory is set, all files with "yml" ou "yaml" extension will be load with alphanum order.')}
alternative_name: yf alternative_name: yf
type: unix_filename type: unix_filename
multi: true multi: true
@ -45,6 +46,7 @@ yaml:
file_with_secrets: file_with_secrets:
description: {_("File that may contain secrets")} description: {_("File that may contain secrets")}
help: {_('By default, all files can contain secrets. It might be useful to define more precisely which files can contain these secrets.')}
default: all default: all
choices: choices:
- all - all

View file

@ -1,7 +1,19 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"family_disabled\" is disabled, \"family_disabled.variable1\" 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 \"family_disabled\" is disabled, \"family_disabled.variable2\" 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 \"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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"variable_disabled\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_disabled_variable.yaml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_disabled_variable.yaml\"",
"variable_disabled",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"the value \"test\" is an invalid integer for \"variable_int\", which is not an integer, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_wrong_type.yaml\"" [
[
"the value \"test\" is an invalid integer, it's not an integer, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_wrong_type.yaml\"",
"variable_int",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"family_disabled_hidden\" is disabled and hidden, \"family_disabled_hidden.variable1\" 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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"the value \"**********\" is an invalid password for \"secret\", at least 10 characters are required, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/04_value_secret.yaml\"" [
[
"the value \"**********\" is an invalid password, at least 10 characters are required, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/04_value_secret.yaml\"",
"secret",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"cannot set the value \"test\" to the family \"family\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/05_value_family.yaml\"" [
[
"is a family so we cannot set the value \"test\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/05_value_family.yaml\"",
"family",
null
]
]
] ]
} }

View file

@ -1,9 +1,33 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"leadership.follower_disabled\" at index \"0\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"", [
"variable \"leadership.follower_disabled\" at index \"1\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"", [
"variable \"leadership.follower_disabled\" at index \"2\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"", "variable \"follower_disabled\" at index \"0\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"",
"variable \"leadership.follower_disabled_at_index\" at index \"1\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"" "leadership.follower_disabled",
null
]
],
[
[
"variable \"follower_disabled\" at index \"1\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"",
"leadership.follower_disabled",
null
]
],
[
[
"variable \"follower_disabled\" at index \"2\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"",
"leadership.follower_disabled",
null
]
],
[
[
"variable \"follower_disabled_at_index\" at index \"1\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"",
"leadership.follower_disabled_at_index",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"the value \"oups\" is an invalid boolean for \"a_family.a_boolean\" (A boolean), invalid value, it will be ignored when loading from the YAML file \"tests/invalid/invalid/00.yml\"" [
[
"the value \"oups\" is an invalid boolean, invalid value, it will be ignored when loading from the YAML file \"tests/invalid/invalid/00.yml\"",
"a_family.a_boolean",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"cannot set the value \"oups\" to the family \"a_family\" (A family), it will be ignored when loading from the YAML file \"tests/invalid/invalid_family/00.yml\"" [
[
"is a family so we cannot set the value \"oups\", it will be ignored when loading from the YAML file \"tests/invalid/invalid_family/00.yml\"",
"a_family",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [ "errors": [
"cannot set the value \"oups\" to the family \"a_family\" (A family), it will be ignored when loading from the YAML file \"tests/invalid/invalid_family/00.yml\"" [
[
"is a family so we cannot set the value \"oups\", it has been loading from the YAML file \"tests/invalid/invalid_family/00.yml\"",
"a_family",
null
]
]
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [ "errors": [
"cannot set the value \"oups\" to the family \"a_family\" (A family), it will be ignored when loading from the YAML file \"tests/invalid/invalid_family/00.yml\"" [
[
"is a family so we cannot set the value \"oups\", it has been loading from the YAML file \"tests/invalid/invalid_family/00.yml\"",
"a_family",
null
]
]
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"cannot set the value \"oups\" to the family \"a_family\" (A family), it will be ignored when loading from the YAML file \"tests/invalid/invalid_family/00.yml\"" [
[
"is a family so we cannot set the value \"oups\", it will be ignored when loading from the YAML file \"tests/invalid/invalid_family/00.yml\"",
"a_family",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [ "errors": [
"the value \"oups\" is an invalid boolean for \"a_family.a_boolean\" (A boolean), invalid value, it will be ignored when loading from the YAML file \"tests/invalid/invalid/00.yml\"" [
[
"the value \"oups\" is an invalid boolean, invalid value, it has been loading from the YAML file \"tests/invalid/invalid/00.yml\"",
"a_family.a_boolean",
null
]
]
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [ "errors": [
"the value \"oups\" is an invalid boolean for \"a_family.a_boolean\" (A boolean), invalid value, it will be ignored when loading from the YAML file \"tests/invalid/invalid/00.yml\"" [
[
"the value \"oups\" is an invalid boolean, invalid value, it has been loading from the YAML file \"tests/invalid/invalid/00.yml\"",
"a_family.a_boolean",
null
]
]
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"the value \"1\" is an invalid string for \"a_leadership.a_follower\" (A follower) at index \"0\", which is not a string, it will be ignored when loading from the YAML file \"tests/invalid/invalid_leadership/00.yml\"" [
[
"the value \"1\" is an invalid string, it's not a string, it will be ignored when loading from the YAML file \"tests/invalid/invalid_leadership/00.yml\"",
"a_leadership.a_follower",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [ "errors": [
"the value \"1\" is an invalid string for \"a_leadership.a_follower\" (A follower) at index \"0\", which is not a string, it will be ignored when loading from the YAML file \"tests/invalid/invalid_leadership/00.yml\"" [
[
"the value \"1\" is an invalid string, it's not a string, it has been loading from the YAML file \"tests/invalid/invalid_leadership/00.yml\"",
"a_leadership.a_follower",
null
]
]
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [ "errors": [
"the value \"1\" is an invalid string for \"a_leadership.a_follower\" (A follower) at index \"0\", which is not a string, it will be ignored when loading from the YAML file \"tests/invalid/invalid_leadership/00.yml\"" [
[
"the value \"1\" is an invalid string, it's not a string, it has been loading from the YAML file \"tests/invalid/invalid_leadership/00.yml\"",
"a_leadership.a_follower",
null
]
]
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"the value \"1\" is an invalid string for \"a_leadership.a_follower\" (A follower) at index \"0\", which is not a string, it will be ignored when loading from the YAML file \"tests/invalid/invalid_leadership/00.yml\"" [
[
"the value \"1\" is an invalid string, it's not a string, it will be ignored when loading from the YAML file \"tests/invalid/invalid_leadership/00.yml\"",
"a_leadership.a_follower",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"the value \"oups\" is an invalid string for \"a_multi\" (A multi), which must be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi/00.yml\"" [
[
"the value \"oups\" is an invalid string, it must be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi/00.yml\"",
"a_multi",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"the value \"[True]\" is an invalid boolean for \"a_family.a_boolean\" (A boolean), which must not be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi2/00.yml\"" [
[
"the value \"[True]\" is an invalid boolean, it must not be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi2/00.yml\"",
"a_family.a_boolean",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [ "errors": [
"the value \"[True]\" is an invalid boolean for \"a_family.a_boolean\" (A boolean), which must not be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi2/00.yml\"" [
[
"the value \"[True]\" is an invalid boolean, it must not be a list, it has been loading from the YAML file \"tests/invalid/invalid_multi2/00.yml\"",
"a_family.a_boolean",
null
]
]
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [ "errors": [
"the value \"[True]\" is an invalid boolean for \"a_family.a_boolean\" (A boolean), which must not be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi2/00.yml\"" [
[
"the value \"[True]\" is an invalid boolean, it must not be a list, it has been loading from the YAML file \"tests/invalid/invalid_multi2/00.yml\"",
"a_family.a_boolean",
null
]
]
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"the value \"[True]\" is an invalid boolean for \"a_family.a_boolean\" (A boolean), which must not be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi2/00.yml\"" [
[
"the value \"[True]\" is an invalid boolean, it must not be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi2/00.yml\"",
"a_family.a_boolean",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [ "errors": [
"the value \"oups\" is an invalid string for \"a_multi\" (A multi), which must be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi/00.yml\"" [
[
"the value \"oups\" is an invalid string, it must be a list, it has been loading from the YAML file \"tests/invalid/invalid_multi/00.yml\"",
"a_multi",
null
]
]
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [ "errors": [
"the value \"oups\" is an invalid string for \"a_multi\" (A multi), which must be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi/00.yml\"" [
[
"the value \"oups\" is an invalid string, it must be a list, it has been loading from the YAML file \"tests/invalid/invalid_multi/00.yml\"",
"a_multi",
null
]
]
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"the value \"oups\" is an invalid string for \"a_multi\" (A multi), which must be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi/00.yml\"" [
[
"the value \"oups\" is an invalid string, it must be a list, it will be ignored when loading from the YAML file \"tests/invalid/invalid_multi/00.yml\"",
"a_multi",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"the value \"oups\" is an invalid boolean for \"a_family.a_boolean\" (A boolean), invalid value, it will be ignored when loading from the YAML file \"tests/invalid/invalid/00.yml\"" [
[
"the value \"oups\" is an invalid boolean, invalid value, it will be ignored when loading from the YAML file \"tests/invalid/invalid/00.yml\"",
"a_family.a_boolean",
null
]
]
] ]
} }

View file

@ -1,6 +1,6 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable or family \"an_unkown_family\" does not exist, it will be ignored when loading from the YAML file \"tests/invalid/unknown2/00.yml\"" "variable or family \"an_unkown_family\" does not exist, it has been loading from the YAML file \"tests/invalid/unknown2/00.yml\""
] ]
} }

View file

@ -1,6 +1,6 @@
{ {
"errors": [ "errors": [
"variable or family \"an_unkown_family\" does not exist, it will be ignored when loading from the YAML file \"tests/invalid/unknown2/00.yml\"" "variable or family \"an_unkown_family\" does not exist, it has been loading from the YAML file \"tests/invalid/unknown2/00.yml\""
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,6 +1,6 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable or family \"a_family.unknown\" does not exist, it will be ignored when loading from the YAML file \"tests/invalid/unknown/00.yml\"" "variable or family \"a_family.unknown\" does not exist, it has been loading from the YAML file \"tests/invalid/unknown/00.yml\""
] ]
} }

View file

@ -1,6 +1,6 @@
{ {
"errors": [ "errors": [
"variable or family \"a_family.unknown\" does not exist, it will be ignored when loading from the YAML file \"tests/invalid/unknown/00.yml\"" "variable or family \"a_family.unknown\" does not exist, it has been loading from the YAML file \"tests/invalid/unknown/00.yml\""
], ],
"warnings": [] "warnings": []
} }

View file

@ -1,9 +1,33 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.leadership\" is hidden, \"rougail.leadership.var1\" (a first variable) will be ignored when loading from the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"", [
"family \"rougail.leadership\" is hidden, \"rougail.leadership.var2\" (a first variable) at index \"0\" will be ignored when loading from the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"", [
"index \"1\" is greater than the leadership length \"1\" for option \"rougail.leadership.var2\" (a first variable) in 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\"",
"index \"2\" is greater than the leadership length \"1\" for option \"rougail.leadership.var2\" (a first variable) in the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"" "rougail.leadership.var1",
null
]
],
[
[
"variable \"var2\" (a first variable) at index \"0\" is hidden, it will be ignored when loading from the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"",
"rougail.leadership.var2",
null
]
],
[
[
"variable \"var2\" (a first variable) at index \"1\" is hidden, it will be ignored when loading from the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"",
"rougail.leadership.var2",
null
]
],
[
[
"variable \"var2\" (a first variable) at index \"2\" is hidden, it will be ignored when loading from the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"",
"rougail.leadership.var2",
null
]
]
] ]
} }

View file

@ -1,3 +1,3 @@
{ {
"rougail.variable": "string_1_True_None" "rougail.variable": "string_1_True_"
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var\" (autosave variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_1auto_save_and_hidden/file/all.yml\"" [
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_1auto_save_and_hidden/file/all.yml\"",
"rougail.var",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var2\" (a second variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden/file/mandatories.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden/file/mandatories.yml\"",
"rougail.var2",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var2\" (a second variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_2/file/mandatories.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_2/file/mandatories.yml\"",
"rougail.var2",
null
]
]
] ]
} }

View file

@ -1,7 +1,19 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var1\" (a first variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_3/file/all.yml\"", [
"variable \"rougail.var2\" (a second variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_3/file/all.yml\"" [
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_3/file/all.yml\"",
"rougail.var1",
null
]
],
[
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_3/file/all.yml\"",
"rougail.var2",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var2\" (a second variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_3/file/mandatories.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_3/file/mandatories.yml\"",
"rougail.var2",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var1\" (a first variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_4/file/all.yml\"" [
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_4/file/all.yml\"",
"rougail.var1",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var2\" (a second variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_5/file/all.yml\"" [
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_5/file/all.yml\"",
"rougail.var2",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var3\" (a third variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_5/file/mandatories.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_5/file/mandatories.yml\"",
"rougail.var3",
null
]
]
] ]
} }

View file

@ -1,7 +1,19 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var2\" (a second variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_6/file/all.yml\"", [
"variable \"rougail.var3\" (a third variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_6/file/all.yml\"" [
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_6/file/all.yml\"",
"rougail.var2",
null
]
],
[
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_6/file/all.yml\"",
"rougail.var3",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable2\" (a seconde variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_boolean/file/all.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_boolean/file/all.yml\"",
"rougail.variable2",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable2\" (a seconde variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_boolean/file/mandatories.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_boolean/file/mandatories.yml\"",
"rougail.variable2",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var1\" (a first variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_optional/file/all.yml\"" [
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_optional/file/all.yml\"",
"rougail.var1",
null
]
]
] ]
} }

View file

@ -1,8 +1,26 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var2\" (a first variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_optional_default/file/all.yml\"", [
"variable \"rougail.var3\" (a second variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_optional_default/file/all.yml\"", [
"variable \"rougail.var4\" (a forth variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_optional_default/file/all.yml\"" "variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_optional_default/file/all.yml\"",
"rougail.var2",
null
]
],
[
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_optional_default/file/all.yml\"",
"rougail.var3",
null
]
],
[
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_optional_default/file/all.yml\"",
"rougail.var4",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable/file/all.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable/file/all.yml\"",
"rougail.variable",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable10/file/all.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable10/file/all.yml\"",
"rougail.variable",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable10/file/mandatories.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable10/file/mandatories.yml\"",
"rougail.variable",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable2/file/all.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable2/file/all.yml\"",
"rougail.variable",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable2/file/mandatories.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable2/file/mandatories.yml\"",
"rougail.variable",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable3/file/mandatories.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable3/file/mandatories.yml\"",
"rougail.variable",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable4/file/all.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable4/file/all.yml\"",
"rougail.variable",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.condition\" (a condition) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable5/file/all.yml\"" [
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable5/file/all.yml\"",
"rougail.condition",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.condition\" (a condition) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable6/file/all.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable6/file/all.yml\"",
"rougail.condition",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable7/file/all.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable7/file/all.yml\"",
"rougail.variable",
null
]
]
] ]
} }

View file

@ -1,7 +1,19 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.condition\" (a condition) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable8/file/all.yml\"", [
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable8/file/all.yml\"" [
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable8/file/all.yml\"",
"rougail.condition",
null
]
],
[
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable8/file/all.yml\"",
"rougail.variable",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable8/file/mandatories.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable8/file/mandatories.yml\"",
"rougail.variable",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.condition\" (a condition) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable9/file/all.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable9/file/all.yml\"",
"rougail.condition",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable_multi/file/all.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable_multi/file/all.yml\"",
"rougail.variable",
null
]
]
] ]
} }

View file

@ -1,7 +1,19 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var1\" (a first variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_5hidden_calculation2/file/all.yml\"", [
"variable \"rougail.var2\" (a second variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_5hidden_calculation2/file/all.yml\"" [
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_5hidden_calculation2/file/all.yml\"",
"rougail.var1",
null
]
],
[
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/04_5hidden_calculation2/file/all.yml\"",
"rougail.var2",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.family\" is disabled, \"rougail.family.var1\" will be ignored when loading from the YAML file \"tests/results/16_2family_redefine_calculation/file/all.yml\"" [
[
"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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.family\" is disabled, \"rougail.family.var1\" will be ignored when loading from the YAML file \"tests/results/16_2family_redefine_calculation/file/mandatories.yml\"" [
[
"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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.family\" is disabled, \"rougail.family.var1\" will be ignored when loading from the YAML file \"tests/results/16_2family_redefine_disabled/file/all.yml\"" [
[
"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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.family\" is disabled, \"rougail.family.var1\" will be ignored when loading from the YAML file \"tests/results/16_2family_redefine_disabled/file/mandatories.yml\"" [
[
"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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var1\" (a first variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/16_5exists_redefine/file/all.yml\"" [
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/16_5exists_redefine/file/all.yml\"",
"rougail.var1",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.variable\" (a variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/16_5redefine_hidden/file/all.yml\"" [
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/16_5redefine_hidden/file/all.yml\"",
"rougail.variable",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.leader\" (a leadership) is hidden, \"rougail.leader.leader\" (a leader) 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
]
]
] ]
} }

View file

@ -1,11 +1,47 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.my_family\" (This is a great family) is disabled and hidden, \"rougail.my_family.type.my_variable\" will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", [
"family \"rougail.my_family\" (This is a great family) is disabled and hidden, \"rougail.my_family.description.my_variable\" will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", [
"family \"rougail.my_family\" (This is a great family) is disabled and hidden, \"rougail.my_family.help.my_variable\" 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\"",
"family \"rougail.my_family\" (This is a great family) is disabled and hidden, \"rougail.my_family.mode.my_variable\" will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", "rougail.my_family.type.my_variable",
"family \"rougail.my_family\" (This is a great family) is disabled and hidden, \"rougail.my_family.hidden.my_variable\" will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", null
"family \"rougail.my_family\" (This is a great family) is disabled and hidden, \"rougail.my_family.disabled.my_variable\" 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
]
],
[
[
"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
]
],
[
[
"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
]
],
[
[
"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
]
],
[
[
"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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.family\" (possibly hidden family) is hidden, \"rougail.family.subfamily.var1\" (a variable) 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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.family.variable\" (a variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/24_0family_hidden_condition_with_variable/file/all.yml\"" [
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/24_0family_hidden_condition_with_variable/file/all.yml\"",
"rougail.family.variable",
null
]
]
] ]
} }

View file

@ -1,7 +1,19 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.family\" is disabled, \"rougail.family.var1\" (A description) will be ignored when loading from the YAML file \"tests/results/24_family_disabled_var_hidden/file/all.yml\"", [
"family \"rougail.family\" is disabled, \"rougail.family.var2\" (A description) 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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.family\" is disabled, \"rougail.family.var2\" (A description) 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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.leader\" (a leadership) is hidden, \"rougail.leader.leader\" (a leader) 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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.leader\" (a leadership) is hidden, \"rougail.leader.leader\" (a leader) 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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.leader\" (a leadership) is hidden, \"rougail.leader.leader\" (a leader) 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
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.leadership.follower\" (a follower) at index \"0\" is disabled, it will be ignored when loading from the YAML file \"tests/results/44_4disabled_calcultion_follower_index/file/all.yml\"" [
[
"variable \"follower\" (a follower) at index \"0\" is disabled, it will be ignored when loading from the YAML file \"tests/results/44_4disabled_calcultion_follower_index/file/all.yml\"",
"rougail.leadership.follower",
null
]
]
] ]
} }

View file

@ -1,8 +1,26 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.leader.follower\" (a follower) at index \"0\" is disabled, it will be ignored when loading from the YAML file \"tests/results/44_6leadership_follower_disabled_calculation/file/mandatories.yml\"", [
"variable \"rougail.leader.follower\" (a follower) at index \"1\" is disabled, it will be ignored when loading from the YAML file \"tests/results/44_6leadership_follower_disabled_calculation/file/mandatories.yml\"", [
"variable \"rougail.leader.follower\" (a follower) at index \"2\" is disabled, it will be ignored when loading from the YAML file \"tests/results/44_6leadership_follower_disabled_calculation/file/mandatories.yml\"" "variable \"follower\" (a follower) at index \"0\" is disabled, it will be ignored when loading from the YAML file \"tests/results/44_6leadership_follower_disabled_calculation/file/mandatories.yml\"",
"rougail.leader.follower",
null
]
],
[
[
"variable \"follower\" (a follower) at index \"1\" is disabled, it will be ignored when loading from the YAML file \"tests/results/44_6leadership_follower_disabled_calculation/file/mandatories.yml\"",
"rougail.leader.follower",
null
]
],
[
[
"variable \"follower\" (a follower) at index \"2\" is disabled, it will be ignored when loading from the YAML file \"tests/results/44_6leadership_follower_disabled_calculation/file/mandatories.yml\"",
"rougail.leader.follower",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.var\" (A suffix variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_0family_dynamic_source_hidden/file/all.yml\"" [
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/60_0family_dynamic_source_hidden/file/all.yml\"",
"rougail.var",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.family\" (a family) is hidden, \"rougail.family.var\" (a variable) 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
]
]
] ]
} }

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,9 @@
{
"rougail.dynval1.var": "string1",
"rougail.dynval2.var": "string1",
"rougail.var1": "string1",
"rougail.var2": [
"string1",
"string1"
]
}

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.dynval1.var\" (A dynamic variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled/file/all.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled/file/all.yml\"",
"rougail.dynval1.var",
null
]
]
] ]
} }

View file

@ -1,6 +1,12 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.dynval1.var\" (A dynamic variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled/file/mandatories.yml\"" [
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled/file/mandatories.yml\"",
"rougail.dynval1.var",
null
]
]
] ]
} }

View file

@ -1,7 +1,19 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.dynval1.var\" (A dynamic variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled2/file/all.yml\"", [
"variable \"rougail.dynval2.var\" (A dynamic variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled2/file/all.yml\"" [
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled2/file/all.yml\"",
"rougail.dynval1.var",
null
]
],
[
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled2/file/all.yml\"",
"rougail.dynval2.var",
null
]
]
] ]
} }

View file

@ -1,7 +1,19 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.dynval1.var\" (A dynamic variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden/file/all.yml\"", [
"variable \"rougail.dynval2.var\" (A dynamic variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden/file/all.yml\"" [
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden/file/all.yml\"",
"rougail.dynval1.var",
null
]
],
[
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden/file/all.yml\"",
"rougail.dynval2.var",
null
]
]
] ]
} }

View file

@ -1,7 +1,19 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.dynval1.var\" (A dynamic variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all.yml\"", [
"variable \"rougail.dynval2.var\" (A dynamic variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all.yml\"" [
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all.yml\"",
"rougail.dynval1.var",
null
]
],
[
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all.yml\"",
"rougail.dynval2.var",
null
]
]
] ]
} }

View file

@ -1,7 +1,19 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.dynval1.var\" (A dynamic variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all.yml\"", [
"variable \"rougail.dynval2.var\" (A dynamic variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all.yml\"" [
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all.yml\"",
"rougail.dynval1.var",
null
]
],
[
[
"variable has property hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all.yml\"",
"rougail.dynval2.var",
null
]
]
] ]
} }

View file

@ -1,7 +1,19 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"family \"rougail.dynval2\" (a dynamic family) is hidden, \"rougail.dynval2.var\" (a variable) will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_hidden_suffix/file/all.yml\"", [
"family \"rougail.dynval2\" (a dynamic family) is hidden, \"rougail.dynval2.family.var\" (a new variable) 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
]
],
[
[
"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
]
]
] ]
} }

View file

@ -1,7 +1,19 @@
{ {
"errors": [], "errors": [],
"warnings": [ "warnings": [
"variable \"rougail.val1_dyn.var4\" (a variable 4) is disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_unknown_suffix/file/all.yml\"", [
"variable \"rougail.val2_dyn.var4\" (a variable 4) is disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_unknown_suffix/file/all.yml\"" [
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_unknown_suffix/file/all.yml\"",
"rougail.val1_dyn.var4",
null
]
],
[
[
"variable has property disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_unknown_suffix/file/all.yml\"",
"rougail.val2_dyn.var4",
null
]
]
] ]
} }

View file

@ -12,18 +12,22 @@ def _test_invalid_no_error(filename):
rougailconfig['yaml.filename'] = [f"tests/invalid/{filename}"] rougailconfig['yaml.filename'] = [f"tests/invalid/{filename}"]
rougail = Rougail(rougailconfig) rougail = Rougail(rougailconfig)
config = rougail.run() config = rougail.run()
for invalid_user_datas_error in [False, True]: for invalid_user_data_error in [False, True]:
if invalid_user_datas_error: if invalid_user_data_error:
ifilename = f"{filename}_invalid" ifilename = f"{filename}_invalid"
else: else:
ifilename = filename ifilename = filename
for unknown_user_datas_error in [False, True]: for unknown_user_data_error in [False, True]:
if unknown_user_datas_error: if unknown_user_data_error:
ufilename = f"{ifilename}_unknown" ufilename = f"{ifilename}_unknown"
else: else:
ufilename = ifilename ufilename = ifilename
generated_user_data = RougailUserDataYaml(config, rougailconfig=rougailconfig).run() generated_user_data = RougailUserDataYaml(config, rougailconfig=rougailconfig).run()
errors = rougail.user_datas(generated_user_data, invalid_user_datas_error=invalid_user_datas_error, unknown_user_datas_error=unknown_user_datas_error) errors = rougail.user_data(generated_user_data, invalid_user_data_error=invalid_user_data_error, unknown_user_data_error=unknown_user_data_error)
for l, data in errors.items():
for i, d in enumerate(data):
if isinstance(d, dict):
data[i] = [[l, v.path, v.index] for l, v in d.items()]
#expected output #expected output
expected_filename = Path('tests') / 'invalid' / 'results' / ufilename / "errors.json" expected_filename = Path('tests') / 'invalid' / 'results' / ufilename / "errors.json"
if not expected_filename.is_file(): if not expected_filename.is_file():

View file

@ -60,7 +60,11 @@ def _test_structural_files(test_dir, namespace, ext, *, level, need_exclude=Fals
################################## ##################################
# loads variables in the tiramisu config # loads variables in the tiramisu config
generated_user_data = RougailUserData(config, rougailconfig=rougailconfig).run() generated_user_data = RougailUserData(config, rougailconfig=rougailconfig).run()
errors = rougail.user_datas(generated_user_data) errors = rougail.user_data(generated_user_data)
for l, data in errors.items():
for i, d in enumerate(data):
if isinstance(d, dict):
data[i] = [[l, v.path, v.index] for l, v in d.items()]
#expected output #expected output
expected_filename = Path('tests') / 'results' / test_dir.name / 'makedict' / f'{level}.json' expected_filename = Path('tests') / 'results' / test_dir.name / 'makedict' / f'{level}.json'
with expected_filename.open() as json_file: with expected_filename.open() as json_file:
@ -130,7 +134,7 @@ def test_errors():
rougail = Rougail(rougailconfig) rougail = Rougail(rougailconfig)
config = rougail.run() config = rougail.run()
generated_user_data = RougailUserData(config, rougailconfig=rougailconfig).run() generated_user_data = RougailUserData(config, rougailconfig=rougailconfig).run()
errors = rougail.user_datas(generated_user_data) errors = rougail.user_data(generated_user_data)
assert errors == {'errors': [], 'warnings': [ assert errors == {'errors': [], 'warnings': [
'cannot load variable path "dynVal1.var", the identifier "Val1" is not ' 'cannot load variable path "dynVal1.var", the identifier "Val1" is not '
'valid in the YAML file ' 'valid in the YAML file '
@ -150,7 +154,7 @@ def test_errors_2():
rougail = Rougail(rougailconfig) rougail = Rougail(rougailconfig)
config = rougail.run() config = rougail.run()
generated_user_data = RougailUserData(config, rougailconfig=rougailconfig).run() generated_user_data = RougailUserData(config, rougailconfig=rougailconfig).run()
errors = rougail.user_datas(generated_user_data) errors = rougail.user_data(generated_user_data)
assert errors == {'errors': [], 'warnings': [ assert errors == {'errors': [], 'warnings': [
'cannot load variable path "dynVal1.var", the identifier "Val1" is not ' 'cannot load variable path "dynVal1.var", the identifier "Val1" is not '
'valid in the YAML file ' 'valid in the YAML file '
@ -182,7 +186,11 @@ def test_structural_files_error(test_file_error):
################################## ##################################
# loads variables in the tiramisu config # loads variables in the tiramisu config
generated_user_data = RougailUserData(config, rougailconfig=rougailconfig).run() generated_user_data = RougailUserData(config, rougailconfig=rougailconfig).run()
errors = rougail.user_datas(generated_user_data) errors = rougail.user_data(generated_user_data)
for l, data in errors.items():
for i, d in enumerate(data):
if isinstance(d, dict):
data[i] = [[l, v.path, v.index] for l, v in d.items()]
errors_file = test_file_error.parent.parent / "results" / test_file_error.name errors_file = test_file_error.parent.parent / "results" / test_file_error.name
if not errors_file.is_file(): if not errors_file.is_file():
errors_file.parent.mkdir(parents=True, exist_ok=True) errors_file.parent.mkdir(parents=True, exist_ok=True)
@ -204,7 +212,7 @@ def test_structural_files_directory():
################################## ##################################
# loads variables in the tiramisu config # loads variables in the tiramisu config
generated_user_data = RougailUserData(config, rougailconfig=rougailconfig).run() generated_user_data = RougailUserData(config, rougailconfig=rougailconfig).run()
rougail.user_datas(generated_user_data) rougail.user_data(generated_user_data)
config.property.read_only() config.property.read_only()
data = dict(config_to_dict(config.value.get())) data = dict(config_to_dict(config.value.get()))
data_file = test_dir / "result.txt" data_file = test_dir / "result.txt"
@ -225,7 +233,7 @@ def test_secret_all():
rougail = Rougail(rougailconfig) rougail = Rougail(rougailconfig)
config = rougail.run() config = rougail.run()
user_data = RougailUserData(config, rougailconfig=rougailconfig).run() user_data = RougailUserData(config, rougailconfig=rougailconfig).run()
errors = rougail.user_datas(user_data) errors = rougail.user_data(user_data)
assert errors == {'errors': [], 'warnings': []} assert errors == {'errors': [], 'warnings': []}
config_dict = dict(config_to_dict(config.value.get())) config_dict = dict(config_to_dict(config.value.get()))
assert config_dict == {'secret1': "my_password", 'secret2': 'value'} assert config_dict == {'secret1': "my_password", 'secret2': 'value'}
@ -240,8 +248,12 @@ def test_secret_none():
rougail = Rougail(rougailconfig) rougail = Rougail(rougailconfig)
config = rougail.run() config = rougail.run()
user_data = RougailUserData(config, rougailconfig=rougailconfig).run() user_data = RougailUserData(config, rougailconfig=rougailconfig).run()
errors = rougail.user_datas(user_data) errors = rougail.user_data(user_data)
assert errors == {'errors': ['the variable "secret1" contains secrets and should not be defined in the YAML file "tests/secrets/secret.yml"'], 'warnings': []} for l, data in errors.items():
for i, d in enumerate(data):
if isinstance(d, dict):
data[i] = [[l, v.path, v.index] for l, v in d.items()]
assert errors == {'errors': [[['the variable contains secrets and should not be defined in the YAML file "tests/secrets/secret.yml"', "secret1", None]]], 'warnings': []}
config_dict = dict(config_to_dict(config.value.get())) config_dict = dict(config_to_dict(config.value.get()))
assert config_dict == {'secret1': None, 'secret2': 'value'} assert config_dict == {'secret1': None, 'secret2': 'value'}
@ -255,7 +267,11 @@ def test_secret_first():
rougail = Rougail(rougailconfig) rougail = Rougail(rougailconfig)
config = rougail.run() config = rougail.run()
user_data = RougailUserData(config, rougailconfig=rougailconfig).run() user_data = RougailUserData(config, rougailconfig=rougailconfig).run()
errors = rougail.user_datas(user_data) errors = rougail.user_data(user_data)
for l, data in errors.items():
for i, d in enumerate(data):
if isinstance(d, dict):
data[i] = [[l, v.path, v.index] for l, v in d.items()]
assert errors == {'errors': [], 'warnings': []} assert errors == {'errors': [], 'warnings': []}
config_dict = dict(config_to_dict(config.value.get())) config_dict = dict(config_to_dict(config.value.get()))
assert config_dict == {'secret1': "my_password", 'secret2': 'value'} assert config_dict == {'secret1': "my_password", 'secret2': 'value'}
@ -270,8 +286,12 @@ def test_secret_first_error():
rougail = Rougail(rougailconfig) rougail = Rougail(rougailconfig)
config = rougail.run() config = rougail.run()
user_data = RougailUserData(config, rougailconfig=rougailconfig).run() user_data = RougailUserData(config, rougailconfig=rougailconfig).run()
errors = rougail.user_datas(user_data) errors = rougail.user_data(user_data)
assert errors == {'errors': ['the variable "secret1" contains secrets and should not be defined in the YAML file "tests/secrets/secret.yml"'], 'warnings': []} for l, data in errors.items():
for i, d in enumerate(data):
if isinstance(d, dict):
data[i] = [[l, v.path, v.index] for l, v in d.items()]
assert errors == {'errors': [[['the variable contains secrets and should not be defined in the YAML file "tests/secrets/secret.yml"', "secret1", None]]], 'warnings': []}
config_dict = dict(config_to_dict(config.value.get())) config_dict = dict(config_to_dict(config.value.get()))
assert config_dict == {'secret1': None, 'secret2': 'value'} assert config_dict == {'secret1': None, 'secret2': 'value'}
@ -285,7 +305,11 @@ def test_secret_last():
rougail = Rougail(rougailconfig) rougail = Rougail(rougailconfig)
config = rougail.run() config = rougail.run()
user_data = RougailUserData(config, rougailconfig=rougailconfig).run() user_data = RougailUserData(config, rougailconfig=rougailconfig).run()
errors = rougail.user_datas(user_data) errors = rougail.user_data(user_data)
for l, data in errors.items():
for i, d in enumerate(data):
if isinstance(d, dict):
data[i] = [[l, v.path, v.index] for l, v in d.items()]
assert errors == {'errors': [], 'warnings': []} assert errors == {'errors': [], 'warnings': []}
config_dict = dict(config_to_dict(config.value.get())) config_dict = dict(config_to_dict(config.value.get()))
assert config_dict == {'secret1': "my_password", 'secret2': 'value'} assert config_dict == {'secret1': "my_password", 'secret2': 'value'}
@ -300,7 +324,11 @@ def test_secret_last_error():
rougail = Rougail(rougailconfig) rougail = Rougail(rougailconfig)
config = rougail.run() config = rougail.run()
user_data = RougailUserData(config, rougailconfig=rougailconfig).run() user_data = RougailUserData(config, rougailconfig=rougailconfig).run()
errors = rougail.user_datas(user_data) errors = rougail.user_data(user_data)
assert errors == {'errors': ['the variable "secret1" contains secrets and should not be defined in the YAML file "tests/secrets/secret.yml"'], 'warnings': []} for l, data in errors.items():
for i, d in enumerate(data):
if isinstance(d, dict):
data[i] = [[l, v.path, v.index] for l, v in d.items()]
assert errors == {'errors': [[['the variable contains secrets and should not be defined in the YAML file "tests/secrets/secret.yml"', 'secret1', None]]], 'warnings': []}
config_dict = dict(config_to_dict(config.value.get())) config_dict = dict(config_to_dict(config.value.get()))
assert config_dict == {'secret1': None, 'secret2': 'value'} assert config_dict == {'secret1': None, 'secret2': 'value'}