Compare commits

..

No commits in common. "7efcca3fb8215acf1281d6d06ed1021c531ff74a884200c3d8c33595e75c7862" and "9f01a4ce15aff7b334e80542ce7ad3c0989ed643d66d60da1883ff47a1fd8d07" have entirely different histories.

74 changed files with 155 additions and 405 deletions

View file

@ -1,9 +1,3 @@
## 0.1.0a4 (2025-12-30)
### Fix
- update tests
## 0.1.0a3 (2025-11-21)
### Fix

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project]
name = "rougail.user_data_commandline"
version = "0.1.0a4"
version = "0.1.0a3"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md"
description = "Rougail user_data Bitwarden"

View file

@ -1,2 +1,2 @@
__version__ = "0.1.0a4"
__version__ = "0.1.0a3"

View file

@ -1,11 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"leadership\" has property hidden, so cannot access to \"var1\" (a first variable), it will be ignored when loading from Commandline"
],
[
"variable \"var2\" (a first variable) at index \"0\" is hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.leadership.var1 string1 string2 string3 --rougail.leadership.var2 (0, 'string1') --rougail.leadership.var2 0 string1"
],
"warnings": []
}

View file

@ -4,11 +4,12 @@
"string2",
"string3",
"--rougail.leadership.var2",
"0",
"string1",
"(0, 'string1')",
"",
"",
"--rougail.leadership.var2",
"0",
"string1",
"--rougail.var2",
"string1"
]
]

View file

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

View file

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

View file

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

View file

@ -1,10 +0,0 @@
[
"--rougail.var1",
"string1",
"string2",
"string3",
"--rougail.var2",
"string1",
"string2",
"string3"
]

View file

@ -1,12 +0,0 @@
{
"rougail.var1": [
"string1",
"string2",
"string3"
],
"rougail.var2": [
"string1",
"string2",
"string3"
]
}

View file

@ -1,11 +0,0 @@
{
"rougail.var1": [
"val1",
"val2",
"val3"
],
"rougail.var2": [
"val4",
"val5"
]
}

View file

@ -1,8 +1,8 @@
{
"errors": [],
"errors": [
"unrecognized arguments: --rougail.var yes"
],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
"variable \"rougail.var\" (autosave variable) is hidden, it will be ignored when loading from Commandline"
]
}

View file

@ -1,4 +1,6 @@
{
"errors": [],
"warnings": []
"warnings": [
"variable \"rougail.var\" (autosave variable) is hidden, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.var2\" (a second variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.var2\" (a second variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,11 +1,8 @@
{
"errors": [],
"errors": [
"unrecognized arguments: --rougail.var1 string1"
],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
],
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.var2\" (a second variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.var2\" (a second variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.var1 string1"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.var2 string1"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.var3\" (a third variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,11 +1,8 @@
{
"errors": [],
"errors": [
"unrecognized arguments: --rougail.var2 string1"
],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
],
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.var3\" (a third variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable2\" (a seconde variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable2\" (a seconde variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.var1 string1"
],
"warnings": []
}

View file

@ -1,14 +1,9 @@
{
"errors": [],
"errors": [
"unrecognized arguments: --rougail.var2 string1"
],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
],
[
"variable has property hidden, it will be ignored when loading from Commandline"
],
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
"variable \"rougail.var3\" (a second variable) is hidden, it will be ignored when loading from Commandline",
"variable \"rougail.var4\" (a forth variable) is hidden, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.condition"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.condition\" (a condition) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,11 +1,8 @@
{
"errors": [],
"errors": [
"unrecognized arguments: --rougail.condition"
],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
],
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.condition\" (a condition) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,11 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
],
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.var1 string1 --rougail.var2 string1"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"family\" has property disabled, so cannot access to \"var1\", it will be ignored when loading from Commandline"
]
"family \"rougail.family\" is disabled, \"rougail.family.var1\" will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"family\" has property disabled, so cannot access to \"var1\", it will be ignored when loading from Commandline"
]
"family \"rougail.family\" is disabled, \"rougail.family.var1\" will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"family\" has property disabled, so cannot access to \"var1\", it will be ignored when loading from Commandline"
]
"family \"rougail.family\" is disabled, \"rougail.family.var1\" will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"family\" has property disabled, so cannot access to \"var1\", it will be ignored when loading from Commandline"
]
"family \"rougail.family\" is disabled, \"rougail.family.var1\" will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.var1 string1"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.variable string1"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"leader\" (a leadership) has property hidden, so cannot access to \"leader\" (a leader), it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.leader.leader string1 string2 string3"
],
"warnings": []
}

View file

@ -1,23 +1,6 @@
{
"errors": [],
"warnings": [
[
"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 Commandline"
],
[
"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 Commandline"
],
[
"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 Commandline"
],
[
"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 Commandline"
],
[
"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 Commandline"
],
[
"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 Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.my_family.type.my_variable string1 --rougail.my_family.description.my_variable string1 --rougail.my_family.help.my_variable string1 --rougail.my_family.mode.my_variable string1 --rougail.my_family.hidden.my_variable string1 --rougail.my_family.disabled.my_variable string1"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"family\" (possibly hidden family) has property hidden, so cannot access to \"var1\" (a variable), it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.family.subfamily.var1 string1"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.family.variable string1"
],
"warnings": []
}

View file

@ -1,11 +1,8 @@
{
"errors": [],
"errors": [
"unrecognized arguments: --rougail.family.var2 string1"
],
"warnings": [
[
"family \"family\" has property disabled, so cannot access to \"var1\" (A description), it will be ignored when loading from Commandline"
],
[
"family \"family\" has property disabled, so cannot access to \"var2\" (A description), it will be ignored when loading from Commandline"
]
"family \"rougail.family\" is disabled, \"rougail.family.var1\" (A description) will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"family\" has property disabled, so cannot access to \"var2\" (A description), it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.family.var2 string1"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"leader\" (a leadership) has property hidden, so cannot access to \"leader\" (a leader), it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.leader.leader string1 string2 string3"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"leader\" (a leadership) has property hidden, so cannot access to \"leader\" (a leader), it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.leader.leader string1 string2 string3"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"leader\" (a leadership) has property hidden, so cannot access to \"leader\" (a leader), it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.leader.leader string1 string2 string3"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable \"follower\" (a follower) at index \"0\" is disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.leadership.follower\" (a follower) at index \"0\" is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,14 +1,8 @@
{
"errors": [],
"warnings": [
[
"variable \"follower\" (a follower) at index \"0\" is disabled, it will be ignored when loading from Commandline"
],
[
"variable \"follower\" (a follower) at index \"1\" is disabled, it will be ignored when loading from Commandline"
],
[
"variable \"follower\" (a follower) at index \"2\" is disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.leader.follower\" (a follower) at index \"0\" is disabled, it will be ignored when loading from Commandline",
"variable \"rougail.leader.follower\" (a follower) at index \"1\" is disabled, it will be ignored when loading from Commandline",
"variable \"rougail.leader.follower\" (a follower) at index \"2\" is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.var val1 val2"
],
"warnings": []
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"family\" (a family) has property hidden, so cannot access to \"var\" (a variable), it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.family.var string1"
],
"warnings": []
}

View file

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

View file

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

View file

@ -1,12 +0,0 @@
[
"--rougail.dynval1.var",
"string1",
"--rougail.dynval2.var",
"string1",
"--rougail.var1",
"string1",
"--rougail.var2",
"string1",
"string2",
"string3"
]

View file

@ -1,8 +0,0 @@
[
"--rougail.dynval1.var",
"string1",
"--rougail.dynval2.var",
"string1",
"--rougail.var1",
"string1"
]

View file

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

View file

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

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.dynval1.var\" (A dynamic variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,8 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.dynval1.var\" (A dynamic variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,11 +1,7 @@
{
"errors": [],
"warnings": [
[
"variable has property disabled, it will be ignored when loading from Commandline"
],
[
"variable has property disabled, it will be ignored when loading from Commandline"
]
"variable \"rougail.dynval1.var\" (A dynamic variable) is disabled, it will be ignored when loading from Commandline",
"variable \"rougail.dynval2.var\" (A dynamic variable) is disabled, it will be ignored when loading from Commandline"
]
}

View file

@ -1,11 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
],
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.dynval1.var string1 --rougail.dynval2.var string1"
],
"warnings": []
}

View file

@ -1,11 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
],
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.dynval1.var --rougail.dynval2.var"
],
"warnings": []
}

View file

@ -1,11 +1,6 @@
{
"errors": [],
"warnings": [
[
"variable has property hidden, it will be ignored when loading from Commandline"
],
[
"variable has property hidden, it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.dynval1.var string1 string2 string3 --rougail.dynval2.var string1 string2 string3"
],
"warnings": []
}

View file

@ -1,11 +1,6 @@
{
"errors": [],
"warnings": [
[
"family \"dynval2\" (a dynamic family) has property hidden, so cannot access to \"var\" (a variable), it will be ignored when loading from Commandline"
],
[
"family \"dynval2\" (a dynamic family) has property hidden, so cannot access to \"var\" (a new variable), it will be ignored when loading from Commandline"
]
]
"errors": [
"unrecognized arguments: --rougail.dynval2.var string1 --rougail.dynval2.family.var string1"
],
"warnings": []
}

View file

@ -61,11 +61,7 @@ def _test_structural_files(test_dir, namespace, ext, *, level, need_exclude=Fals
##################################
# loads variables in the tiramisu config
generated_user_data = RougailUserData(config, rougailconfig=rougailconfig, arguments=arguments, prog="test_load").run()
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] = list(d)
errors = rougail.user_datas(generated_user_data)
#expected output
expected_filename = Path('tests') / 'results' / dir_name / test_dir.name / 'makedict' / f'{level}.json'
with expected_filename.open() as json_file:
@ -144,7 +140,7 @@ def values_to_commandline(values):
# it's a leader
leader_values.append(sub_val)
if isinstance(sub_val, list) or (isinstance(sub_val, tuple) and isinstance(sub_val[1], list)):
raise SubMulti("submulti is not allowed for environment user_data")
raise SubMulti("submulti is not allowed for environment user_datas")
if leader_values:
yield "--" + (sub_root_path + '.' + k)
for val in value: