Compare commits
No commits in common. "0ba63e1e128fb1fd4ad66d26a06eea4e2d6d104b" and "74d6ca83785fb51c718fffd2c6a0b1d3f16bc8c2" have entirely different histories.
0ba63e1e12
...
74d6ca8378
9 changed files with 10 additions and 49 deletions
|
|
@ -1,9 +1,3 @@
|
||||||
## 1.2.0a69 (2026-03-13)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- do not update name
|
|
||||||
|
|
||||||
## 1.2.0a68 (2026-03-09)
|
## 1.2.0a68 (2026-03-09)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[project]
|
[project]
|
||||||
name = "rougail"
|
name = "rougail"
|
||||||
version = "1.2.0a69"
|
version = "1.2.0a68"
|
||||||
|
|
||||||
[tool.commitizen]
|
[tool.commitizen]
|
||||||
name = "cz_conventional_commits"
|
name = "cz_conventional_commits"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail-base"
|
name = "rougail-base"
|
||||||
version = "1.2.0a69"
|
version = "1.2.0a68"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "A consistency handling system that was initially designed in the configuration management"
|
description = "A consistency handling system that was initially designed in the configuration management"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail"
|
name = "rougail"
|
||||||
version = "1.2.0a69"
|
version = "1.2.0a68"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "A consistency handling system that was initially designed in the configuration management"
|
description = "A consistency handling system that was initially designed in the configuration management"
|
||||||
|
|
@ -27,7 +27,7 @@ classifiers = [
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ruamel.yaml ~= 0.18.6",
|
"ruamel.yaml ~= 0.18.6",
|
||||||
"pydantic ~= 2.9.2",
|
"pydantic ~= 2.9.2",
|
||||||
"rougail-base == 1.2.0a69",
|
"rougail-base == 1.2.0a68",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.flit.sdist]
|
[tool.flit.sdist]
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "1.2.0a69"
|
__version__ = "1.2.0a68"
|
||||||
|
|
|
||||||
|
|
@ -234,16 +234,6 @@ class RConfigLeadership:
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return dict(zip(self.leader, self.followers))
|
return dict(zip(self.leader, self.followers))
|
||||||
|
|
||||||
def set_follower(self, key, idx, value):
|
|
||||||
self.config.property.read_write()
|
|
||||||
self.option.option(key, idx).value.set(value)
|
|
||||||
self.config.property.read_only()
|
|
||||||
|
|
||||||
def reset(self):
|
|
||||||
self.config.property.read_write()
|
|
||||||
names = self.option.option("names").value.reset()
|
|
||||||
self.config.property.read_only()
|
|
||||||
|
|
||||||
|
|
||||||
class StaticRougailConvert(RougailConvert):
|
class StaticRougailConvert(RougailConvert):
|
||||||
def __init__(
|
def __init__(
|
||||||
|
|
|
||||||
|
|
@ -278,7 +278,7 @@ class ParserVariable:
|
||||||
return "family"
|
return "family"
|
||||||
if obj_type in self.variable_types or obj_type in self.custom_variable_types:
|
if obj_type in self.variable_types or obj_type in self.custom_variable_types:
|
||||||
return "variable"
|
return "variable"
|
||||||
msg = _('unknown type "{0}" for "{1}"').format(obj_type, path)
|
msg = _("unknown type {0} for {1}").format(obj_type, path)
|
||||||
raise DictConsistencyError(msg, 43, sources)
|
raise DictConsistencyError(msg, 43, sources)
|
||||||
# in a leadership there is only variable
|
# in a leadership there is only variable
|
||||||
if family_is_leadership:
|
if family_is_leadership:
|
||||||
|
|
@ -452,7 +452,7 @@ class ParserVariable:
|
||||||
# convert to Calculation objects
|
# convert to Calculation objects
|
||||||
self.parse_parameters(
|
self.parse_parameters(
|
||||||
path,
|
path,
|
||||||
family_obj,
|
obj,
|
||||||
sources,
|
sources,
|
||||||
family_is_dynamic,
|
family_is_dynamic,
|
||||||
typ="family",
|
typ="family",
|
||||||
|
|
@ -460,7 +460,7 @@ class ParserVariable:
|
||||||
if self.load_unexist_redefine or exists in [None, True]:
|
if self.load_unexist_redefine or exists in [None, True]:
|
||||||
self.paths.add(
|
self.paths.add(
|
||||||
path,
|
path,
|
||||||
self.paths[path].model_copy(update=family_obj),
|
self.paths[path].model_copy(update=obj),
|
||||||
family_is_dynamic,
|
family_is_dynamic,
|
||||||
parent_dynamic,
|
parent_dynamic,
|
||||||
force=True,
|
force=True,
|
||||||
|
|
|
||||||
|
|
@ -269,8 +269,6 @@ class UserData:
|
||||||
if len_leader:
|
if len_leader:
|
||||||
for idx in range(len_leader - 1, -1, -1):
|
for idx in range(len_leader - 1, -1, -1):
|
||||||
option.value.pop(idx)
|
option.value.pop(idx)
|
||||||
if value is undefined:
|
|
||||||
continue
|
|
||||||
try:
|
try:
|
||||||
self.set_value(option, value, options, index)
|
self.set_value(option, value, options, index)
|
||||||
value_is_set = True
|
value_is_set = True
|
||||||
|
|
@ -419,8 +417,6 @@ class UserData:
|
||||||
index_ = index
|
index_ = index
|
||||||
else:
|
else:
|
||||||
index_ = None
|
index_ = None
|
||||||
if value is undefined:
|
|
||||||
continue
|
|
||||||
self.set_value(option, value, options.get("options", {}), index_)
|
self.set_value(option, value, options.get("options", {}), index_)
|
||||||
except PropertiesOptionError as err:
|
except PropertiesOptionError as err:
|
||||||
if err.code == "property-error":
|
if err.code == "property-error":
|
||||||
|
|
@ -565,14 +561,6 @@ class UserData:
|
||||||
if index is not None:
|
if index is not None:
|
||||||
option = option.index(index)
|
option = option.index(index)
|
||||||
add_validation = False
|
add_validation = False
|
||||||
if isinstance(value, list) and undefined in value:
|
|
||||||
val = []
|
|
||||||
for v in value:
|
|
||||||
if v is undefined:
|
|
||||||
val.append(None)
|
|
||||||
else:
|
|
||||||
val.append(v)
|
|
||||||
value = val
|
|
||||||
option.value.set(value)
|
option.value.set(value)
|
||||||
if add_validation:
|
if add_validation:
|
||||||
option.property.add("validator")
|
option.property.add("validator")
|
||||||
|
|
@ -647,19 +635,12 @@ def _populate_mandatory(option, errors: list) -> None:
|
||||||
try:
|
try:
|
||||||
option.value.get()
|
option.value.get()
|
||||||
except PropertiesOptionError as err:
|
except PropertiesOptionError as err:
|
||||||
index = err.subconfig.index
|
|
||||||
if "empty" in err.proptype:
|
if "empty" in err.proptype:
|
||||||
msg = _("null is not a valid value for a multi")
|
msg = _("null is not a valid value for a multi")
|
||||||
elif "mandatory" in err.proptype:
|
elif "mandatory" in err.proptype:
|
||||||
if index is None:
|
msg = _("mandatory variable but has no value")
|
||||||
msg = _("mandatory variable but has no value")
|
|
||||||
else:
|
|
||||||
msg = _('mandatory variable at index "{0}" but has no value').format(index)
|
|
||||||
else:
|
else:
|
||||||
if index is None:
|
msg = _("mandatory variable but is inaccessible and has no value or has null in value")
|
||||||
msg = _("mandatory variable but is inaccessible and has no value or has null in value")
|
|
||||||
else:
|
|
||||||
msg = _('mandatory variable at index "{0}" but is inaccessible and has no value or has null in value').format(index)
|
|
||||||
else:
|
else:
|
||||||
proptype = option.value.mandatory(return_type=True)
|
proptype = option.value.mandatory(return_type=True)
|
||||||
if proptype == "empty":
|
if proptype == "empty":
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,3 @@ def test_type_error_version():
|
||||||
with raises(DictConsistencyError) as err:
|
with raises(DictConsistencyError) as err:
|
||||||
type_variable("error_version")
|
type_variable("error_version")
|
||||||
assert err.errno == 27
|
assert err.errno == 27
|
||||||
|
|
||||||
|
|
||||||
def test_type_family_name_description():
|
|
||||||
type_variable("family_name_description")
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue