bump: version 1.2.0a68 → 1.2.0a69
This commit is contained in:
parent
29697ec122
commit
0ba63e1e12
8 changed files with 46 additions and 7 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
## 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.0a68"
|
version = "1.2.0a69"
|
||||||
|
|
||||||
[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.0a68"
|
version = "1.2.0a69"
|
||||||
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.0a68"
|
version = "1.2.0a69"
|
||||||
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.0a68",
|
"rougail-base == 1.2.0a69",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.flit.sdist]
|
[tool.flit.sdist]
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "1.2.0a68"
|
__version__ = "1.2.0a69"
|
||||||
|
|
|
||||||
|
|
@ -234,6 +234,16 @@ 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__(
|
||||||
|
|
|
||||||
|
|
@ -269,6 +269,8 @@ 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
|
||||||
|
|
@ -417,6 +419,8 @@ 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":
|
||||||
|
|
@ -561,6 +565,14 @@ 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")
|
||||||
|
|
@ -635,12 +647,19 @@ 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:
|
else:
|
||||||
|
msg = _('mandatory variable at index "{0}" but has no value').format(index)
|
||||||
|
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,3 +135,7 @@ 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