Compare commits
2 commits
f9c73783c5
...
349e30fc10
| Author | SHA1 | Date | |
|---|---|---|---|
| 349e30fc10 | |||
| 7027aaefd4 |
8 changed files with 27 additions and 13 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
## 1.2.0a58 (2026-01-16)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- secret with follower
|
||||||
|
|
||||||
## 1.2.0a57 (2026-01-16)
|
## 1.2.0a57 (2026-01-16)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[project]
|
[project]
|
||||||
name = "rougail"
|
name = "rougail"
|
||||||
version = "1.2.0a57"
|
version = "1.2.0a58"
|
||||||
|
|
||||||
[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.0a57"
|
version = "1.2.0a58"
|
||||||
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.0a57"
|
version = "1.2.0a58"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
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"
|
||||||
classifiers = [
|
classifiers = [
|
||||||
|
|
@ -18,7 +18,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.0a57",
|
"rougail-base == 1.2.0a58",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.flit.sdist]
|
[tool.flit.sdist]
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "1.2.0a57"
|
__version__ = "1.2.0a58"
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,7 @@ class Annotator(Walk): # pylint: disable=R0903
|
||||||
if calculated_variable.multi is None:
|
if calculated_variable.multi is None:
|
||||||
if (
|
if (
|
||||||
isinstance(calculated_variable.default, VariableCalculation)
|
isinstance(calculated_variable.default, VariableCalculation)
|
||||||
and variable.path == calculated_variable.default.path
|
and variable.path == calculated_variable.default.variable
|
||||||
):
|
):
|
||||||
msg = _(
|
msg = _(
|
||||||
'the "{0}" default value is a calculation with itself'
|
'the "{0}" default value is a calculation with itself'
|
||||||
|
|
|
||||||
|
|
@ -586,7 +586,6 @@ def _rougail_config(
|
||||||
|
|
||||||
tiram_obj = convert.save()
|
tiram_obj = convert.save()
|
||||||
optiondescription = {}
|
optiondescription = {}
|
||||||
print(tiram_obj)
|
|
||||||
exec(tiram_obj, {}, optiondescription) # pylint: disable=W0122
|
exec(tiram_obj, {}, optiondescription) # pylint: disable=W0122
|
||||||
return optiondescription["option_0"], extra_vars
|
return optiondescription["option_0"], extra_vars
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ class UserData:
|
||||||
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)
|
||||||
try:
|
try:
|
||||||
self.set_value(option, value, options)
|
self.set_value(option, value, options, index)
|
||||||
value_is_set = True
|
value_is_set = True
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
if path != option.path():
|
if path != option.path():
|
||||||
|
|
@ -398,19 +398,24 @@ class UserData:
|
||||||
path, option, self.values[path].get("options", {}), value
|
path, option, self.values[path].get("options", {}), value
|
||||||
)
|
)
|
||||||
if option.isfollower():
|
if option.isfollower():
|
||||||
indexes = range(len(value))
|
if not isinstance(value, tuple):
|
||||||
|
indexes = range(len(value))
|
||||||
|
else:
|
||||||
|
indexes = range(len(option.parent().leader().value.get()))
|
||||||
values = value
|
values = value
|
||||||
else:
|
else:
|
||||||
indexes = [None]
|
indexes = [None]
|
||||||
for index in indexes:
|
for index in indexes:
|
||||||
try:
|
try:
|
||||||
if option.isfollower():
|
if option.isfollower():
|
||||||
value = values[index]
|
if not isinstance(value, tuple):
|
||||||
|
value = values[index]
|
||||||
if value is undefined or isinstance(value, CancelParam):
|
if value is undefined or isinstance(value, CancelParam):
|
||||||
continue
|
continue
|
||||||
option.index(index).value.set(value)
|
index_ = index
|
||||||
else:
|
else:
|
||||||
self.set_value(option, value, options.get("options", {}))
|
index_ = None
|
||||||
|
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":
|
||||||
properties = display_list(
|
properties = display_list(
|
||||||
|
|
@ -537,15 +542,19 @@ class UserData:
|
||||||
continue
|
continue
|
||||||
raise err from err
|
raise err from err
|
||||||
|
|
||||||
def set_value(self, option, value, options):
|
def set_value(self, option, value, options, index):
|
||||||
is_secret_manager = options.get("secret_manager", False)
|
is_secret_manager = options.get("secret_manager", False)
|
||||||
if is_secret_manager and isinstance(value, tuple):
|
if is_secret_manager and isinstance(value, tuple):
|
||||||
# it's a function
|
# it's a function
|
||||||
params = tuple([ParamValue(val) for val in value[1:]])
|
params = tuple([ParamValue(val) for val in value[1:]])
|
||||||
|
if index is not None:
|
||||||
|
option = option.forcepermissive.index(index)
|
||||||
value = Calculation(value[0], Params(params, kwargs={"option": ParamValue(option)}))
|
value = Calculation(value[0], Params(params, kwargs={"option": ParamValue(option)}))
|
||||||
option = option.forcepermissive
|
option = option.forcepermissive
|
||||||
add_validation = True
|
add_validation = True
|
||||||
else:
|
else:
|
||||||
|
if index is not None:
|
||||||
|
option = option.index(index)
|
||||||
add_validation = False
|
add_validation = False
|
||||||
option.value.set(value)
|
option.value.set(value)
|
||||||
if add_validation:
|
if add_validation:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue