Compare commits
No commits in common. "25b7d09f82a1e7da1540b2b2d0c6b34902f56341a6391c379fb3449531349485" and "2bc6664c832aa621c2da61f3558243e0a217c5efcca27315e2bd616245106759" have entirely different histories.
25b7d09f82
...
2bc6664c83
5 changed files with 12 additions and 12 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -1,13 +1,3 @@
|
||||||
## 0.1.0a1 (2025-10-10)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add tests
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- remove print
|
|
||||||
|
|
||||||
## 0.1.0a0 (2025-10-06)
|
## 0.1.0a0 (2025-10-06)
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail.user_data_commandline"
|
name = "rougail.user_data_commandline"
|
||||||
version = "0.1.0a1"
|
version = "0.1.0a0"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "Rougail user_data Bitwarden"
|
description = "Rougail user_data Bitwarden"
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
__version__ = "0.1.0a1"
|
__version__ = "0.1.0a0"
|
||||||
|
|
||||||
|
|
|
||||||
BIN
tests/__pycache__/test_load.cpython-313-pytest-8.3.4.pyc
Normal file
BIN
tests/__pycache__/test_load.cpython-313-pytest-8.3.4.pyc
Normal file
Binary file not shown.
|
|
@ -58,9 +58,11 @@ def _test_structural_files(test_dir, namespace, ext, *, level, need_exclude=Fals
|
||||||
return
|
return
|
||||||
with filename.open() as file_content:
|
with filename.open() as file_content:
|
||||||
arguments = load(file_content)
|
arguments = load(file_content)
|
||||||
|
print('arguments', arguments, type(arguments))
|
||||||
##################################
|
##################################
|
||||||
# loads variables in the tiramisu config
|
# loads variables in the tiramisu config
|
||||||
generated_user_data = RougailUserData(config, rougailconfig=rougailconfig, arguments=arguments, prog="test_load").run()
|
generated_user_data = RougailUserData(config, rougailconfig=rougailconfig, arguments=arguments, prog="test_load").run()
|
||||||
|
print(generated_user_data)
|
||||||
errors = rougail.user_datas(generated_user_data)
|
errors = rougail.user_datas(generated_user_data)
|
||||||
#expected output
|
#expected output
|
||||||
expected_filename = Path('tests') / 'results' / dir_name / test_dir.name / 'makedict' / f'{level}.json'
|
expected_filename = Path('tests') / 'results' / dir_name / test_dir.name / 'makedict' / f'{level}.json'
|
||||||
|
|
@ -92,10 +94,16 @@ def populate(filename, makedict_file, rougailconfig, level, need_exclude, namesp
|
||||||
return
|
return
|
||||||
config = Rougail(rougailconfig).run()
|
config = Rougail(rougailconfig).run()
|
||||||
values = get_values_for_config(config, not need_exclude, level, follower_with_index=True)
|
values = get_values_for_config(config, not need_exclude, level, follower_with_index=True)
|
||||||
|
print(filename)
|
||||||
if not filename.is_file():
|
if not filename.is_file():
|
||||||
filename.parent.mkdir(parents=True, exist_ok=True)
|
filename.parent.mkdir(parents=True, exist_ok=True)
|
||||||
##############################################
|
##############################################
|
||||||
v = values_to_commandline(values)
|
v = values_to_commandline(values)
|
||||||
|
print('========================')
|
||||||
|
print('========================')
|
||||||
|
print('========================')
|
||||||
|
print(v)
|
||||||
|
print('========================')
|
||||||
##############################################
|
##############################################
|
||||||
with filename.open('w') as fh:
|
with filename.open('w') as fh:
|
||||||
##############################################
|
##############################################
|
||||||
|
|
@ -116,6 +124,7 @@ class SubMulti(Exception):
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
def values_to_commandline(values):
|
def values_to_commandline(values):
|
||||||
|
print(values)
|
||||||
def parse(root_path, values_, level=-1):
|
def parse(root_path, values_, level=-1):
|
||||||
level += 1
|
level += 1
|
||||||
for key, value in values_.items():
|
for key, value in values_.items():
|
||||||
|
|
@ -126,6 +135,7 @@ def values_to_commandline(values):
|
||||||
if isinstance(value, dict):
|
if isinstance(value, dict):
|
||||||
yield from parse(sub_root_path, value, level)
|
yield from parse(sub_root_path, value, level)
|
||||||
elif isinstance(value, list):
|
elif isinstance(value, list):
|
||||||
|
print("+++++++++++++++++++++", sub_root_path, value)
|
||||||
if value and isinstance(value[0], dict):
|
if value and isinstance(value[0], dict):
|
||||||
keys = []
|
keys = []
|
||||||
for ls in value:
|
for ls in value:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue