Compare commits

..

No commits in common. "9b202495f858131c3178a0c75f80b354aa1d2643" and "963e82b434fb54008f4690c2d72816a5f0a11ac4" have entirely different histories.

6 changed files with 10 additions and 20 deletions

View file

@ -1,9 +1,3 @@
## 0.2.0a38 (2026-01-01)
### Fix
- more than two layers
## 0.2.0a37 (2025-12-30) ## 0.2.0a37 (2025-12-30)
### Fix ### Fix

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project] [project]
name = "rougail.cli" name = "rougail.cli"
version = "0.2.0a38" version = "0.2.0a37"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}] authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md" readme = "README.md"
description = "CLI for Rougail" description = "CLI for Rougail"

View file

@ -213,7 +213,7 @@ def load_user_data(rougailconfig):
subconfig.information.set("description_type", rougailconfig["cli.description_type"]) subconfig.information.set("description_type", rougailconfig["cli.description_type"])
metaconfig = subconfig metaconfig = subconfig
if last_layers: if last_layers:
for layer in reversed(layers[:-1]): for layer in layers[:-1]:
layer_name = "_".join(layer) layer_name = "_".join(layer)
metaconfig = MetaConfig([metaconfig], name=layer_name) metaconfig = MetaConfig([metaconfig], name=layer_name)
metaconfig.owner.set(metaconfig.path()) metaconfig.owner.set(metaconfig.path())
@ -225,8 +225,10 @@ def load_user_data(rougailconfig):
for idx, layer in enumerate(layers): for idx, layer in enumerate(layers):
if idx: if idx:
subconfig = subconfig.config("_".join(layer)) subconfig = subconfig.config("_".join(layer))
subconfig.owner.set(subconfig.path())
layer_name = subconfig.path() layer_name = subconfig.path()
subconfig.owner.set(subconfig.path())
else:
layer_name = None
# data user # data user
user_data = [] user_data = []
if has_layers: if has_layers:

View file

@ -1 +1 @@
__version__ = "0.2.0a38" __version__ = "0.2.0a37"

View file

@ -1,13 +1,7 @@
╭────────────── Caption ───────────────╮ ╭────────────── Caption ───────────────╮
│ Variable Default value │ Variable Modified value
│ (⏳ Original default value) │ │ (⏳ Original default value) │
╰──────────────────────────────────────╯ ╰──────────────────────────────────────╯
╭─────────── Layers ────────────╮
│ environment variable │
│ the YAML file "yaml/file.yml" │
│ Bitwarden │
╰───────────────────────────────╯
Variables: Variables:
┗━━ 📓 a description: a yaml value (⏳ a yaml value ◀ loaded from the YAML file ┗━━ 📓 a description: a yaml value ◀ loaded from the YAML file "yaml/file.yml"
 "yaml/file.yml" ⏳ my env value ◀ loaded from environment variable ⏳  (⏳ my env value ◀ loaded from environment variable ⏳ my_value)
 my_value)

View file

@ -116,7 +116,7 @@ def test_cli_user_datas_user_datas_layers():
save = os.environ.copy() save = os.environ.copy()
os.environ["ROUGAIL_MY_VARIABLE"] = "my env value" os.environ["ROUGAIL_MY_VARIABLE"] = "my env value"
with chdir(test_dir / 'cli'): with chdir(test_dir / 'cli'):
ret = main(['--main_structural_directories', 'structures', '--cli.layers', '--step.user_data', 'environment', 'yaml', 'bitwarden', '--yaml.filename', 'yaml/file.yml', '--bitwarden.mock_enable'], do_not_print=True) ret = main(['--main_structural_directories', 'structures', '--cli.layers', '--step.user_data', 'environment', 'yaml', '--yaml.filename', 'yaml/file.yml'], do_not_print=True)
filename = Path('result_user_datas_layers.txt') filename = Path('result_user_datas_layers.txt')
if not filename.is_file(): if not filename.is_file():
with filename.open('w') as fh: with filename.open('w') as fh: