fix: dependency

This commit is contained in:
egarette@silique.fr 2025-09-22 14:23:00 +02:00
parent dd5e725fde
commit 2f37aeac5b
22 changed files with 232 additions and 27 deletions

View file

@ -8,13 +8,10 @@ version = "0.2.0a8"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md"
description = "Rougail output json"
requires-python = ">=3.8"
requires-python = ">=3.10"
license = {file = "LICENSE"}
classifiers = [
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
@ -24,10 +21,10 @@ classifiers = [
"Operating System :: OS Independent",
"Natural Language :: English",
"Natural Language :: French",
]
dependencies = [
"rougail >= 1.1,<2",
"rougail-base >= 1.1,<2",
]
[project.urls]

View file

@ -0,0 +1,5 @@
{
"var1": "string1",
"var2": "string1",
"var3": "string1"
}

View file

@ -0,0 +1,15 @@
{
"leadership": [
{
"leader": "string1"
},
{
"leader": "string2",
"follower": "string2"
},
{
"leader": "string3",
"follower": "string3"
}
]
}

View file

@ -0,0 +1,5 @@
{
"var1": "string1",
"var2": "string1",
"var3": "string1"
}

View file

@ -0,0 +1,15 @@
{
"leadership": [
{
"leader": "string1"
},
{
"leader": "string2",
"follower": "string2"
},
{
"leader": "string3",
"follower": "string3"
}
]
}

View file

@ -0,0 +1,7 @@
{
"rougail": {
"var1": "string1",
"var2": "string1",
"var3": "string1"
}
}

View file

@ -0,0 +1,17 @@
{
"rougail": {
"leadership": [
{
"leader": "string1"
},
{
"leader": "string2",
"follower": "string2"
},
{
"leader": "string3",
"follower": "string3"
}
]
}
}

View file

@ -0,0 +1,7 @@
{
"rougail": {
"var1": "string1",
"var2": "string1",
"var3": "string1"
}
}

View file

@ -0,0 +1,17 @@
{
"rougail": {
"leadership": [
{
"leader": "string1"
},
{
"leader": "string2",
"follower": "string2"
},
{
"leader": "string3",
"follower": "string3"
}
]
}
}

View file

@ -0,0 +1,7 @@
{
"rougail": {
"var1": null,
"var2": null,
"var3": null
}
}

View file

@ -0,0 +1,13 @@
{
"rougail": {
"leadership": [
{
"leader": "a"
},
{
"leader": "b",
"follower": "value"
}
]
}
}

View file

@ -0,0 +1,7 @@
{
"rougail": {
"var1": "string1",
"var2": "string1",
"var3": "string1"
}
}

View file

@ -0,0 +1,17 @@
{
"rougail": {
"leadership": [
{
"leader": "string1"
},
{
"leader": "string2",
"follower": "string2"
},
{
"leader": "string3",
"follower": "string3"
}
]
}
}

View file

@ -0,0 +1,8 @@
{
"_errors": [
"The following variables are mandatory but have no value:",
" - rougail.var1 (a first variable)",
" - rougail.var2 (a second variable)",
" - rougail.var3 (a new variable)"
]
}

View file

@ -0,0 +1,13 @@
{
"rougail": {
"leadership": [
{
"leader": "a"
},
{
"leader": "b",
"follower": "value"
}
]
}
}

View file

@ -0,0 +1,5 @@
{
"var1": null,
"var2": null,
"var3": null
}

View file

@ -0,0 +1,11 @@
{
"leadership": [
{
"leader": "a"
},
{
"leader": "b",
"follower": "value"
}
]
}

View file

@ -0,0 +1,5 @@
{
"var1": "string1",
"var2": "string1",
"var3": "string1"
}

View file

@ -0,0 +1,15 @@
{
"leadership": [
{
"leader": "string1"
},
{
"leader": "string2",
"follower": "string2"
},
{
"leader": "string3",
"follower": "string3"
}
]
}

View file

@ -0,0 +1,8 @@
{
"_errors": [
"The following variables are mandatory but have no value:",
" - var1 (a first variable)",
" - var2 (a second variable)",
" - var3 (a new variable)"
]
}

View file

@ -0,0 +1,11 @@
{
"leadership": [
{
"leader": "a"
},
{
"leader": "b",
"follower": "value"
}
]
}

View file

@ -28,7 +28,7 @@ def test_dir(request):
return request.param
def _test_dictionaries(test_dir, namespace, ext, *, read_write=True, mandatory=False, do_calc=True):
def _test_structural_files(test_dir, namespace, ext, *, read_write=True, mandatory=False, do_calc=True):
rougailconfig = get_rougail_config(test_dir, namespace)
if not rougailconfig:
return
@ -68,42 +68,42 @@ def _test_dictionaries(test_dir, namespace, ext, *, read_write=True, mandatory=F
assert generated_output == attented_output, f'filename {output_file}'
def test_dictionaries_json(test_dir):
_test_dictionaries(test_dir, True, EXT)
def test_structural_files_json(test_dir):
_test_structural_files(test_dir, True, EXT)
def test_dictionaries_json_errors(test_dir):
_test_dictionaries(test_dir, True, EXT, do_calc=False, mandatory=True)
def test_structural_files_json_errors(test_dir):
_test_structural_files(test_dir, True, EXT, do_calc=False, mandatory=True)
def test_dictionaries_json_read_only(test_dir):
_test_dictionaries(test_dir, True, EXT, read_write=False)
def test_structural_files_json_read_only(test_dir):
_test_structural_files(test_dir, True, EXT, read_write=False)
def test_dictionaries_json_mandatory(test_dir):
_test_dictionaries(test_dir, True, EXT, mandatory=True)
def test_structural_files_json_mandatory(test_dir):
_test_structural_files(test_dir, True, EXT, mandatory=True)
def test_dictionaries_json_mandatory_read_only(test_dir):
_test_dictionaries(test_dir, True, EXT, read_write=False, mandatory=True)
def test_structural_files_json_mandatory_read_only(test_dir):
_test_structural_files(test_dir, True, EXT, read_write=False, mandatory=True)
#################
def test_dictionaries_json_namespace(test_dir):
_test_dictionaries(test_dir, False, EXT)
def test_structural_files_json_namespace(test_dir):
_test_structural_files(test_dir, False, EXT)
def test_dictionaries_json_namespace_errors(test_dir):
_test_dictionaries(test_dir, False, EXT, do_calc=False, mandatory=True)
def test_structural_files_json_namespace_errors(test_dir):
_test_structural_files(test_dir, False, EXT, do_calc=False, mandatory=True)
def test_dictionaries_json_namespace_read_only(test_dir):
_test_dictionaries(test_dir, False, EXT, read_write=False)
def test_structural_files_json_namespace_read_only(test_dir):
_test_structural_files(test_dir, False, EXT, read_write=False)
def test_dictionaries_json_namespace_mandatory(test_dir):
_test_dictionaries(test_dir, False, EXT, mandatory=True)
def test_structural_files_json_namespace_mandatory(test_dir):
_test_structural_files(test_dir, False, EXT, mandatory=True)
def test_dictionaries_json_namespace_mandatory_read_only(test_dir):
_test_dictionaries(test_dir, False, EXT, read_write=False, mandatory=True)
def test_structural_files_json_namespace_mandatory_read_only(test_dir):
_test_structural_files(test_dir, False, EXT, read_write=False, mandatory=True)