Compare commits

...

2 commits

Author SHA1 Message Date
9b202495f8 bump: version 0.2.0a37 → 0.2.0a38 2026-01-01 09:30:41 +01:00
d156d7afc5 fix: more than two layers 2026-01-01 09:30:34 +01:00
6 changed files with 20 additions and 10 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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