From 7d77da836a1b37d8efe0c52f659b6ce0832521be Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Tue, 22 Oct 2024 12:40:41 +0200 Subject: [PATCH] fix: update tests --- tests/dictionaries/00_0empty/tiramisu/base.py | 4 ++ .../dictionaries/00_0empty/tiramisu/multi.py | 4 ++ .../00_0version_underscore/tiramisu/base.py | 6 +- .../00_0version_underscore/tiramisu/multi.py | 8 ++- .../00_1empty_variable/tiramisu/base.py | 6 +- .../00_1empty_variable/tiramisu/multi.py | 8 ++- .../00_2default_calculated/tiramisu/base.py | 6 +- .../00_2default_calculated/tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../00_4load_subfolder/tiramisu/base.py | 6 +- .../00_4load_subfolder/tiramisu/multi.py | 8 ++- .../00_5load_notype/tiramisu/base.py | 6 +- .../00_5load_notype/tiramisu/multi.py | 8 ++- .../dictionaries/00_6boolean/tiramisu/base.py | 6 +- .../00_6boolean/tiramisu/multi.py | 8 ++- .../00_6boolean_no_mandatory/tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../dictionaries/00_6choice/tiramisu/base.py | 6 +- .../dictionaries/00_6choice/tiramisu/multi.py | 8 ++- .../00_6choice_calculation/tiramisu/base.py | 6 +- .../00_6choice_calculation/tiramisu/multi.py | 8 ++- .../00_6choice_variable/tiramisu/base.py | 6 +- .../00_6choice_variable/tiramisu/multi.py | 8 ++- .../dictionaries/00_6custom/tiramisu/base.py | 6 +- .../dictionaries/00_6custom/tiramisu/multi.py | 8 ++- .../00_6domainname/tiramisu/base.py | 6 +- .../00_6domainname/tiramisu/multi.py | 8 ++- .../00_6domainname_params/tiramisu/base.py | 6 +- .../00_6domainname_params/tiramisu/multi.py | 8 ++- tests/dictionaries/00_6float/tiramisu/base.py | 6 +- .../dictionaries/00_6float/tiramisu/multi.py | 8 ++- .../dictionaries/00_6number/tiramisu/base.py | 6 +- .../dictionaries/00_6number/tiramisu/multi.py | 8 ++- tests/dictionaries/00_6port/tiramisu/base.py | 6 +- tests/dictionaries/00_6port/tiramisu/multi.py | 8 ++- .../dictionaries/00_6regexp/tiramisu/base.py | 6 +- .../dictionaries/00_6regexp/tiramisu/multi.py | 8 ++- .../dictionaries/00_6string/tiramisu/base.py | 6 +- .../dictionaries/00_6string/tiramisu/multi.py | 8 ++- .../00_7choice_quote/tiramisu/base.py | 6 +- .../00_7choice_quote/tiramisu/multi.py | 8 ++- .../00_7help_quote/tiramisu/base.py | 6 +- .../00_7help_quote/tiramisu/multi.py | 8 ++- .../00_7value_doublequote/tiramisu/base.py | 6 +- .../00_7value_doublequote/tiramisu/multi.py | 8 ++- .../00_7value_doublequote2/tiramisu/base.py | 6 +- .../00_7value_doublequote2/tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 4 +- .../00_7value_doublequote3/tiramisu/base.py | 8 ++- .../00_7value_doublequote3/tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../00_7value_quote/tiramisu/base.py | 6 +- .../00_7value_quote/tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../00_8test/dictionaries/rougail/00-base.yml | 6 ++ .../00_8test/makedict/mandatory.json | 2 +- tests/dictionaries/00_8test/tiramisu/base.py | 8 ++- tests/dictionaries/00_8test/tiramisu/multi.py | 12 ++-- .../00_8test/tiramisu/no_namespace.py | 2 +- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../00_9choice_variables/tiramisu/base.py | 6 +- .../00_9choice_variables/tiramisu/multi.py | 8 ++- .../00_9default_calculation/tiramisu/base.py | 6 +- .../00_9default_calculation/tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../00_9default_integer/tiramisu/base.py | 6 +- .../00_9default_integer/tiramisu/multi.py | 8 ++- tests/dictionaries/00_9extra/tiramisu/base.py | 8 ++- .../dictionaries/00_9extra/tiramisu/multi.py | 12 ++-- .../00_9extra_calculation/tiramisu/base.py | 8 ++- .../00_9extra_calculation/tiramisu/multi.py | 12 ++-- .../01_6boolean_multi/tiramisu/base.py | 6 +- .../01_6boolean_multi/tiramisu/multi.py | 8 ++- .../01_6custom_multi/tiramisu/base.py | 6 +- .../01_6custom_multi/tiramisu/multi.py | 8 ++- .../01_6float_multi/tiramisu/base.py | 6 +- .../01_6float_multi/tiramisu/multi.py | 8 ++- .../01_6number_multi/tiramisu/base.py | 6 +- .../01_6number_multi/tiramisu/multi.py | 8 ++- .../01_6string_empty/tiramisu/base.py | 6 +- .../01_6string_empty/tiramisu/multi.py | 8 ++- .../01_6string_multi/tiramisu/base.py | 6 +- .../01_6string_multi/tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../01_7value_multi_quote/tiramisu/base.py | 6 +- .../01_7value_multi_quote/tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../04_0type_param/tiramisu/base.py | 6 +- .../04_0type_param/tiramisu/multi.py | 8 ++- .../04_1auto_save/tiramisu/base.py | 6 +- .../04_1auto_save/tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../04_1auto_save_and_hidden/tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../04_5disabled_calculation/tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 2 + .../makedict/mandatory.json | 2 +- .../tiramisu/base.py | 10 +++- .../tiramisu/multi.py | 20 ++++--- .../tiramisu/no_namespace.py | 4 +- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../04_5hidden_calculation/tiramisu/base.py | 6 +- .../04_5hidden_calculation/tiramisu/multi.py | 8 ++- .../04_5hidden_calculation2/tiramisu/base.py | 6 +- .../04_5hidden_calculation2/tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../04_5validators/tiramisu/base.py | 6 +- .../04_5validators/tiramisu/multi.py | 8 ++- .../04_5validators_differ/tiramisu/base.py | 6 +- .../04_5validators_differ/tiramisu/multi.py | 8 ++- .../04_5validators_multi/tiramisu/base.py | 6 +- .../04_5validators_multi/tiramisu/multi.py | 8 ++- .../04_5validators_multi2/tiramisu/base.py | 6 +- .../04_5validators_multi2/tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 2 +- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../05_0multi_not_uniq/tiramisu/base.py | 6 +- .../05_0multi_not_uniq/tiramisu/multi.py | 8 ++- .../05_0multi_uniq/tiramisu/base.py | 6 +- .../05_0multi_uniq/tiramisu/multi.py | 8 ++- .../12_1auto_save_expert/tiramisu/base.py | 6 +- .../12_1auto_save_expert/tiramisu/multi.py | 8 ++- .../16_0redefine_description/tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../16_5exists_nonexists/tiramisu/base.py | 6 +- .../16_5exists_nonexists/tiramisu/multi.py | 8 ++- .../16_5exists_redefine/tiramisu/base.py | 8 ++- .../16_5exists_redefine/tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../16_5redefine_calculation/tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../16_5redefine_choice/tiramisu/base.py | 6 +- .../16_5redefine_choice/tiramisu/multi.py | 8 ++- .../16_5redefine_default/tiramisu/base.py | 6 +- .../16_5redefine_default/tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../16_5redefine_family/tiramisu/base.py | 6 +- .../16_5redefine_family/tiramisu/multi.py | 8 ++- .../16_5redefine_help/tiramisu/base.py | 6 +- .../16_5redefine_help/tiramisu/multi.py | 8 ++- .../16_5redefine_hidden/tiramisu/base.py | 8 ++- .../16_5redefine_hidden/tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../16_5redefine_multi/tiramisu/base.py | 6 +- .../16_5redefine_multi/tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../16_5test_redefine/tiramisu/base.py | 6 +- .../16_5test_redefine/tiramisu/multi.py | 8 ++- .../16_6choice_redefine/tiramisu/base.py | 6 +- .../16_6choice_redefine/tiramisu/multi.py | 8 ++- .../16exists_exists/tiramisu/base.py | 6 +- .../16exists_exists/tiramisu/multi.py | 8 ++- .../makedict/mandatory.json | 2 +- .../17_5redefine_leadership/tiramisu/base.py | 12 ++-- .../17_5redefine_leadership/tiramisu/multi.py | 24 ++++---- .../tiramisu/no_namespace.py | 6 +- .../20_0empty_family/tiramisu/base.py | 6 +- .../20_0empty_family/tiramisu/multi.py | 4 ++ .../20_0family_append/tiramisu/base.py | 6 +- .../20_0family_append/tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 2 +- .../20_0family_underscore/tiramisu/base.py | 28 ++++++---- .../20_0family_underscore/tiramisu/multi.py | 56 ++++++++++--------- .../tiramisu/no_namespace.py | 22 ++++---- .../20_0multi_family/tiramisu/base.py | 6 +- .../20_0multi_family/tiramisu/multi.py | 8 ++- .../20_0multi_family_basic/tiramisu/base.py | 6 +- .../20_0multi_family_basic/tiramisu/multi.py | 8 ++- .../20_0multi_family_expert/tiramisu/base.py | 6 +- .../20_0multi_family_expert/tiramisu/multi.py | 8 ++- .../20_0multi_family_order/tiramisu/base.py | 6 +- .../20_0multi_family_order/tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 2 + .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../20_1empty_subfamily/tiramisu/base.py | 6 +- .../20_1empty_subfamily/tiramisu/multi.py | 4 ++ .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 4 +- .../makedict/mandatory.json | 2 +- .../tiramisu/base.py | 10 +++- .../tiramisu/multi.py | 20 ++++--- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 4 +- .../makedict/mandatory.json | 2 +- .../tiramisu/base.py | 12 ++-- .../tiramisu/multi.py | 24 ++++---- .../tiramisu/no_namespace.py | 6 +- .../dictionaries/rougail/00-base.yml | 1 + .../makedict/mandatory.json | 2 +- .../tiramisu/base.py | 10 +++- .../tiramisu/multi.py | 20 ++++--- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 12 ++++ .../makedict/after.json | 1 + .../makedict/base.json | 1 + .../makedict/before.json | 1 + .../makedict/mandatory.json | 1 + .../tiramisu/base.py | 17 ++++++ .../tiramisu/multi.py | 23 ++++++++ .../tiramisu/no_namespace.py | 12 ++++ .../dictionaries/rougail/00-base.yml | 4 +- .../40_0leadership/tiramisu/base.py | 6 +- .../40_0leadership/tiramisu/multi.py | 8 ++- .../40_0leadership_diff_name/tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../40_0leadership_empty/tiramisu/base.py | 6 +- .../40_0leadership_empty/tiramisu/multi.py | 4 ++ .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 4 ++ .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../40_8calculation_boolean/tiramisu/base.py | 6 +- .../40_8calculation_boolean/tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../40_8calculation_integer/tiramisu/base.py | 6 +- .../40_8calculation_integer/tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../41_0choice_leader/tiramisu/base.py | 6 +- .../41_0choice_leader/tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 5 +- .../makedict/mandatory.json | 2 +- .../44_0leadership_hidden/tiramisu/base.py | 12 ++-- .../44_0leadership_hidden/tiramisu/multi.py | 24 ++++---- .../tiramisu/no_namespace.py | 6 +- .../dictionaries/rougail/00-base.yml | 3 + .../makedict/mandatory.json | 2 +- .../tiramisu/base.py | 12 ++-- .../tiramisu/multi.py | 24 ++++---- .../tiramisu/no_namespace.py | 6 +- .../makedict/mandatory.json | 2 +- .../tiramisu/base.py | 16 ++++-- .../tiramisu/multi.py | 32 ++++++----- .../tiramisu/no_namespace.py | 10 ++-- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../44_4leadership_mandatory/tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 1 + .../makedict/mandatory.json | 2 +- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../dictionaries/rougail/00-base.yml | 4 +- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 2 +- .../60_0family_dynamic/tiramisu/base.py | 8 ++- .../60_0family_dynamic/tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../60_0family_dynamic_1_0/tiramisu/base.py | 8 ++- .../60_0family_dynamic_1_0/tiramisu/multi.py | 12 ++-- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../60_0family_dynamic_1_1/tiramisu/base.py | 8 ++- .../60_0family_dynamic_1_1/tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../dictionaries/rougail/00-base.yml | 2 +- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../dictionaries/rougail/00-base.yml | 2 +- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../dictionaries/rougail/00-base.yml | 2 +- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../dictionaries/rougail/00-base.yml | 4 +- .../tiramisu/base.py | 10 +++- .../tiramisu/multi.py | 16 ++++-- .../tiramisu/no_namespace.py | 4 +- .../60_0family_empty/tiramisu/base.py | 6 +- .../60_0family_empty/tiramisu/multi.py | 4 ++ .../60_0family_hidden/makedict/mandatory.json | 2 +- .../60_0family_hidden/tiramisu/base.py | 10 +++- .../60_0family_hidden/tiramisu/multi.py | 20 ++++--- .../tiramisu/no_namespace.py | 4 +- .../60_0family_mode/tiramisu/base.py | 6 +- .../60_0family_mode/tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 2 +- .../60_1family_dynamic_jinja/tiramisu/base.py | 10 +++- .../tiramisu/multi.py | 16 ++++-- .../tiramisu/no_namespace.py | 4 +- .../dictionaries/rougail/00-base.yml | 2 +- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../dictionaries/rougail/00-base.yml | 6 +- .../tiramisu/base.py | 12 ++-- .../tiramisu/multi.py | 20 ++++--- .../tiramisu/no_namespace.py | 6 +- .../dictionaries/rougail/00-base.yml | 2 +- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../dictionaries/rougail/00-base.yml | 2 +- .../60_5family_dynamic_calc2/tiramisu/base.py | 14 +++-- .../tiramisu/multi.py | 24 ++++---- .../dictionaries/rougail/00-base.yml | 2 +- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../dictionaries/rougail/00-base.yml | 4 +- .../tiramisu/base.py | 10 +++- .../tiramisu/multi.py | 16 ++++-- .../tiramisu/no_namespace.py | 4 +- .../dictionaries/rougail/00-base.yml | 4 +- .../tiramisu/base.py | 10 +++- .../tiramisu/multi.py | 16 ++++-- .../dictionaries/rougail/00-base.yml | 10 ++-- .../tiramisu/base.py | 14 +++-- .../tiramisu/multi.py | 24 ++++---- .../tiramisu/no_namespace.py | 8 +-- .../dictionaries/rougail/00-base.yml | 2 +- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../dictionaries/rougail/00-base.yml | 12 ++-- .../makedict/mandatory.json | 2 +- .../tiramisu/base.py | 20 ++++--- .../tiramisu/multi.py | 40 +++++++------ .../tiramisu/no_namespace.py | 14 ++--- .../dictionaries/rougail/00-base.yml | 23 ++++++-- .../tiramisu/base.py | 16 ++++-- .../tiramisu/multi.py | 28 ++++++---- .../dictionaries/rougail/00-base.yml | 6 +- .../tiramisu/base.py | 10 +++- .../tiramisu/multi.py | 16 ++++-- .../dictionaries/rougail/00-base.yml | 6 +- .../tiramisu/base.py | 10 +++- .../tiramisu/multi.py | 16 ++++-- .../dictionaries/rougail/00-base.yml | 8 +-- .../makedict/after.json | 32 +++++++++++ .../makedict/base.json | 14 +++++ .../makedict/before.json | 32 +++++++++++ .../makedict/mandatory.json | 1 + .../tiramisu/base.py | 14 +++-- .../tiramisu/multi.py | 24 ++++---- .../dictionaries/rougail/00-base.yml | 4 +- .../tiramisu/base.py | 10 +++- .../tiramisu/multi.py | 16 ++++-- .../tiramisu/no_namespace.py | 4 +- .../dictionaries/rougail/00-base.yml | 6 +- .../tiramisu/base.py | 10 +++- .../tiramisu/multi.py | 16 ++++-- .../dictionaries/rougail/00-base.yml | 2 +- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../dictionaries/rougail/00-base.yml | 32 +++++------ .../makedict/after.json | 16 +++--- .../makedict/base.json | 16 +++--- .../makedict/before.json | 16 +++--- .../tiramisu/base.py | 24 ++++---- .../tiramisu/multi.py | 44 ++++++++------- .../dictionaries/extra/00-base.yml | 2 +- .../60_9extra_dynamic/tiramisu/base.py | 10 +++- .../60_9extra_dynamic/tiramisu/multi.py | 16 ++++-- .../dictionaries/extra/00-base.yml | 2 +- .../60_9extra_dynamic_extra/tiramisu/base.py | 10 +++- .../60_9extra_dynamic_extra/tiramisu/multi.py | 16 ++++-- .../dictionaries/rougail/00-base.yml | 2 +- .../tiramisu/base.py | 8 ++- .../tiramisu/multi.py | 12 ++-- .../tiramisu/no_namespace.py | 2 +- .../tiramisu/base.py | 6 +- .../tiramisu/multi.py | 8 ++- .../dictionaries/rougail/00-base.yml | 2 +- .../dictionaries/rougail/00-base.yml | 2 +- .../dictionaries/rougail/00-base.yml | 2 +- .../dictionaries/rougail/00-base.yml | 2 +- tests/test_1_flattener.py | 2 +- tests/test_2_makedict.py | 12 ++-- 460 files changed, 2682 insertions(+), 1086 deletions(-) create mode 100644 tests/dictionaries/24_family_disabled_var_hidden/dictionaries/rougail/00-base.yml create mode 100644 tests/dictionaries/24_family_disabled_var_hidden/makedict/after.json create mode 100644 tests/dictionaries/24_family_disabled_var_hidden/makedict/base.json create mode 100644 tests/dictionaries/24_family_disabled_var_hidden/makedict/before.json create mode 100644 tests/dictionaries/24_family_disabled_var_hidden/makedict/mandatory.json create mode 100644 tests/dictionaries/24_family_disabled_var_hidden/tiramisu/base.py create mode 100644 tests/dictionaries/24_family_disabled_var_hidden/tiramisu/multi.py create mode 100644 tests/dictionaries/24_family_disabled_var_hidden/tiramisu/no_namespace.py create mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/after.json create mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/base.json create mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/before.json create mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/mandatory.json diff --git a/tests/dictionaries/00_0empty/tiramisu/base.py b/tests/dictionaries/00_0empty/tiramisu/base.py index 502023bc9..9caa6cdd8 100644 --- a/tests/dictionaries/00_0empty/tiramisu/base.py +++ b/tests/dictionaries/00_0empty/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") diff --git a/tests/dictionaries/00_0empty/tiramisu/multi.py b/tests/dictionaries/00_0empty/tiramisu/multi.py index a2108b17e..3960b199f 100644 --- a/tests/dictionaries/00_0empty/tiramisu/multi.py +++ b/tests/dictionaries/00_0empty/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") diff --git a/tests/dictionaries/00_0version_underscore/tiramisu/base.py b/tests/dictionaries/00_0version_underscore/tiramisu/base.py index 202819bb9..d367bc371 100644 --- a/tests/dictionaries/00_0version_underscore/tiramisu/base.py +++ b/tests/dictionaries/00_0version_underscore/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="version", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_0version_underscore/tiramisu/multi.py b/tests/dictionaries/00_0version_underscore/tiramisu/multi.py index fa45a6c30..ab3f567b0 100644 --- a/tests/dictionaries/00_0version_underscore/tiramisu/multi.py +++ b/tests/dictionaries/00_0version_underscore/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="version", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_6 = StrOption(name="version", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"basic"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_1empty_variable/tiramisu/base.py b/tests/dictionaries/00_1empty_variable/tiramisu/base.py index 940fce0fc..f6892c677 100644 --- a/tests/dictionaries/00_1empty_variable/tiramisu/base.py +++ b/tests/dictionaries/00_1empty_variable/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="empty", doc="empty", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_1empty_variable/tiramisu/multi.py b/tests/dictionaries/00_1empty_variable/tiramisu/multi.py index 8b2997730..32fc5ca8f 100644 --- a/tests/dictionaries/00_1empty_variable/tiramisu/multi.py +++ b/tests/dictionaries/00_1empty_variable/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="empty", doc="empty", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_6 = StrOption(name="empty", doc="empty", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"basic"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_2default_calculated/tiramisu/base.py b/tests/dictionaries/00_2default_calculated/tiramisu/base.py index 53e38627d..8826b9142 100644 --- a/tests/dictionaries/00_2default_calculated/tiramisu/base.py +++ b/tests/dictionaries/00_2default_calculated/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.var2'] = "{{ _.var1 }}\n" option_2 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var2", doc="a second variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/00_2default_calculated/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2"), '_.var1': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_2default_calculated/tiramisu/multi.py b/tests/dictionaries/00_2default_calculated/tiramisu/multi.py index f441e3183..f03e51b3c 100644 --- a/tests/dictionaries/00_2default_calculated/tiramisu/multi.py +++ b/tests/dictionaries/00_2default_calculated/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,10 +14,10 @@ dict_env['default_1.rougail.var2'] = "{{ _.var1 }}\n" dict_env['default_2.rougail.var2'] = "{{ _.var1 }}\n" option_3 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a second variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/00_2default_calculated/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), '_.var1': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_7 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="var2", doc="a second variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/00_2default_calculated/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), '_.var1': ParamOption(option_7)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_2default_calculated_multi/tiramisu/base.py b/tests/dictionaries/00_2default_calculated_multi/tiramisu/base.py index 57f38c345..5070316d3 100644 --- a/tests/dictionaries/00_2default_calculated_multi/tiramisu/base.py +++ b/tests/dictionaries/00_2default_calculated_multi/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.var2'] = "{% for val in _.var1 %}\n{{ val }}\n{% endfor %}\n" option_2 = StrOption(name="var1", doc="a first variable", multi=True, default=["no", "yes", "maybe"], default_multi="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var2", doc="a second variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/00_2default_calculated_multi/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2"), '_.var1': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_2default_calculated_multi/tiramisu/multi.py b/tests/dictionaries/00_2default_calculated_multi/tiramisu/multi.py index 0ddf11841..5e74d2da2 100644 --- a/tests/dictionaries/00_2default_calculated_multi/tiramisu/multi.py +++ b/tests/dictionaries/00_2default_calculated_multi/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,10 +14,10 @@ dict_env['default_1.rougail.var2'] = "{% for val in _.var1 %}\n{{ val }}\n{% end dict_env['default_2.rougail.var2'] = "{% for val in _.var1 %}\n{{ val }}\n{% endfor %}\n" option_3 = StrOption(name="var1", doc="a first variable", multi=True, default=["no", "yes", "maybe"], default_multi="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a second variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/00_2default_calculated_multi/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), '_.var1': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_7 = StrOption(name="var1", doc="a first variable", multi=True, default=["no", "yes", "maybe"], default_multi="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="var2", doc="a second variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/00_2default_calculated_multi/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), '_.var1': ParamOption(option_7)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_2default_calculated_variable_transitive/tiramisu/base.py b/tests/dictionaries/00_2default_calculated_variable_transitive/tiramisu/base.py index ff4036d9a..03aacc03f 100644 --- a/tests/dictionaries/00_2default_calculated_variable_transitive/tiramisu/base.py +++ b/tests/dictionaries/00_2default_calculated_variable_transitive/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = DomainnameOption(name="var1", doc="a first variable", multi=True, type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'domainname'}) option_3 = DomainnameOption(name="var2", doc="a second variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_2)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'domainname'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_2default_calculated_variable_transitive/tiramisu/multi.py b/tests/dictionaries/00_2default_calculated_variable_transitive/tiramisu/multi.py index 669d1d409..1c4c887b6 100644 --- a/tests/dictionaries/00_2default_calculated_variable_transitive/tiramisu/multi.py +++ b/tests/dictionaries/00_2default_calculated_variable_transitive/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = DomainnameOption(name="var1", doc="a first variable", multi=True, type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'domainname'}) option_4 = DomainnameOption(name="var2", doc="a second variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_3)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'domainname'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = DomainnameOption(name="var1", doc="a first variable", multi=True, type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'domainname'}) option_8 = DomainnameOption(name="var2", doc="a second variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_7)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'domainname'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_4load_subfolder/tiramisu/base.py b/tests/dictionaries/00_4load_subfolder/tiramisu/base.py index 674a62205..535505d17 100644 --- a/tests/dictionaries/00_4load_subfolder/tiramisu/base.py +++ b/tests/dictionaries/00_4load_subfolder/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_3 = StrOption(name="var2", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_4load_subfolder/tiramisu/multi.py b/tests/dictionaries/00_4load_subfolder/tiramisu/multi.py index b012f389b..abd1b639e 100644 --- a/tests/dictionaries/00_4load_subfolder/tiramisu/multi.py +++ b/tests/dictionaries/00_4load_subfolder/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_8 = StrOption(name="var2", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_5load_notype/tiramisu/base.py b/tests/dictionaries/00_5load_notype/tiramisu/base.py index 3a1ddb8d1..349f4d499 100644 --- a/tests/dictionaries/00_5load_notype/tiramisu/base.py +++ b/tests/dictionaries/00_5load_notype/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="without_type", doc="a variable", default="non", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_5load_notype/tiramisu/multi.py b/tests/dictionaries/00_5load_notype/tiramisu/multi.py index 2c8b0af19..764572398 100644 --- a/tests/dictionaries/00_5load_notype/tiramisu/multi.py +++ b/tests/dictionaries/00_5load_notype/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="without_type", doc="a variable", default="non", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="without_type", doc="a variable", default="non", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_6boolean/tiramisu/base.py b/tests/dictionaries/00_6boolean/tiramisu/base.py index 542169595..a97296fc7 100644 --- a/tests/dictionaries/00_6boolean/tiramisu/base.py +++ b/tests/dictionaries/00_6boolean/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,5 +16,5 @@ option_4 = BoolOption(name="var3", doc="the third variable", default=True, prope option_5 = BoolOption(name="var4", doc="the forth variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_6 = BoolOption(name="var5", doc="the fifth variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_7 = BoolOption(name="var6", doc="the sixth variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4, option_5, option_6, option_7], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4, option_5, option_6, option_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6boolean/tiramisu/multi.py b/tests/dictionaries/00_6boolean/tiramisu/multi.py index e9d07f6cf..8dd541586 100644 --- a/tests/dictionaries/00_6boolean/tiramisu/multi.py +++ b/tests/dictionaries/00_6boolean/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,7 +16,7 @@ option_5 = BoolOption(name="var3", doc="the third variable", default=True, prope option_6 = BoolOption(name="var4", doc="the forth variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_7 = BoolOption(name="var5", doc="the fifth variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_8 = BoolOption(name="var6", doc="the sixth variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5, option_6, option_7, option_8], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5, option_6, option_7, option_8], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_11 = BoolOption(name="var1", doc="the first variable", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_12 = BoolOption(name="var2", doc="the second variable", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) @@ -20,6 +24,6 @@ option_13 = BoolOption(name="var3", doc="the third variable", default=True, prop option_14 = BoolOption(name="var4", doc="the forth variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_15 = BoolOption(name="var5", doc="the fifth variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_16 = BoolOption(name="var6", doc="the sixth variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[option_11, option_12, option_13, option_14, option_15, option_16], properties=frozenset({"standard"})) +optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_11, option_12, option_13, option_14, option_15, option_16], properties=frozenset({"standard"})) optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_9]) diff --git a/tests/dictionaries/00_6boolean_no_mandatory/tiramisu/base.py b/tests/dictionaries/00_6boolean_no_mandatory/tiramisu/base.py index d8a202523..aaa152e37 100644 --- a/tests/dictionaries/00_6boolean_no_mandatory/tiramisu/base.py +++ b/tests/dictionaries/00_6boolean_no_mandatory/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = BoolOption(name="variable", doc="a variable", default=True, properties=frozenset({"standard"}), informations={'type': 'boolean'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6boolean_no_mandatory/tiramisu/multi.py b/tests/dictionaries/00_6boolean_no_mandatory/tiramisu/multi.py index 186290bc7..d744af298 100644 --- a/tests/dictionaries/00_6boolean_no_mandatory/tiramisu/multi.py +++ b/tests/dictionaries/00_6boolean_no_mandatory/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = BoolOption(name="variable", doc="a variable", default=True, properties=frozenset({"standard"}), informations={'type': 'boolean'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = BoolOption(name="variable", doc="a variable", default=True, properties=frozenset({"standard"}), informations={'type': 'boolean'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_6choice/tiramisu/base.py b/tests/dictionaries/00_6choice/tiramisu/base.py index 8853e008e..8810037d3 100644 --- a/tests/dictionaries/00_6choice/tiramisu/base.py +++ b/tests/dictionaries/00_6choice/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,5 +16,5 @@ option_4 = ChoiceOption(name="var3", doc="the third variable", values=("a", "b", option_5 = ChoiceOption(name="var4", doc="the forth variable", values=(None, "b", "c"), properties=frozenset({"standard"}), informations={'type': 'choice'}) option_6 = ChoiceOption(name="var5", doc="the fifth variable", values=("a", "b", "c"), default="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) option_7 = ChoiceOption(name="var6", doc="the sixth variable", values=(1, 2, 3), default=1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4, option_5, option_6, option_7], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4, option_5, option_6, option_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6choice/tiramisu/multi.py b/tests/dictionaries/00_6choice/tiramisu/multi.py index 33f677117..0959665cd 100644 --- a/tests/dictionaries/00_6choice/tiramisu/multi.py +++ b/tests/dictionaries/00_6choice/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,7 +16,7 @@ option_5 = ChoiceOption(name="var3", doc="the third variable", values=("a", "b", option_6 = ChoiceOption(name="var4", doc="the forth variable", values=(None, "b", "c"), properties=frozenset({"standard"}), informations={'type': 'choice'}) option_7 = ChoiceOption(name="var5", doc="the fifth variable", values=("a", "b", "c"), default="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) option_8 = ChoiceOption(name="var6", doc="the sixth variable", values=(1, 2, 3), default=1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5, option_6, option_7, option_8], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5, option_6, option_7, option_8], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_11 = ChoiceOption(name="var1", doc="the first variable", values=("a", "b", "c"), properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) option_12 = ChoiceOption(name="var2", doc="the second variable", values=("a", "b", "c"), properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) @@ -20,6 +24,6 @@ option_13 = ChoiceOption(name="var3", doc="the third variable", values=("a", "b" option_14 = ChoiceOption(name="var4", doc="the forth variable", values=(None, "b", "c"), properties=frozenset({"standard"}), informations={'type': 'choice'}) option_15 = ChoiceOption(name="var5", doc="the fifth variable", values=("a", "b", "c"), default="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) option_16 = ChoiceOption(name="var6", doc="the sixth variable", values=(1, 2, 3), default=1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[option_11, option_12, option_13, option_14, option_15, option_16], properties=frozenset({"basic"})) +optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_11, option_12, option_13, option_14, option_15, option_16], properties=frozenset({"basic"})) optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_9]) diff --git a/tests/dictionaries/00_6choice_calculation/tiramisu/base.py b/tests/dictionaries/00_6choice_calculation/tiramisu/base.py index 8926d149c..87b0b64b1 100644 --- a/tests/dictionaries/00_6choice_calculation/tiramisu/base.py +++ b/tests/dictionaries/00_6choice_calculation/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['choices_rougail.var'] = "{% for n in trange(0, 10) %}\n{{ n }}\n{% endfor %}\n" option_2 = ChoiceOption(name="var", doc="a variable", values=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("choices_rougail.var"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/00_6choice_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("choices"), '__internal_variable': ParamValue("rougail.var")})), default=9, properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6choice_calculation/tiramisu/multi.py b/tests/dictionaries/00_6choice_calculation/tiramisu/multi.py index 4595dd25d..75f05515b 100644 --- a/tests/dictionaries/00_6choice_calculation/tiramisu/multi.py +++ b/tests/dictionaries/00_6choice_calculation/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['choices_1.rougail.var'] = "{% for n in trange(0, 10) %}\n{{ n }}\n{% endfor %}\n" dict_env['choices_2.rougail.var'] = "{% for n in trange(0, 10) %}\n{{ n }}\n{% endfor %}\n" option_3 = ChoiceOption(name="var", doc="a variable", values=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("choices_1.rougail.var"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/00_6choice_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("choices"), '__internal_variable': ParamValue("1.rougail.var")})), default=9, properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = ChoiceOption(name="var", doc="a variable", values=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("choices_2.rougail.var"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/00_6choice_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("choices"), '__internal_variable': ParamValue("2.rougail.var")})), default=9, properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_6choice_variable/tiramisu/base.py b/tests/dictionaries/00_6choice_variable/tiramisu/base.py index 69311651b..b696e2acf 100644 --- a/tests/dictionaries/00_6choice_variable/tiramisu/base.py +++ b/tests/dictionaries/00_6choice_variable/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var1", doc="a second variable", multi=True, default=["a", "b", "c"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = ChoiceOption(name="var2", doc="a first variable", values=Calculation(func['calc_value'], Params((ParamOption(option_2)))), default="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6choice_variable/tiramisu/multi.py b/tests/dictionaries/00_6choice_variable/tiramisu/multi.py index 6464121fc..2f0e079de 100644 --- a/tests/dictionaries/00_6choice_variable/tiramisu/multi.py +++ b/tests/dictionaries/00_6choice_variable/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="a second variable", multi=True, default=["a", "b", "c"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = ChoiceOption(name="var2", doc="a first variable", values=Calculation(func['calc_value'], Params((ParamOption(option_3)))), default="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_7 = StrOption(name="var1", doc="a second variable", multi=True, default=["a", "b", "c"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = ChoiceOption(name="var2", doc="a first variable", values=Calculation(func['calc_value'], Params((ParamOption(option_7)))), default="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_6custom/tiramisu/base.py b/tests/dictionaries/00_6custom/tiramisu/base.py index 2f0f4801e..659f107d5 100644 --- a/tests/dictionaries/00_6custom/tiramisu/base.py +++ b/tests/dictionaries/00_6custom/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = CustomOption(name="custom1", doc="the first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'custom'}) option_3 = CustomOption(name="custom2", doc="the seconf variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'custom'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6custom/tiramisu/multi.py b/tests/dictionaries/00_6custom/tiramisu/multi.py index 14054f083..374cfe3aa 100644 --- a/tests/dictionaries/00_6custom/tiramisu/multi.py +++ b/tests/dictionaries/00_6custom/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = CustomOption(name="custom1", doc="the first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'custom'}) option_4 = CustomOption(name="custom2", doc="the seconf variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'custom'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = CustomOption(name="custom1", doc="the first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'custom'}) option_8 = CustomOption(name="custom2", doc="the seconf variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'custom'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_6domainname/tiramisu/base.py b/tests/dictionaries/00_6domainname/tiramisu/base.py index 5c24669cb..3b181a88f 100644 --- a/tests/dictionaries/00_6domainname/tiramisu/base.py +++ b/tests/dictionaries/00_6domainname/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = DomainnameOption(name="variable", doc="a domain name variable", default="my.domain.name", type="domainname", allow_ip=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'domainname'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6domainname/tiramisu/multi.py b/tests/dictionaries/00_6domainname/tiramisu/multi.py index e57f013ef..706dee547 100644 --- a/tests/dictionaries/00_6domainname/tiramisu/multi.py +++ b/tests/dictionaries/00_6domainname/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = DomainnameOption(name="variable", doc="a domain name variable", default="my.domain.name", type="domainname", allow_ip=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'domainname'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = DomainnameOption(name="variable", doc="a domain name variable", default="my.domain.name", type="domainname", allow_ip=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'domainname'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_6domainname_params/tiramisu/base.py b/tests/dictionaries/00_6domainname_params/tiramisu/base.py index f303a80f4..ddf2c697a 100644 --- a/tests/dictionaries/00_6domainname_params/tiramisu/base.py +++ b/tests/dictionaries/00_6domainname_params/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = DomainnameOption(name="variable", doc="a domain name variable", default="my.domain.name", type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'domainname'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6domainname_params/tiramisu/multi.py b/tests/dictionaries/00_6domainname_params/tiramisu/multi.py index 9e9ebe742..1d33c6d33 100644 --- a/tests/dictionaries/00_6domainname_params/tiramisu/multi.py +++ b/tests/dictionaries/00_6domainname_params/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = DomainnameOption(name="variable", doc="a domain name variable", default="my.domain.name", type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'domainname'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = DomainnameOption(name="variable", doc="a domain name variable", default="my.domain.name", type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'domainname'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_6float/tiramisu/base.py b/tests/dictionaries/00_6float/tiramisu/base.py index 78062ddb8..7b6330c97 100644 --- a/tests/dictionaries/00_6float/tiramisu/base.py +++ b/tests/dictionaries/00_6float/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,5 +16,5 @@ option_4 = FloatOption(name="var3", doc="the third variable", default=0.0, prope option_5 = FloatOption(name="var4", doc="the forth variable", default=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_6 = FloatOption(name="var5", doc="the fifth variable", default=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_7 = FloatOption(name="var6", doc="the sixth variable", default=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4, option_5, option_6, option_7], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4, option_5, option_6, option_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6float/tiramisu/multi.py b/tests/dictionaries/00_6float/tiramisu/multi.py index 322ed89ec..1bb450a1c 100644 --- a/tests/dictionaries/00_6float/tiramisu/multi.py +++ b/tests/dictionaries/00_6float/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,7 +16,7 @@ option_5 = FloatOption(name="var3", doc="the third variable", default=0.0, prope option_6 = FloatOption(name="var4", doc="the forth variable", default=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_7 = FloatOption(name="var5", doc="the fifth variable", default=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_8 = FloatOption(name="var6", doc="the sixth variable", default=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5, option_6, option_7, option_8], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5, option_6, option_7, option_8], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_11 = FloatOption(name="var1", doc="the first variable", default=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_12 = FloatOption(name="var2", doc="the second variable", default=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) @@ -20,6 +24,6 @@ option_13 = FloatOption(name="var3", doc="the third variable", default=0.0, prop option_14 = FloatOption(name="var4", doc="the forth variable", default=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_15 = FloatOption(name="var5", doc="the fifth variable", default=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_16 = FloatOption(name="var6", doc="the sixth variable", default=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[option_11, option_12, option_13, option_14, option_15, option_16], properties=frozenset({"standard"})) +optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_11, option_12, option_13, option_14, option_15, option_16], properties=frozenset({"standard"})) optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_9]) diff --git a/tests/dictionaries/00_6number/tiramisu/base.py b/tests/dictionaries/00_6number/tiramisu/base.py index 9b59737a5..4dd10150d 100644 --- a/tests/dictionaries/00_6number/tiramisu/base.py +++ b/tests/dictionaries/00_6number/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,5 +16,5 @@ option_4 = IntOption(name="var3", doc="the third variable", default=0, propertie option_5 = IntOption(name="var4", doc="this forth variable", default=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_6 = IntOption(name="var5", doc="the fifth variable", default=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_7 = IntOption(name="var6", doc="the sixth variable", default=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4, option_5, option_6, option_7], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4, option_5, option_6, option_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6number/tiramisu/multi.py b/tests/dictionaries/00_6number/tiramisu/multi.py index 116ba6559..40fcddb37 100644 --- a/tests/dictionaries/00_6number/tiramisu/multi.py +++ b/tests/dictionaries/00_6number/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,7 +16,7 @@ option_5 = IntOption(name="var3", doc="the third variable", default=0, propertie option_6 = IntOption(name="var4", doc="this forth variable", default=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_7 = IntOption(name="var5", doc="the fifth variable", default=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_8 = IntOption(name="var6", doc="the sixth variable", default=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5, option_6, option_7, option_8], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5, option_6, option_7, option_8], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_11 = IntOption(name="var1", doc="the first variable", default=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_12 = IntOption(name="var2", doc="the second variable", default=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) @@ -20,6 +24,6 @@ option_13 = IntOption(name="var3", doc="the third variable", default=0, properti option_14 = IntOption(name="var4", doc="this forth variable", default=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_15 = IntOption(name="var5", doc="the fifth variable", default=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_16 = IntOption(name="var6", doc="the sixth variable", default=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[option_11, option_12, option_13, option_14, option_15, option_16], properties=frozenset({"standard"})) +optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_11, option_12, option_13, option_14, option_15, option_16], properties=frozenset({"standard"})) optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_9]) diff --git a/tests/dictionaries/00_6port/tiramisu/base.py b/tests/dictionaries/00_6port/tiramisu/base.py index b262e9423..6bb24744b 100644 --- a/tests/dictionaries/00_6port/tiramisu/base.py +++ b/tests/dictionaries/00_6port/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = PortOption(name="variable1", doc="a port variable", allow_private=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'port'}) option_3 = PortOption(name="variable2", doc="a port variable with default value", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'port'}) option_4 = PortOption(name="variable3", doc="a port variable with integer default value", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'port'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6port/tiramisu/multi.py b/tests/dictionaries/00_6port/tiramisu/multi.py index 91239f58b..7768b0dd2 100644 --- a/tests/dictionaries/00_6port/tiramisu/multi.py +++ b/tests/dictionaries/00_6port/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = PortOption(name="variable1", doc="a port variable", allow_private=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'port'}) option_4 = PortOption(name="variable2", doc="a port variable with default value", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'port'}) option_5 = PortOption(name="variable3", doc="a port variable with integer default value", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'port'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = PortOption(name="variable1", doc="a port variable", allow_private=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'port'}) option_9 = PortOption(name="variable2", doc="a port variable with default value", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'port'}) option_10 = PortOption(name="variable3", doc="a port variable with integer default value", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'port'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"basic"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/00_6regexp/tiramisu/base.py b/tests/dictionaries/00_6regexp/tiramisu/base.py index dd0723ffe..006e7f821 100644 --- a/tests/dictionaries/00_6regexp/tiramisu/base.py +++ b/tests/dictionaries/00_6regexp/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,5 +16,5 @@ class Regexp_option_2(RegexpOption): Regexp_option_2._regexp = re_compile(r"^#(?:[0-9a-f]{3}){1,2}$") option_2 = Regexp_option_2(name="var", doc="a first variable", default="#a1a1a1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'regexp', 'test': ('#b1b1b1', '#b2b2b2')}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6regexp/tiramisu/multi.py b/tests/dictionaries/00_6regexp/tiramisu/multi.py index 9bf01f61b..b980db191 100644 --- a/tests/dictionaries/00_6regexp/tiramisu/multi.py +++ b/tests/dictionaries/00_6regexp/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -17,9 +21,9 @@ class Regexp_option_6(RegexpOption): Regexp_option_6._regexp = re_compile(r"^#(?:[0-9a-f]{3}){1,2}$") option_3 = Regexp_option_3(name="var", doc="a first variable", default="#a1a1a1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'regexp', 'test': ('#b1b1b1', '#b2b2b2')}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = Regexp_option_6(name="var", doc="a first variable", default="#a1a1a1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'regexp', 'test': ('#b1b1b1', '#b2b2b2')}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_6string/tiramisu/base.py b/tests/dictionaries/00_6string/tiramisu/base.py index 31d37ecd7..49c21be99 100644 --- a/tests/dictionaries/00_6string/tiramisu/base.py +++ b/tests/dictionaries/00_6string/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,5 +16,5 @@ option_4 = StrOption(name="var3", doc="the third variable", properties=frozenset option_5 = StrOption(name="var4", doc="the forth variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="var5", doc="the fifth variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_7 = StrOption(name="var6", doc="the sixth variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4, option_5, option_6, option_7], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4, option_5, option_6, option_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_6string/tiramisu/multi.py b/tests/dictionaries/00_6string/tiramisu/multi.py index bb922d328..e331396c6 100644 --- a/tests/dictionaries/00_6string/tiramisu/multi.py +++ b/tests/dictionaries/00_6string/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,7 +16,7 @@ option_5 = StrOption(name="var3", doc="the third variable", properties=frozenset option_6 = StrOption(name="var4", doc="the forth variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_7 = StrOption(name="var5", doc="the fifth variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="var6", doc="the sixth variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5, option_6, option_7, option_8], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5, option_6, option_7, option_8], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_11 = StrOption(name="var1", doc="the first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_12 = StrOption(name="var2", doc="the second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) @@ -20,6 +24,6 @@ option_13 = StrOption(name="var3", doc="the third variable", properties=frozense option_14 = StrOption(name="var4", doc="the forth variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_15 = StrOption(name="var5", doc="the fifth variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_16 = StrOption(name="var6", doc="the sixth variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[option_11, option_12, option_13, option_14, option_15, option_16], properties=frozenset({"basic"})) +optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_11, option_12, option_13, option_14, option_15, option_16], properties=frozenset({"basic"})) optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_9]) diff --git a/tests/dictionaries/00_7choice_quote/tiramisu/base.py b/tests/dictionaries/00_7choice_quote/tiramisu/base.py index c4a07dbc0..c3cb7d78e 100644 --- a/tests/dictionaries/00_7choice_quote/tiramisu/base.py +++ b/tests/dictionaries/00_7choice_quote/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = ChoiceOption(name="var", doc="A choice", values=("quote'", "quote\"", "quote\"'"), default="quote'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_7choice_quote/tiramisu/multi.py b/tests/dictionaries/00_7choice_quote/tiramisu/multi.py index 53093206f..c9d3d4197 100644 --- a/tests/dictionaries/00_7choice_quote/tiramisu/multi.py +++ b/tests/dictionaries/00_7choice_quote/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = ChoiceOption(name="var", doc="A choice", values=("quote'", "quote\"", "quote\"'"), default="quote'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = ChoiceOption(name="var", doc="A choice", values=("quote'", "quote\"", "quote\"'"), default="quote'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_7help_quote/tiramisu/base.py b/tests/dictionaries/00_7help_quote/tiramisu/base.py index 49eef2b49..d038bbfa4 100644 --- a/tests/dictionaries/00_7help_quote/tiramisu/base.py +++ b/tests/dictionaries/00_7help_quote/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var1", doc="the first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'help': "message with '"}) option_3 = StrOption(name="var2", doc="the second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'help': 'message with "'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_7help_quote/tiramisu/multi.py b/tests/dictionaries/00_7help_quote/tiramisu/multi.py index ce2f802cf..34a49bf09 100644 --- a/tests/dictionaries/00_7help_quote/tiramisu/multi.py +++ b/tests/dictionaries/00_7help_quote/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="the first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'help': "message with '"}) option_4 = StrOption(name="var2", doc="the second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'help': 'message with "'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = StrOption(name="var1", doc="the first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'help': "message with '"}) option_8 = StrOption(name="var2", doc="the second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'help': 'message with "'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_7value_doublequote/tiramisu/base.py b/tests/dictionaries/00_7value_doublequote/tiramisu/base.py index 0b3503902..52c7f745b 100644 --- a/tests/dictionaries/00_7value_doublequote/tiramisu/base.py +++ b/tests/dictionaries/00_7value_doublequote/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="variable", doc="a variable", default="quote\"", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_7value_doublequote/tiramisu/multi.py b/tests/dictionaries/00_7value_doublequote/tiramisu/multi.py index 4966bb96d..e99187961 100644 --- a/tests/dictionaries/00_7value_doublequote/tiramisu/multi.py +++ b/tests/dictionaries/00_7value_doublequote/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="a variable", default="quote\"", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", default="quote\"", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_7value_doublequote2/tiramisu/base.py b/tests/dictionaries/00_7value_doublequote2/tiramisu/base.py index 1dba552e7..05b2e8b7d 100644 --- a/tests/dictionaries/00_7value_doublequote2/tiramisu/base.py +++ b/tests/dictionaries/00_7value_doublequote2/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="variable", doc="a variable", default="quote'\"", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_7value_doublequote2/tiramisu/multi.py b/tests/dictionaries/00_7value_doublequote2/tiramisu/multi.py index 5bbf144ad..b6c3c6001 100644 --- a/tests/dictionaries/00_7value_doublequote2/tiramisu/multi.py +++ b/tests/dictionaries/00_7value_doublequote2/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="a variable", default="quote'\"", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", default="quote'\"", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_7value_doublequote3/dictionaries/rougail/00-base.yml b/tests/dictionaries/00_7value_doublequote3/dictionaries/rougail/00-base.yml index 5d407e60f..b41ed475e 100644 --- a/tests/dictionaries/00_7value_doublequote3/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/00_7value_doublequote3/dictionaries/rougail/00-base.yml @@ -1,6 +1,6 @@ --- -version: '1.0' +version: '1.1' + variable: description: a variable - hidden: true default: quote\"\' diff --git a/tests/dictionaries/00_7value_doublequote3/tiramisu/base.py b/tests/dictionaries/00_7value_doublequote3/tiramisu/base.py index a91c2df88..590ded46d 100644 --- a/tests/dictionaries/00_7value_doublequote3/tiramisu/base.py +++ b/tests/dictionaries/00_7value_doublequote3/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_2 = StrOption(name="variable", doc="a variable", default="quote\\\"\\'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +option_2 = StrOption(name="variable", doc="a variable", default="quote\\\"\\'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_7value_doublequote3/tiramisu/multi.py b/tests/dictionaries/00_7value_doublequote3/tiramisu/multi.py index 0f8bfa62a..ec0747eca 100644 --- a/tests/dictionaries/00_7value_doublequote3/tiramisu/multi.py +++ b/tests/dictionaries/00_7value_doublequote3/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_3 = StrOption(name="variable", doc="a variable", default="quote\\\"\\'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +option_3 = StrOption(name="variable", doc="a variable", default="quote\\\"\\'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) -option_6 = StrOption(name="variable", doc="a variable", default="quote\\\"\\'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +option_6 = StrOption(name="variable", doc="a variable", default="quote\\\"\\'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_7value_doublequote3/tiramisu/no_namespace.py b/tests/dictionaries/00_7value_doublequote3/tiramisu/no_namespace.py index 3a3385ad2..982652ea4 100644 --- a/tests/dictionaries/00_7value_doublequote3/tiramisu/no_namespace.py +++ b/tests/dictionaries/00_7value_doublequote3/tiramisu/no_namespace.py @@ -6,5 +6,5 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_1 = StrOption(name="variable", doc="a variable", default="quote\\\"\\'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'type': 'string'}) +option_1 = StrOption(name="variable", doc="a variable", default="quote\\\"\\'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) diff --git a/tests/dictionaries/00_7value_quote/tiramisu/base.py b/tests/dictionaries/00_7value_quote/tiramisu/base.py index 9ceda4223..9d55b298f 100644 --- a/tests/dictionaries/00_7value_quote/tiramisu/base.py +++ b/tests/dictionaries/00_7value_quote/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="variable", doc="a variable", default="quote'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_7value_quote/tiramisu/multi.py b/tests/dictionaries/00_7value_quote/tiramisu/multi.py index 80d750f66..72d67127c 100644 --- a/tests/dictionaries/00_7value_quote/tiramisu/multi.py +++ b/tests/dictionaries/00_7value_quote/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="a variable", default="quote'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", default="quote'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_8calculation_information/tiramisu/base.py b/tests/dictionaries/00_8calculation_information/tiramisu/base.py index 85794b2db..99b22177b 100644 --- a/tests/dictionaries/00_8calculation_information/tiramisu/base.py +++ b/tests/dictionaries/00_8calculation_information/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.variable'] = "{{test_information }}\n" option_2 = StrOption(name="variable", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_8calculation_information/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.variable"), 'test_information': ParamInformation("test_information", None)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_8calculation_information/tiramisu/multi.py b/tests/dictionaries/00_8calculation_information/tiramisu/multi.py index f484a9daa..3da8353aa 100644 --- a/tests/dictionaries/00_8calculation_information/tiramisu/multi.py +++ b/tests/dictionaries/00_8calculation_information/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_1.rougail.variable'] = "{{test_information }}\n" dict_env['default_2.rougail.variable'] = "{{test_information }}\n" option_3 = StrOption(name="variable", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_8calculation_information/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.variable"), 'test_information': ParamInformation("test_information", None)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_8calculation_information/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.variable"), 'test_information': ParamInformation("test_information", None)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_8test/dictionaries/rougail/00-base.yml b/tests/dictionaries/00_8test/dictionaries/rougail/00-base.yml index 7392842d7..53355b261 100644 --- a/tests/dictionaries/00_8test/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/00_8test/dictionaries/rougail/00-base.yml @@ -1,25 +1,31 @@ --- version: '1.1' + var1: description: the first variable test: - test + var2: description: the second variable test: - test default: value + var3: description: the third variable test: - test1 - test2 + var4: description: the forth variable test: - null - test1 - test2 + mandatory: false + var5: description: the fifth variable type: boolean diff --git a/tests/dictionaries/00_8test/makedict/mandatory.json b/tests/dictionaries/00_8test/makedict/mandatory.json index 658de64c5..7e7f9089e 100644 --- a/tests/dictionaries/00_8test/makedict/mandatory.json +++ b/tests/dictionaries/00_8test/makedict/mandatory.json @@ -1 +1 @@ -["rougail.var1", "rougail.var3", "rougail.var4"] \ No newline at end of file +["rougail.var1", "rougail.var3"] \ No newline at end of file diff --git a/tests/dictionaries/00_8test/tiramisu/base.py b/tests/dictionaries/00_8test/tiramisu/base.py index 3ec8b375a..e479d45d3 100644 --- a/tests/dictionaries/00_8test/tiramisu/base.py +++ b/tests/dictionaries/00_8test/tiramisu/base.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var1", doc="the first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': ('test',)}) option_3 = StrOption(name="var2", doc="the second variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('test',)}) option_4 = StrOption(name="var3", doc="the third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': ('test1', 'test2')}) -option_5 = StrOption(name="var4", doc="the forth variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': (None, 'test1', 'test2')}) +option_5 = StrOption(name="var4", doc="the forth variable", properties=frozenset({"standard"}), informations={'type': 'string', 'test': (None, 'test1', 'test2')}) option_6 = BoolOption(name="var5", doc="the fifth variable", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean', 'test': (False,)}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4, option_5, option_6], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4, option_5, option_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_8test/tiramisu/multi.py b/tests/dictionaries/00_8test/tiramisu/multi.py index e1c8cf9c5..5f4c906d9 100644 --- a/tests/dictionaries/00_8test/tiramisu/multi.py +++ b/tests/dictionaries/00_8test/tiramisu/multi.py @@ -3,21 +3,25 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="the first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': ('test',)}) option_4 = StrOption(name="var2", doc="the second variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('test',)}) option_5 = StrOption(name="var3", doc="the third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': ('test1', 'test2')}) -option_6 = StrOption(name="var4", doc="the forth variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': (None, 'test1', 'test2')}) +option_6 = StrOption(name="var4", doc="the forth variable", properties=frozenset({"standard"}), informations={'type': 'string', 'test': (None, 'test1', 'test2')}) option_7 = BoolOption(name="var5", doc="the fifth variable", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean', 'test': (False,)}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5, option_6, option_7], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5, option_6, option_7], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_10 = StrOption(name="var1", doc="the first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': ('test',)}) option_11 = StrOption(name="var2", doc="the second variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('test',)}) option_12 = StrOption(name="var3", doc="the third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': ('test1', 'test2')}) -option_13 = StrOption(name="var4", doc="the forth variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': (None, 'test1', 'test2')}) +option_13 = StrOption(name="var4", doc="the forth variable", properties=frozenset({"standard"}), informations={'type': 'string', 'test': (None, 'test1', 'test2')}) option_14 = BoolOption(name="var5", doc="the fifth variable", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean', 'test': (False,)}) -optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", children=[option_10, option_11, option_12, option_13, option_14], properties=frozenset({"basic"})) +optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_10, option_11, option_12, option_13, option_14], properties=frozenset({"basic"})) optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_8]) diff --git a/tests/dictionaries/00_8test/tiramisu/no_namespace.py b/tests/dictionaries/00_8test/tiramisu/no_namespace.py index baa61bffc..835c149d2 100644 --- a/tests/dictionaries/00_8test/tiramisu/no_namespace.py +++ b/tests/dictionaries/00_8test/tiramisu/no_namespace.py @@ -9,6 +9,6 @@ ALLOWED_LEADER_PROPERTIES.add("advanced") option_1 = StrOption(name="var1", doc="the first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': ('test',)}) option_2 = StrOption(name="var2", doc="the second variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('test',)}) option_3 = StrOption(name="var3", doc="the third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': ('test1', 'test2')}) -option_4 = StrOption(name="var4", doc="the forth variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': (None, 'test1', 'test2')}) +option_4 = StrOption(name="var4", doc="the forth variable", properties=frozenset({"standard"}), informations={'type': 'string', 'test': (None, 'test1', 'test2')}) option_5 = BoolOption(name="var5", doc="the fifth variable", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean', 'test': (False,)}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_2, option_3, option_4, option_5]) diff --git a/tests/dictionaries/00_9choice_variable_multi/tiramisu/base.py b/tests/dictionaries/00_9choice_variable_multi/tiramisu/base.py index deb48e661..55880e647 100644 --- a/tests/dictionaries/00_9choice_variable_multi/tiramisu/base.py +++ b/tests/dictionaries/00_9choice_variable_multi/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = ChoiceOption(name="variable1", doc="a first variable", values=("val1", "val2"), multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) option_3 = ChoiceOption(name="variable2", doc="a second variable", values=("val1", "val2"), multi=True, properties=frozenset({"standard"}), informations={'type': 'choice'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_9choice_variable_multi/tiramisu/multi.py b/tests/dictionaries/00_9choice_variable_multi/tiramisu/multi.py index d95dc90fe..339465fb0 100644 --- a/tests/dictionaries/00_9choice_variable_multi/tiramisu/multi.py +++ b/tests/dictionaries/00_9choice_variable_multi/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = ChoiceOption(name="variable1", doc="a first variable", values=("val1", "val2"), multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) option_4 = ChoiceOption(name="variable2", doc="a second variable", values=("val1", "val2"), multi=True, properties=frozenset({"standard"}), informations={'type': 'choice'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = ChoiceOption(name="variable1", doc="a first variable", values=("val1", "val2"), multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) option_8 = ChoiceOption(name="variable2", doc="a second variable", values=("val1", "val2"), multi=True, properties=frozenset({"standard"}), informations={'type': 'choice'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_9choice_variables/tiramisu/base.py b/tests/dictionaries/00_9choice_variables/tiramisu/base.py index 2e48ad0f0..31c74b30f 100644 --- a/tests/dictionaries/00_9choice_variables/tiramisu/base.py +++ b/tests/dictionaries/00_9choice_variables/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="source_variable_1", doc="the first source variable", default="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="source_variable_2", doc="the second source variable", default="val2", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = ChoiceOption(name="my_variable", doc="a variable", values=(Calculation(func['calc_value'], Params((ParamOption(option_2)))), Calculation(func['calc_value'], Params((ParamOption(option_3))))), default="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_9choice_variables/tiramisu/multi.py b/tests/dictionaries/00_9choice_variables/tiramisu/multi.py index d4e760ad9..82b53332c 100644 --- a/tests/dictionaries/00_9choice_variables/tiramisu/multi.py +++ b/tests/dictionaries/00_9choice_variables/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="source_variable_1", doc="the first source variable", default="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="source_variable_2", doc="the second source variable", default="val2", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = ChoiceOption(name="my_variable", doc="a variable", values=(Calculation(func['calc_value'], Params((ParamOption(option_3)))), Calculation(func['calc_value'], Params((ParamOption(option_4))))), default="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="source_variable_1", doc="the first source variable", default="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_9 = StrOption(name="source_variable_2", doc="the second source variable", default="val2", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = ChoiceOption(name="my_variable", doc="a variable", values=(Calculation(func['calc_value'], Params((ParamOption(option_8)))), Calculation(func['calc_value'], Params((ParamOption(option_9))))), default="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/00_9default_calculation/tiramisu/base.py b/tests/dictionaries/00_9default_calculation/tiramisu/base.py index be2e27d26..bcb3136f5 100644 --- a/tests/dictionaries/00_9default_calculation/tiramisu/base.py +++ b/tests/dictionaries/00_9default_calculation/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.variable'] = "{{ param1 }}_{{ param2 }}_{{ param3 }}_{{ param4 }}\n" option_2 = StrOption(name="variable", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.variable"), 'param1': ParamValue("string"), 'param2': ParamValue(1), 'param3': ParamValue(True), 'param4': ParamValue(None)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_9default_calculation/tiramisu/multi.py b/tests/dictionaries/00_9default_calculation/tiramisu/multi.py index de4aedf26..1b0ea9ced 100644 --- a/tests/dictionaries/00_9default_calculation/tiramisu/multi.py +++ b/tests/dictionaries/00_9default_calculation/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_1.rougail.variable'] = "{{ param1 }}_{{ param2 }}_{{ param3 }}_{{ param4 }}\n" dict_env['default_2.rougail.variable'] = "{{ param1 }}_{{ param2 }}_{{ param3 }}_{{ param4 }}\n" option_3 = StrOption(name="variable", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.variable"), 'param1': ParamValue("string"), 'param2': ParamValue(1), 'param3': ParamValue(True), 'param4': ParamValue(None)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.variable"), 'param1': ParamValue("string"), 'param2': ParamValue(1), 'param3': ParamValue(True), 'param4': ParamValue(None)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_9default_calculation_information/tiramisu/base.py b/tests/dictionaries/00_9default_calculation_information/tiramisu/base.py index 2748083ae..d130c1427 100644 --- a/tests/dictionaries/00_9default_calculation_information/tiramisu/base.py +++ b/tests/dictionaries/00_9default_calculation_information/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.var'] = "{{ information }}" option_2 = StrOption(name="var", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9default_calculation_information/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var"), 'information': ParamSelfInformation("test_information", None)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_9default_calculation_information/tiramisu/multi.py b/tests/dictionaries/00_9default_calculation_information/tiramisu/multi.py index 8e92ac720..b5d57558f 100644 --- a/tests/dictionaries/00_9default_calculation_information/tiramisu/multi.py +++ b/tests/dictionaries/00_9default_calculation_information/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_1.rougail.var'] = "{{ information }}" dict_env['default_2.rougail.var'] = "{{ information }}" option_3 = StrOption(name="var", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9default_calculation_information/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var"), 'information': ParamSelfInformation("test_information", None)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="var", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9default_calculation_information/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var"), 'information': ParamSelfInformation("test_information", None)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_9default_calculation_information_other_variable/tiramisu/base.py b/tests/dictionaries/00_9default_calculation_information_other_variable/tiramisu/base.py index 9afa8c900..0d9c8d70b 100644 --- a/tests/dictionaries/00_9default_calculation_information_other_variable/tiramisu/base.py +++ b/tests/dictionaries/00_9default_calculation_information_other_variable/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.var2'] = "{{ information }}\n" option_2 = StrOption(name="var1", doc="a first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_3 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9default_calculation_information_other_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2"), 'information': ParamInformation("test_information", None, option=option_2)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_9default_calculation_information_other_variable/tiramisu/multi.py b/tests/dictionaries/00_9default_calculation_information_other_variable/tiramisu/multi.py index 7c47905fd..a52509c73 100644 --- a/tests/dictionaries/00_9default_calculation_information_other_variable/tiramisu/multi.py +++ b/tests/dictionaries/00_9default_calculation_information_other_variable/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,10 +14,10 @@ dict_env['default_1.rougail.var2'] = "{{ information }}\n" dict_env['default_2.rougail.var2'] = "{{ information }}\n" option_3 = StrOption(name="var1", doc="a first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9default_calculation_information_other_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'information': ParamInformation("test_information", None, option=option_3)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = StrOption(name="var1", doc="a first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_8 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9default_calculation_information_other_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'information': ParamInformation("test_information", None, option=option_7)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_9default_calculation_multi_optional/tiramisu/base.py b/tests/dictionaries/00_9default_calculation_multi_optional/tiramisu/base.py index dcf8bc20d..2d47baca2 100644 --- a/tests/dictionaries/00_9default_calculation_multi_optional/tiramisu/base.py +++ b/tests/dictionaries/00_9default_calculation_multi_optional/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="my_variable", doc="my_variable", default="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="my_calculated_variable", doc="my_calculated_variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_2))))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_2)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_9default_calculation_multi_optional/tiramisu/multi.py b/tests/dictionaries/00_9default_calculation_multi_optional/tiramisu/multi.py index 38b6347a7..b756e1444 100644 --- a/tests/dictionaries/00_9default_calculation_multi_optional/tiramisu/multi.py +++ b/tests/dictionaries/00_9default_calculation_multi_optional/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="my_variable", doc="my_variable", default="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="my_calculated_variable", doc="my_calculated_variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_3))))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_3)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_7 = StrOption(name="my_variable", doc="my_variable", default="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="my_calculated_variable", doc="my_calculated_variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_7))))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_7)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_9default_calculation_multi_optional2/tiramisu/base.py b/tests/dictionaries/00_9default_calculation_multi_optional2/tiramisu/base.py index 012fa7ec9..f879c41ca 100644 --- a/tests/dictionaries/00_9default_calculation_multi_optional2/tiramisu/base.py +++ b/tests/dictionaries/00_9default_calculation_multi_optional2/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="my_variable", doc="my_variable", default="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="my_calculated_variable", doc="my_calculated_variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_2))))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_9default_calculation_multi_optional2/tiramisu/multi.py b/tests/dictionaries/00_9default_calculation_multi_optional2/tiramisu/multi.py index 4d4b03c61..2ce59ea75 100644 --- a/tests/dictionaries/00_9default_calculation_multi_optional2/tiramisu/multi.py +++ b/tests/dictionaries/00_9default_calculation_multi_optional2/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="my_variable", doc="my_variable", default="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="my_calculated_variable", doc="my_calculated_variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_3))))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_7 = StrOption(name="my_variable", doc="my_variable", default="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="my_calculated_variable", doc="my_calculated_variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_7))))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_9default_calculation_optional/tiramisu/base.py b/tests/dictionaries/00_9default_calculation_optional/tiramisu/base.py index e0340385b..4f8abed9e 100644 --- a/tests/dictionaries/00_9default_calculation_optional/tiramisu/base.py +++ b/tests/dictionaries/00_9default_calculation_optional/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="my_calculated_variable", doc="my_calculated_variable", multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_9default_calculation_optional/tiramisu/multi.py b/tests/dictionaries/00_9default_calculation_optional/tiramisu/multi.py index 8ddee24e1..d96a53e2e 100644 --- a/tests/dictionaries/00_9default_calculation_optional/tiramisu/multi.py +++ b/tests/dictionaries/00_9default_calculation_optional/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="my_calculated_variable", doc="my_calculated_variable", multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="my_calculated_variable", doc="my_calculated_variable", multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_9default_calculation_optional_exists/tiramisu/base.py b/tests/dictionaries/00_9default_calculation_optional_exists/tiramisu/base.py index 810fbd976..8b0306cc8 100644 --- a/tests/dictionaries/00_9default_calculation_optional_exists/tiramisu/base.py +++ b/tests/dictionaries/00_9default_calculation_optional_exists/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="my_variable", doc="my_variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="my_calculated_variable", doc="my_calculated_variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_2)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_9default_calculation_optional_exists/tiramisu/multi.py b/tests/dictionaries/00_9default_calculation_optional_exists/tiramisu/multi.py index abec77b83..bafe0eec6 100644 --- a/tests/dictionaries/00_9default_calculation_optional_exists/tiramisu/multi.py +++ b/tests/dictionaries/00_9default_calculation_optional_exists/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="my_variable", doc="my_variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="my_calculated_variable", doc="my_calculated_variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_3)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_7 = StrOption(name="my_variable", doc="my_variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="my_calculated_variable", doc="my_calculated_variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_7)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_9default_calculation_param_optional/tiramisu/base.py b/tests/dictionaries/00_9default_calculation_param_optional/tiramisu/base.py index 8f6ba54d0..328f51542 100644 --- a/tests/dictionaries/00_9default_calculation_param_optional/tiramisu/base.py +++ b/tests/dictionaries/00_9default_calculation_param_optional/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.var1'] = "{% if var2 is defined %} {{ var2 }} {% elif var3 is defined %} {{ var3 }} {% elif var4 is defined %} {{ var4 }} {% else %} {{ _.var2 }} {% endif %} " option_3 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_2 = StrOption(name="var1", doc="a first variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9default_calculation_param_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var1"), 'var2': ParamOption(option_3), '_.var2': ParamOption(option_3)})), properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_9default_calculation_param_optional/tiramisu/multi.py b/tests/dictionaries/00_9default_calculation_param_optional/tiramisu/multi.py index a891061be..3b9a7f1a9 100644 --- a/tests/dictionaries/00_9default_calculation_param_optional/tiramisu/multi.py +++ b/tests/dictionaries/00_9default_calculation_param_optional/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,10 +14,10 @@ dict_env['default_1.rougail.var1'] = "{% if var2 is defined %} {{ var2 }} {% eli dict_env['default_2.rougail.var1'] = "{% if var2 is defined %} {{ var2 }} {% elif var3 is defined %} {{ var3 }} {% elif var4 is defined %} {{ var4 }} {% else %} {{ _.var2 }} {% endif %} " option_4 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var1", doc="a first variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9default_calculation_param_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var1"), 'var2': ParamOption(option_4), '_.var2': ParamOption(option_4)})), properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_7 = StrOption(name="var1", doc="a first variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9default_calculation_param_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var1"), 'var2': ParamOption(option_8), '_.var2': ParamOption(option_8)})), properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_9default_information_other_variable/tiramisu/base.py b/tests/dictionaries/00_9default_information_other_variable/tiramisu/base.py index f35a79ee9..7940796b4 100644 --- a/tests/dictionaries/00_9default_information_other_variable/tiramisu/base.py +++ b/tests/dictionaries/00_9default_information_other_variable/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var1", doc="a first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_3 = StrOption(name="var2", doc="a second variable", default=Calculation(func['calc_value'], Params((ParamInformation("test_information", None, option=option_2)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_9default_information_other_variable/tiramisu/multi.py b/tests/dictionaries/00_9default_information_other_variable/tiramisu/multi.py index 0826899f0..20e4c6da7 100644 --- a/tests/dictionaries/00_9default_information_other_variable/tiramisu/multi.py +++ b/tests/dictionaries/00_9default_information_other_variable/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="a first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a second variable", default=Calculation(func['calc_value'], Params((ParamInformation("test_information", None, option=option_3)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = StrOption(name="var1", doc="a first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_8 = StrOption(name="var2", doc="a second variable", default=Calculation(func['calc_value'], Params((ParamInformation("test_information", None, option=option_7)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/00_9default_integer/tiramisu/base.py b/tests/dictionaries/00_9default_integer/tiramisu/base.py index 3594fd061..58567b7e2 100644 --- a/tests/dictionaries/00_9default_integer/tiramisu/base.py +++ b/tests/dictionaries/00_9default_integer/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['choices_rougail.var'] = "{% for item in trange(0, 10) %}\n{{ item }}\n{%- endfor %}\n" option_2 = ChoiceOption(name="var", doc="a variable", values=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("choices_rougail.var"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/00_9default_integer/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("choices"), '__internal_variable': ParamValue("rougail.var")})), default=9, properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/00_9default_integer/tiramisu/multi.py b/tests/dictionaries/00_9default_integer/tiramisu/multi.py index 516f2a4b2..db8bd65fa 100644 --- a/tests/dictionaries/00_9default_integer/tiramisu/multi.py +++ b/tests/dictionaries/00_9default_integer/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['choices_1.rougail.var'] = "{% for item in trange(0, 10) %}\n{{ item }}\n{%- endfor %}\n" dict_env['choices_2.rougail.var'] = "{% for item in trange(0, 10) %}\n{{ item }}\n{%- endfor %}\n" option_3 = ChoiceOption(name="var", doc="a variable", values=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("choices_1.rougail.var"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/00_9default_integer/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("choices"), '__internal_variable': ParamValue("1.rougail.var")})), default=9, properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = ChoiceOption(name="var", doc="a variable", values=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("choices_2.rougail.var"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/00_9default_integer/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("choices"), '__internal_variable': ParamValue("2.rougail.var")})), default=9, properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/00_9extra/tiramisu/base.py b/tests/dictionaries/00_9extra/tiramisu/base.py index ffc207063..cf442ccaa 100644 --- a/tests/dictionaries/00_9extra/tiramisu/base.py +++ b/tests/dictionaries/00_9extra/tiramisu/base.py @@ -3,12 +3,16 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_extra.variable'] = "no" option_2 = StrOption(name="variable", doc="a variable", default="rougail", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_4 = StrOption(name="variable", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_extra.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9extra/dictionaries/extra/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("extra.variable")})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_3 = OptionDescription(name="extra", doc="extra", children=[option_4], properties=frozenset({"standard"})) +optiondescription_3 = OptionDescription(name="extra", doc="extra", group_type=groups.namespace, children=[option_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_3]) diff --git a/tests/dictionaries/00_9extra/tiramisu/multi.py b/tests/dictionaries/00_9extra/tiramisu/multi.py index 217d13dc7..fb4020010 100644 --- a/tests/dictionaries/00_9extra/tiramisu/multi.py +++ b/tests/dictionaries/00_9extra/tiramisu/multi.py @@ -3,19 +3,23 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_1.extra.variable'] = "no" dict_env['default_2.extra.variable'] = "no" option_3 = StrOption(name="variable", doc="a variable", default="rougail", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) option_5 = StrOption(name="variable", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.extra.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9extra/dictionaries/extra/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.extra.variable")})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_4 = OptionDescription(name="extra", doc="extra", children=[option_5], properties=frozenset({"standard"})) +optiondescription_4 = OptionDescription(name="extra", doc="extra", group_type=groups.namespace, children=[option_5], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2, optiondescription_4], properties=frozenset({"standard"})) option_8 = StrOption(name="variable", doc="a variable", default="rougail", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8], properties=frozenset({"standard"})) option_10 = StrOption(name="variable", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.extra.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9extra/dictionaries/extra/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.extra.variable")})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_9 = OptionDescription(name="extra", doc="extra", children=[option_10], properties=frozenset({"standard"})) +optiondescription_9 = OptionDescription(name="extra", doc="extra", group_type=groups.namespace, children=[option_10], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7, optiondescription_9], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/00_9extra_calculation/tiramisu/base.py b/tests/dictionaries/00_9extra_calculation/tiramisu/base.py index 551e303c7..327340ef3 100644 --- a/tests/dictionaries/00_9extra_calculation/tiramisu/base.py +++ b/tests/dictionaries/00_9extra_calculation/tiramisu/base.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_extra.variable2'] = "{{ rougail.variable }}\n" dict_env['default_extra.variable3'] = "{{ variable }}\n" option_2 = StrOption(name="variable", doc="a variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_4 = StrOption(name="variable1", doc="a first variable", default=Calculation(func['calc_value'], Params((ParamOption(option_2)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="variable2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_extra.variable2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9extra_calculation/dictionaries/extra/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("extra.variable2"), 'rougail.variable': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="variable3", doc="a third variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_extra.variable3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9extra_calculation/dictionaries/extra/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("extra.variable3"), 'variable': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_3 = OptionDescription(name="extra", doc="extra", children=[option_4, option_5, option_6], properties=frozenset({"standard"})) +optiondescription_3 = OptionDescription(name="extra", doc="extra", group_type=groups.namespace, children=[option_4, option_5, option_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_3]) diff --git a/tests/dictionaries/00_9extra_calculation/tiramisu/multi.py b/tests/dictionaries/00_9extra_calculation/tiramisu/multi.py index 776af9d9f..8de3b3d8e 100644 --- a/tests/dictionaries/00_9extra_calculation/tiramisu/multi.py +++ b/tests/dictionaries/00_9extra_calculation/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,17 +15,17 @@ dict_env['default_1.extra.variable3'] = "{{ variable }}\n" dict_env['default_2.extra.variable2'] = "{{ rougail.variable }}\n" dict_env['default_2.extra.variable3'] = "{{ variable }}\n" option_3 = StrOption(name="variable", doc="a variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) option_5 = StrOption(name="variable1", doc="a first variable", default=Calculation(func['calc_value'], Params((ParamOption(option_3)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="variable2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.extra.variable2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9extra_calculation/dictionaries/extra/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.extra.variable2"), 'rougail.variable': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_7 = StrOption(name="variable3", doc="a third variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.extra.variable3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9extra_calculation/dictionaries/extra/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.extra.variable3"), 'variable': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_4 = OptionDescription(name="extra", doc="extra", children=[option_5, option_6, option_7], properties=frozenset({"standard"})) +optiondescription_4 = OptionDescription(name="extra", doc="extra", group_type=groups.namespace, children=[option_5, option_6, option_7], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2, optiondescription_4], properties=frozenset({"standard"})) option_10 = StrOption(name="variable", doc="a variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", children=[option_10], properties=frozenset({"standard"})) +optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_10], properties=frozenset({"standard"})) option_12 = StrOption(name="variable1", doc="a first variable", default=Calculation(func['calc_value'], Params((ParamOption(option_10)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_13 = StrOption(name="variable2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.extra.variable2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9extra_calculation/dictionaries/extra/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.extra.variable2"), 'rougail.variable': ParamOption(option_10)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_14 = StrOption(name="variable3", doc="a third variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.extra.variable3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/00_9extra_calculation/dictionaries/extra/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.extra.variable3"), 'variable': ParamOption(option_10)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_11 = OptionDescription(name="extra", doc="extra", children=[option_12, option_13, option_14], properties=frozenset({"standard"})) +optiondescription_11 = OptionDescription(name="extra", doc="extra", group_type=groups.namespace, children=[option_12, option_13, option_14], properties=frozenset({"standard"})) optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9, optiondescription_11], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_8]) diff --git a/tests/dictionaries/01_6boolean_multi/tiramisu/base.py b/tests/dictionaries/01_6boolean_multi/tiramisu/base.py index 0bdbb864d..9eac31288 100644 --- a/tests/dictionaries/01_6boolean_multi/tiramisu/base.py +++ b/tests/dictionaries/01_6boolean_multi/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -14,5 +18,5 @@ option_6 = BoolOption(name="var5", doc="the fifth variable", multi=True, default option_7 = BoolOption(name="var6", doc="the sixth variable", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_8 = BoolOption(name="var7", doc="the seventh variable", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_9 = BoolOption(name="var8", doc="the eighth variable", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4, option_5, option_6, option_7, option_8, option_9], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4, option_5, option_6, option_7, option_8, option_9], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/01_6boolean_multi/tiramisu/multi.py b/tests/dictionaries/01_6boolean_multi/tiramisu/multi.py index 813d0adc3..613b6421f 100644 --- a/tests/dictionaries/01_6boolean_multi/tiramisu/multi.py +++ b/tests/dictionaries/01_6boolean_multi/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -14,7 +18,7 @@ option_7 = BoolOption(name="var5", doc="the fifth variable", multi=True, default option_8 = BoolOption(name="var6", doc="the sixth variable", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_9 = BoolOption(name="var7", doc="the seventh variable", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_10 = BoolOption(name="var8", doc="the eighth variable", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5, option_6, option_7, option_8, option_9, option_10], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5, option_6, option_7, option_8, option_9, option_10], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_13 = BoolOption(name="var1", doc="the first variable", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_14 = BoolOption(name="var2", doc="the second variable", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) @@ -24,6 +28,6 @@ option_17 = BoolOption(name="var5", doc="the fifth variable", multi=True, defaul option_18 = BoolOption(name="var6", doc="the sixth variable", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_19 = BoolOption(name="var7", doc="the seventh variable", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_20 = BoolOption(name="var8", doc="the eighth variable", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", children=[option_13, option_14, option_15, option_16, option_17, option_18, option_19, option_20], properties=frozenset({"standard"})) +optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_13, option_14, option_15, option_16, option_17, option_18, option_19, option_20], properties=frozenset({"standard"})) optiondescription_11 = OptionDescription(name="2", doc="2", children=[optiondescription_12], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_11]) diff --git a/tests/dictionaries/01_6custom_multi/tiramisu/base.py b/tests/dictionaries/01_6custom_multi/tiramisu/base.py index 5a64b6a2c..ab105ac57 100644 --- a/tests/dictionaries/01_6custom_multi/tiramisu/base.py +++ b/tests/dictionaries/01_6custom_multi/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = CustomOption(name="custom1", doc="a first custom variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'custom'}) option_3 = CustomOption(name="custom2", doc="a second custom variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'custom'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/01_6custom_multi/tiramisu/multi.py b/tests/dictionaries/01_6custom_multi/tiramisu/multi.py index d22cc507a..14e10aebb 100644 --- a/tests/dictionaries/01_6custom_multi/tiramisu/multi.py +++ b/tests/dictionaries/01_6custom_multi/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = CustomOption(name="custom1", doc="a first custom variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'custom'}) option_4 = CustomOption(name="custom2", doc="a second custom variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'custom'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = CustomOption(name="custom1", doc="a first custom variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'custom'}) option_8 = CustomOption(name="custom2", doc="a second custom variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'custom'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/01_6float_multi/tiramisu/base.py b/tests/dictionaries/01_6float_multi/tiramisu/base.py index 8a09cb489..b554a28d5 100644 --- a/tests/dictionaries/01_6float_multi/tiramisu/base.py +++ b/tests/dictionaries/01_6float_multi/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -14,5 +18,5 @@ option_6 = FloatOption(name="var5", doc="the fifth variable", multi=True, defaul option_7 = FloatOption(name="var6", doc="the sixth variable", multi=True, default=[10.1], default_multi=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_8 = FloatOption(name="var7", doc="the seventh variable", multi=True, default=[0.0], default_multi=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_9 = FloatOption(name="var8", doc="the eighth variable", multi=True, default=[0.0], default_multi=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4, option_5, option_6, option_7, option_8, option_9], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4, option_5, option_6, option_7, option_8, option_9], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/01_6float_multi/tiramisu/multi.py b/tests/dictionaries/01_6float_multi/tiramisu/multi.py index fca955a5c..d6c3b944f 100644 --- a/tests/dictionaries/01_6float_multi/tiramisu/multi.py +++ b/tests/dictionaries/01_6float_multi/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -14,7 +18,7 @@ option_7 = FloatOption(name="var5", doc="the fifth variable", multi=True, defaul option_8 = FloatOption(name="var6", doc="the sixth variable", multi=True, default=[10.1], default_multi=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_9 = FloatOption(name="var7", doc="the seventh variable", multi=True, default=[0.0], default_multi=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_10 = FloatOption(name="var8", doc="the eighth variable", multi=True, default=[0.0], default_multi=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5, option_6, option_7, option_8, option_9, option_10], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5, option_6, option_7, option_8, option_9, option_10], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_13 = FloatOption(name="var1", doc="the first variable", multi=True, default=[0.0], default_multi=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_14 = FloatOption(name="var2", doc="the second variable", multi=True, default=[0.0], default_multi=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) @@ -24,6 +28,6 @@ option_17 = FloatOption(name="var5", doc="the fifth variable", multi=True, defau option_18 = FloatOption(name="var6", doc="the sixth variable", multi=True, default=[10.1], default_multi=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_19 = FloatOption(name="var7", doc="the seventh variable", multi=True, default=[0.0], default_multi=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) option_20 = FloatOption(name="var8", doc="the eighth variable", multi=True, default=[0.0], default_multi=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", children=[option_13, option_14, option_15, option_16, option_17, option_18, option_19, option_20], properties=frozenset({"standard"})) +optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_13, option_14, option_15, option_16, option_17, option_18, option_19, option_20], properties=frozenset({"standard"})) optiondescription_11 = OptionDescription(name="2", doc="2", children=[optiondescription_12], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_11]) diff --git a/tests/dictionaries/01_6number_multi/tiramisu/base.py b/tests/dictionaries/01_6number_multi/tiramisu/base.py index 54ef57aaa..c897d1729 100644 --- a/tests/dictionaries/01_6number_multi/tiramisu/base.py +++ b/tests/dictionaries/01_6number_multi/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -14,5 +18,5 @@ option_6 = IntOption(name="var5", doc="the fifth variable", multi=True, default= option_7 = IntOption(name="var6", doc="the sixth variable", multi=True, default=[10], default_multi=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_8 = IntOption(name="var7", doc="the seventh variable", multi=True, default=[0], default_multi=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_9 = IntOption(name="var8", doc="the eighth variable", multi=True, default=[0], default_multi=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4, option_5, option_6, option_7, option_8, option_9], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4, option_5, option_6, option_7, option_8, option_9], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/01_6number_multi/tiramisu/multi.py b/tests/dictionaries/01_6number_multi/tiramisu/multi.py index 19c586638..cd2a1178a 100644 --- a/tests/dictionaries/01_6number_multi/tiramisu/multi.py +++ b/tests/dictionaries/01_6number_multi/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -14,7 +18,7 @@ option_7 = IntOption(name="var5", doc="the fifth variable", multi=True, default= option_8 = IntOption(name="var6", doc="the sixth variable", multi=True, default=[10], default_multi=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_9 = IntOption(name="var7", doc="the seventh variable", multi=True, default=[0], default_multi=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_10 = IntOption(name="var8", doc="the eighth variable", multi=True, default=[0], default_multi=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5, option_6, option_7, option_8, option_9, option_10], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5, option_6, option_7, option_8, option_9, option_10], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_13 = IntOption(name="var1", doc="the first variable", multi=True, default=[0], default_multi=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_14 = IntOption(name="var2", doc="the second variable", multi=True, default=[0], default_multi=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) @@ -24,6 +28,6 @@ option_17 = IntOption(name="var5", doc="the fifth variable", multi=True, default option_18 = IntOption(name="var6", doc="the sixth variable", multi=True, default=[10], default_multi=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_19 = IntOption(name="var7", doc="the seventh variable", multi=True, default=[0], default_multi=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_20 = IntOption(name="var8", doc="the eighth variable", multi=True, default=[0], default_multi=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", children=[option_13, option_14, option_15, option_16, option_17, option_18, option_19, option_20], properties=frozenset({"standard"})) +optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_13, option_14, option_15, option_16, option_17, option_18, option_19, option_20], properties=frozenset({"standard"})) optiondescription_11 = OptionDescription(name="2", doc="2", children=[optiondescription_12], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_11]) diff --git a/tests/dictionaries/01_6string_empty/tiramisu/base.py b/tests/dictionaries/01_6string_empty/tiramisu/base.py index 1a27ff410..3fbc6deab 100644 --- a/tests/dictionaries/01_6string_empty/tiramisu/base.py +++ b/tests/dictionaries/01_6string_empty/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var1", doc="the second variable", multi=True, default=["value", "None"], default_multi="value", properties=frozenset({"mandatory", "notempty", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/01_6string_empty/tiramisu/multi.py b/tests/dictionaries/01_6string_empty/tiramisu/multi.py index f7af7dd39..3e7fd699d 100644 --- a/tests/dictionaries/01_6string_empty/tiramisu/multi.py +++ b/tests/dictionaries/01_6string_empty/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="the second variable", multi=True, default=["value", "None"], default_multi="value", properties=frozenset({"mandatory", "notempty", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="var1", doc="the second variable", multi=True, default=["value", "None"], default_multi="value", properties=frozenset({"mandatory", "notempty", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/01_6string_multi/tiramisu/base.py b/tests/dictionaries/01_6string_multi/tiramisu/base.py index 6f208c590..107032a5f 100644 --- a/tests/dictionaries/01_6string_multi/tiramisu/base.py +++ b/tests/dictionaries/01_6string_multi/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -14,5 +18,5 @@ option_6 = StrOption(name="var5", doc="the fifth variable", multi=True, default= option_7 = StrOption(name="var6", doc="the sixth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="var7", doc="the seventh variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_9 = StrOption(name="var8", doc="the eighth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4, option_5, option_6, option_7, option_8, option_9], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4, option_5, option_6, option_7, option_8, option_9], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/01_6string_multi/tiramisu/multi.py b/tests/dictionaries/01_6string_multi/tiramisu/multi.py index 8217b9169..25a0ede62 100644 --- a/tests/dictionaries/01_6string_multi/tiramisu/multi.py +++ b/tests/dictionaries/01_6string_multi/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -14,7 +18,7 @@ option_7 = StrOption(name="var5", doc="the fifth variable", multi=True, default= option_8 = StrOption(name="var6", doc="the sixth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_9 = StrOption(name="var7", doc="the seventh variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = StrOption(name="var8", doc="the eighth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5, option_6, option_7, option_8, option_9, option_10], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5, option_6, option_7, option_8, option_9, option_10], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_13 = StrOption(name="var1", doc="the first variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_14 = StrOption(name="var2", doc="the second variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) @@ -24,6 +28,6 @@ option_17 = StrOption(name="var5", doc="the fifth variable", multi=True, default option_18 = StrOption(name="var6", doc="the sixth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_19 = StrOption(name="var7", doc="the seventh variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_20 = StrOption(name="var8", doc="the eighth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", children=[option_13, option_14, option_15, option_16, option_17, option_18, option_19, option_20], properties=frozenset({"basic"})) +optiondescription_12 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_13, option_14, option_15, option_16, option_17, option_18, option_19, option_20], properties=frozenset({"basic"})) optiondescription_11 = OptionDescription(name="2", doc="2", children=[optiondescription_12], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_11]) diff --git a/tests/dictionaries/01_7value_multi_doublequote/tiramisu/base.py b/tests/dictionaries/01_7value_multi_doublequote/tiramisu/base.py index 51d8a47bf..3307ae18b 100644 --- a/tests/dictionaries/01_7value_multi_doublequote/tiramisu/base.py +++ b/tests/dictionaries/01_7value_multi_doublequote/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="variable", doc="a variable", multi=True, default=["quote\""], default_multi="quote\"", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/01_7value_multi_doublequote/tiramisu/multi.py b/tests/dictionaries/01_7value_multi_doublequote/tiramisu/multi.py index 925bcf97f..c7c611e9a 100644 --- a/tests/dictionaries/01_7value_multi_doublequote/tiramisu/multi.py +++ b/tests/dictionaries/01_7value_multi_doublequote/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="a variable", multi=True, default=["quote\""], default_multi="quote\"", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", multi=True, default=["quote\""], default_multi="quote\"", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/01_7value_multi_doublequote2/tiramisu/base.py b/tests/dictionaries/01_7value_multi_doublequote2/tiramisu/base.py index 0d2845cc2..f40dda116 100644 --- a/tests/dictionaries/01_7value_multi_doublequote2/tiramisu/base.py +++ b/tests/dictionaries/01_7value_multi_doublequote2/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="variable", doc="a variable", multi=True, default=["quote'\""], default_multi="quote'\"", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/01_7value_multi_doublequote2/tiramisu/multi.py b/tests/dictionaries/01_7value_multi_doublequote2/tiramisu/multi.py index 8634250c0..8ed055404 100644 --- a/tests/dictionaries/01_7value_multi_doublequote2/tiramisu/multi.py +++ b/tests/dictionaries/01_7value_multi_doublequote2/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="a variable", multi=True, default=["quote'\""], default_multi="quote'\"", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", multi=True, default=["quote'\""], default_multi="quote'\"", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/01_7value_multi_quote/tiramisu/base.py b/tests/dictionaries/01_7value_multi_quote/tiramisu/base.py index 2962c4131..4762fa6a1 100644 --- a/tests/dictionaries/01_7value_multi_quote/tiramisu/base.py +++ b/tests/dictionaries/01_7value_multi_quote/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="variable", doc="a variable", multi=True, default=["quote'"], default_multi="quote'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/01_7value_multi_quote/tiramisu/multi.py b/tests/dictionaries/01_7value_multi_quote/tiramisu/multi.py index ce2b99725..04446c65a 100644 --- a/tests/dictionaries/01_7value_multi_quote/tiramisu/multi.py +++ b/tests/dictionaries/01_7value_multi_quote/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="a variable", multi=True, default=["quote'"], default_multi="quote'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", multi=True, default=["quote'"], default_multi="quote'", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/01_8calculation_information_multi/tiramisu/base.py b/tests/dictionaries/01_8calculation_information_multi/tiramisu/base.py index 99eefc7f8..1aad8a189 100644 --- a/tests/dictionaries/01_8calculation_information_multi/tiramisu/base.py +++ b/tests/dictionaries/01_8calculation_information_multi/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.variable'] = "{{test_information }}\n" option_2 = StrOption(name="variable", doc="a variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/01_8calculation_information_multi/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.variable"), 'test_information': ParamInformation("test_information", [])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/01_8calculation_information_multi/tiramisu/multi.py b/tests/dictionaries/01_8calculation_information_multi/tiramisu/multi.py index fdc2c8dec..0eb80f9af 100644 --- a/tests/dictionaries/01_8calculation_information_multi/tiramisu/multi.py +++ b/tests/dictionaries/01_8calculation_information_multi/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_1.rougail.variable'] = "{{test_information }}\n" dict_env['default_2.rougail.variable'] = "{{test_information }}\n" option_3 = StrOption(name="variable", doc="a variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/01_8calculation_information_multi/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.variable"), 'test_information': ParamInformation("test_information", [])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/01_8calculation_information_multi/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.variable"), 'test_information': ParamInformation("test_information", [])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/01_9choice_variable_multi/tiramisu/base.py b/tests/dictionaries/01_9choice_variable_multi/tiramisu/base.py index 634013000..c850bdf4f 100644 --- a/tests/dictionaries/01_9choice_variable_multi/tiramisu/base.py +++ b/tests/dictionaries/01_9choice_variable_multi/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="variable1", doc="a first variable", multi=True, default=["a", "b", "c"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = ChoiceOption(name="variable2", doc="a second variable", values=Calculation(func['calc_value'], Params((ParamOption(option_2)))), properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/01_9choice_variable_multi/tiramisu/multi.py b/tests/dictionaries/01_9choice_variable_multi/tiramisu/multi.py index 683745a80..3bdd949cd 100644 --- a/tests/dictionaries/01_9choice_variable_multi/tiramisu/multi.py +++ b/tests/dictionaries/01_9choice_variable_multi/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable1", doc="a first variable", multi=True, default=["a", "b", "c"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = ChoiceOption(name="variable2", doc="a second variable", values=Calculation(func['calc_value'], Params((ParamOption(option_3)))), properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = StrOption(name="variable1", doc="a first variable", multi=True, default=["a", "b", "c"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = ChoiceOption(name="variable2", doc="a second variable", values=Calculation(func['calc_value'], Params((ParamOption(option_7)))), properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/04_0type_param/tiramisu/base.py b/tests/dictionaries/04_0type_param/tiramisu/base.py index 9f2efb0e1..3fa961ab2 100644 --- a/tests/dictionaries/04_0type_param/tiramisu/base.py +++ b/tests/dictionaries/04_0type_param/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = IntOption(name="int", doc="A limited number", min_number=0, max_number=100, properties=frozenset({"basic", "mandatory"}), informations={'type': 'number'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_0type_param/tiramisu/multi.py b/tests/dictionaries/04_0type_param/tiramisu/multi.py index 7f025ec93..5b1cb4252 100644 --- a/tests/dictionaries/04_0type_param/tiramisu/multi.py +++ b/tests/dictionaries/04_0type_param/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = IntOption(name="int", doc="A limited number", min_number=0, max_number=100, properties=frozenset({"basic", "mandatory"}), informations={'type': 'number'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_6 = IntOption(name="int", doc="A limited number", min_number=0, max_number=100, properties=frozenset({"basic", "mandatory"}), informations={'type': 'number'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"basic"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/04_1auto_save/tiramisu/base.py b/tests/dictionaries/04_1auto_save/tiramisu/base.py index ddb1370c8..c976a8c46 100644 --- a/tests/dictionaries/04_1auto_save/tiramisu/base.py +++ b/tests/dictionaries/04_1auto_save/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="variable", doc="an auto save variable", default="no", properties=frozenset({"basic", "force_store_value", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_1auto_save/tiramisu/multi.py b/tests/dictionaries/04_1auto_save/tiramisu/multi.py index 2f769d816..04503f9f7 100644 --- a/tests/dictionaries/04_1auto_save/tiramisu/multi.py +++ b/tests/dictionaries/04_1auto_save/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="an auto save variable", default="no", properties=frozenset({"basic", "force_store_value", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_6 = StrOption(name="variable", doc="an auto save variable", default="no", properties=frozenset({"basic", "force_store_value", "mandatory"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"basic"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/04_1auto_save_and_calculated/tiramisu/base.py b/tests/dictionaries/04_1auto_save_and_calculated/tiramisu/base.py index 773a8f055..b928a0423 100644 --- a/tests/dictionaries/04_1auto_save_and_calculated/tiramisu/base.py +++ b/tests/dictionaries/04_1auto_save_and_calculated/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var2", doc="a second variable", default=Calculation(func['calc_value'], Params((ParamOption(option_2)))), properties=frozenset({"basic", "force_store_value", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_1auto_save_and_calculated/tiramisu/multi.py b/tests/dictionaries/04_1auto_save_and_calculated/tiramisu/multi.py index 2c44d14d0..30f18927f 100644 --- a/tests/dictionaries/04_1auto_save_and_calculated/tiramisu/multi.py +++ b/tests/dictionaries/04_1auto_save_and_calculated/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a second variable", default=Calculation(func['calc_value'], Params((ParamOption(option_3)))), properties=frozenset({"basic", "force_store_value", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="var2", doc="a second variable", default=Calculation(func['calc_value'], Params((ParamOption(option_7)))), properties=frozenset({"basic", "force_store_value", "mandatory"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/04_1auto_save_and_calculated_hidden/tiramisu/base.py b/tests/dictionaries/04_1auto_save_and_calculated_hidden/tiramisu/base.py index 845663338..6ac33d095 100644 --- a/tests/dictionaries/04_1auto_save_and_calculated_hidden/tiramisu/base.py +++ b/tests/dictionaries/04_1auto_save_and_calculated_hidden/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,5 +15,5 @@ dict_env['hidden_rougail.var2'] = "{% if _.var1 == \"yes\" %}\n_.var1 is yes\n{% dict_env['frozen_rougail.var2'] = "{% if _.var1 == \"yes\" %}\n_.var1 is yes\n{% endif %}\n" option_2 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_1auto_save_and_calculated_hidden/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2")})), properties=frozenset({"basic", "force_store_value", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_1auto_save_and_calculated_hidden/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var1': ParamOption(option_2)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_1auto_save_and_calculated_hidden/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var1': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_1auto_save_and_calculated_hidden/tiramisu/multi.py b/tests/dictionaries/04_1auto_save_and_calculated_hidden/tiramisu/multi.py index 3d1d89dbc..fb0de0aaf 100644 --- a/tests/dictionaries/04_1auto_save_and_calculated_hidden/tiramisu/multi.py +++ b/tests/dictionaries/04_1auto_save_and_calculated_hidden/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -14,10 +18,10 @@ dict_env['hidden_2.rougail.var2'] = "{% if _.var1 == \"yes\" %}\n_.var1 is yes\n dict_env['frozen_2.rougail.var2'] = "{% if _.var1 == \"yes\" %}\n_.var1 is yes\n{% endif %}\n" option_3 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_1auto_save_and_calculated_hidden/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2")})), properties=frozenset({"basic", "force_store_value", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_1auto_save_and_calculated_hidden/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var1': ParamOption(option_3)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_1auto_save_and_calculated_hidden/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var1': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_1auto_save_and_calculated_hidden/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2")})), properties=frozenset({"basic", "force_store_value", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_1auto_save_and_calculated_hidden/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var1': ParamOption(option_7)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_1auto_save_and_calculated_hidden/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var1': ParamOption(option_7)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/base.py b/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/base.py index 349f0eebb..59b182670 100644 --- a/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/base.py +++ b/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_2 = StrOption(name="var", doc="autosave variable", default="yes", properties=frozenset({"basic", "force_store_value", "frozen", "hidden", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"basic"})) +option_2 = StrOption(name="var", doc="autosave variable", default="yes", properties=frozenset({"basic", "force_store_value", "frozen", "hidden"}), informations={'type': 'string'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/multi.py b/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/multi.py index 0d651b7bc..556720e73 100644 --- a/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/multi.py +++ b/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_3 = StrOption(name="var", doc="autosave variable", default="yes", properties=frozenset({"basic", "force_store_value", "frozen", "hidden", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"basic"})) +option_3 = StrOption(name="var", doc="autosave variable", default="yes", properties=frozenset({"basic", "force_store_value", "frozen", "hidden"}), informations={'type': 'string'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) -option_6 = StrOption(name="var", doc="autosave variable", default="yes", properties=frozenset({"basic", "force_store_value", "frozen", "hidden", "mandatory"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"basic"})) +option_6 = StrOption(name="var", doc="autosave variable", default="yes", properties=frozenset({"basic", "force_store_value", "frozen", "hidden"}), informations={'type': 'string'}) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/no_namespace.py b/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/no_namespace.py index 9dd4f3b42..d99eb9cff 100644 --- a/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/no_namespace.py +++ b/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/no_namespace.py @@ -6,5 +6,5 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_1 = StrOption(name="var", doc="autosave variable", default="yes", properties=frozenset({"basic", "force_store_value", "frozen", "hidden", "mandatory"}), informations={'type': 'string'}) +option_1 = StrOption(name="var", doc="autosave variable", default="yes", properties=frozenset({"basic", "force_store_value", "frozen", "hidden"}), informations={'type': 'string'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) diff --git a/tests/dictionaries/04_5disabled_calculation/tiramisu/base.py b/tests/dictionaries/04_5disabled_calculation/tiramisu/base.py index e7f3c6753..88249b497 100644 --- a/tests/dictionaries/04_5disabled_calculation/tiramisu/base.py +++ b/tests/dictionaries/04_5disabled_calculation/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,5 +15,5 @@ dict_env['disabled_rougail.variable2'] = "{% if _.condition == \"yes\" %}\ncondi option_2 = StrOption(name="condition", doc="a conditional variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="variable1", doc="a first variable", properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.variable1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("rougail.variable1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_4 = StrOption(name="variable2", doc="a second variable", properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.variable2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("rougail.variable2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5disabled_calculation/tiramisu/multi.py b/tests/dictionaries/04_5disabled_calculation/tiramisu/multi.py index 7e9b8d174..5c0b647a6 100644 --- a/tests/dictionaries/04_5disabled_calculation/tiramisu/multi.py +++ b/tests/dictionaries/04_5disabled_calculation/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -13,11 +17,11 @@ dict_env['disabled_2.rougail.variable2'] = "{% if _.condition == \"yes\" %}\ncon option_3 = StrOption(name="condition", doc="a conditional variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="variable1", doc="a first variable", properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_1.rougail.variable1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.variable1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_5 = StrOption(name="variable2", doc="a second variable", properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_1.rougail.variable2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.variable2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="condition", doc="a conditional variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_9 = StrOption(name="variable1", doc="a first variable", properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_2.rougail.variable1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.variable1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_10 = StrOption(name="variable2", doc="a second variable", properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_2.rougail.variable2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.variable2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"basic"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/04_5disabled_calculation_default/tiramisu/base.py b/tests/dictionaries/04_5disabled_calculation_default/tiramisu/base.py index 09d8a0819..e0044a073 100644 --- a/tests/dictionaries/04_5disabled_calculation_default/tiramisu/base.py +++ b/tests/dictionaries/04_5disabled_calculation_default/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -13,5 +17,5 @@ dict_env['disabled_rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncond option_2 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var1", doc="a first variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_default/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var1"), '_.condition': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_default/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_default/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2"), 'rougail.condition': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_default/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5disabled_calculation_default/tiramisu/multi.py b/tests/dictionaries/04_5disabled_calculation_default/tiramisu/multi.py index 0f0b81917..37f606d00 100644 --- a/tests/dictionaries/04_5disabled_calculation_default/tiramisu/multi.py +++ b/tests/dictionaries/04_5disabled_calculation_default/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -17,11 +21,11 @@ dict_env['disabled_2.rougail.var2'] = "{% if rougail.condition == \"yes\" %}\nco option_3 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var1", doc="a first variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_default/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var1"), '_.condition': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_default/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_5 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_default/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'rougail.condition': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_default/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_9 = StrOption(name="var1", doc="a first variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_default/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var1"), '_.condition': ParamOption(option_8)})), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_default/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_10 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_default/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'rougail.condition': ParamOption(option_8)})), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_default/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml b/tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml index e35a10463..bc444e1b1 100644 --- a/tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml @@ -15,6 +15,7 @@ var1: variable: _.unknown optional: true description: calculation from an unknown variable + mandatory: false var2: description: a second variable hidden: @@ -29,3 +30,4 @@ var2: variable: _.condition optional: true description: calculation from an condition variable + mandatory: false diff --git a/tests/dictionaries/04_5disabled_calculation_optional/makedict/mandatory.json b/tests/dictionaries/04_5disabled_calculation_optional/makedict/mandatory.json index 8c67ac5f8..0637a088a 100644 --- a/tests/dictionaries/04_5disabled_calculation_optional/makedict/mandatory.json +++ b/tests/dictionaries/04_5disabled_calculation_optional/makedict/mandatory.json @@ -1 +1 @@ -["rougail.var1", "rougail.var2"] \ No newline at end of file +[] \ No newline at end of file diff --git a/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/base.py b/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/base.py index 55c16f21b..4bf1291d6 100644 --- a/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/base.py +++ b/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,7 +15,7 @@ dict_env['frozen_rougail.var1'] = "{% if unknown is not defined %}\nunknown is u dict_env['hidden_rougail.var2'] = "{% if condition is not defined %}\ncondition is undefined\n{% elif condition == \"no\" %}\ncondition is no\n{% endif %}\n" dict_env['frozen_rougail.var2'] = "{% if condition is not defined %}\ncondition is undefined\n{% elif condition == \"no\" %}\ncondition is no\n{% endif %}\n" option_2 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_3 = StrOption(name="var1", doc="a first variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -option_4 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.var2"), 'condition': ParamOption(option_2), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.var2"), 'condition': ParamOption(option_2), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"basic"})) +option_3 = StrOption(name="var1", doc="a first variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_4 = StrOption(name="var2", doc="a second variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.var2"), 'condition': ParamOption(option_2), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.var2"), 'condition': ParamOption(option_2), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/multi.py b/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/multi.py index d3fcead00..fcd7775b3 100644 --- a/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/multi.py +++ b/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -15,13 +19,13 @@ dict_env['frozen_2.rougail.var1'] = "{% if unknown is not defined %}\nunknown is dict_env['hidden_2.rougail.var2'] = "{% if condition is not defined %}\ncondition is undefined\n{% elif condition == \"no\" %}\ncondition is no\n{% endif %}\n" dict_env['frozen_2.rougail.var2'] = "{% if condition is not defined %}\ncondition is undefined\n{% elif condition == \"no\" %}\ncondition is no\n{% endif %}\n" option_3 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var1", doc="a first variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -option_5 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var2"), 'condition': ParamOption(option_3), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var2"), 'condition': ParamOption(option_3), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) +option_4 = StrOption(name="var1", doc="a first variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_5 = StrOption(name="var2", doc="a second variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var2"), 'condition': ParamOption(option_3), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var2"), 'condition': ParamOption(option_3), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_9 = StrOption(name="var1", doc="a first variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -option_10 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var2"), 'condition': ParamOption(option_8), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var2"), 'condition': ParamOption(option_8), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"basic"})) -optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) +option_9 = StrOption(name="var1", doc="a first variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_10 = StrOption(name="var2", doc="a second variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var2"), 'condition': ParamOption(option_8), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var2"), 'condition': ParamOption(option_8), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/no_namespace.py b/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/no_namespace.py index 4df21dbd3..114a0542a 100644 --- a/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/no_namespace.py +++ b/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/no_namespace.py @@ -11,6 +11,6 @@ dict_env['frozen_var1'] = "{% if unknown is not defined %}\nunknown is undefined dict_env['hidden_var2'] = "{% if condition is not defined %}\ncondition is undefined\n{% elif condition == \"no\" %}\ncondition is no\n{% endif %}\n" dict_env['frozen_var2'] = "{% if condition is not defined %}\ncondition is undefined\n{% elif condition == \"no\" %}\ncondition is no\n{% endif %}\n" option_1 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_2 = StrOption(name="var1", doc="a first variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -option_3 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("var2"), 'condition': ParamOption(option_1), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("var2"), 'condition': ParamOption(option_1), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_2 = StrOption(name="var1", doc="a first variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("var1"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_3 = StrOption(name="var2", doc="a second variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("var2"), 'condition': ParamOption(option_1), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5disabled_calculation_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("var2"), 'condition': ParamOption(option_1), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_2, option_3]) diff --git a/tests/dictionaries/04_5disabled_calculation_variable/tiramisu/base.py b/tests/dictionaries/04_5disabled_calculation_variable/tiramisu/base.py index 23453fff8..ed4f0b342 100644 --- a/tests/dictionaries/04_5disabled_calculation_variable/tiramisu/base.py +++ b/tests/dictionaries/04_5disabled_calculation_variable/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = BoolOption(name="condition", doc="a condition", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_3 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_2)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5disabled_calculation_variable/tiramisu/multi.py b/tests/dictionaries/04_5disabled_calculation_variable/tiramisu/multi.py index 5823ef0eb..22be73757 100644 --- a/tests/dictionaries/04_5disabled_calculation_variable/tiramisu/multi.py +++ b/tests/dictionaries/04_5disabled_calculation_variable/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = BoolOption(name="condition", doc="a condition", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_4 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_3)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = BoolOption(name="condition", doc="a condition", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_8 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_7)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/04_5disabled_calculation_variable2/tiramisu/base.py b/tests/dictionaries/04_5disabled_calculation_variable2/tiramisu/base.py index 99523f6c4..b9a38a85d 100644 --- a/tests/dictionaries/04_5disabled_calculation_variable2/tiramisu/base.py +++ b/tests/dictionaries/04_5disabled_calculation_variable2/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = BoolOption(name="condition", doc="a condition", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_3 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_2)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5disabled_calculation_variable2/tiramisu/multi.py b/tests/dictionaries/04_5disabled_calculation_variable2/tiramisu/multi.py index d54c36bac..fdbca1916 100644 --- a/tests/dictionaries/04_5disabled_calculation_variable2/tiramisu/multi.py +++ b/tests/dictionaries/04_5disabled_calculation_variable2/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = BoolOption(name="condition", doc="a condition", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_4 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_3)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = BoolOption(name="condition", doc="a condition", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_8 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_7)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/04_5disabled_calculation_variable3/tiramisu/base.py b/tests/dictionaries/04_5disabled_calculation_variable3/tiramisu/base.py index 97c1aabb0..74b5853ab 100644 --- a/tests/dictionaries/04_5disabled_calculation_variable3/tiramisu/base.py +++ b/tests/dictionaries/04_5disabled_calculation_variable3/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="condition", doc="a condition", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_2)), kwargs={'when': ParamValue("yes"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5disabled_calculation_variable3/tiramisu/multi.py b/tests/dictionaries/04_5disabled_calculation_variable3/tiramisu/multi.py index 27a5501d0..325b3f3a4 100644 --- a/tests/dictionaries/04_5disabled_calculation_variable3/tiramisu/multi.py +++ b/tests/dictionaries/04_5disabled_calculation_variable3/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="condition", doc="a condition", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_3)), kwargs={'when': ParamValue("yes"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = StrOption(name="condition", doc="a condition", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_7)), kwargs={'when': ParamValue("yes"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/04_5disabled_calculation_variable4/tiramisu/base.py b/tests/dictionaries/04_5disabled_calculation_variable4/tiramisu/base.py index f5fec12e4..40cd5bb33 100644 --- a/tests/dictionaries/04_5disabled_calculation_variable4/tiramisu/base.py +++ b/tests/dictionaries/04_5disabled_calculation_variable4/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="condition", doc="a condition", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_2)), kwargs={'when': ParamValue("yes"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5disabled_calculation_variable4/tiramisu/multi.py b/tests/dictionaries/04_5disabled_calculation_variable4/tiramisu/multi.py index a7ae4322a..36856ae3c 100644 --- a/tests/dictionaries/04_5disabled_calculation_variable4/tiramisu/multi.py +++ b/tests/dictionaries/04_5disabled_calculation_variable4/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="condition", doc="a condition", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_3)), kwargs={'when': ParamValue("yes"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = StrOption(name="condition", doc="a condition", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_7)), kwargs={'when': ParamValue("yes"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/04_5hidden_calculation/tiramisu/base.py b/tests/dictionaries/04_5hidden_calculation/tiramisu/base.py index 5536e896c..3b74b4f9b 100644 --- a/tests/dictionaries/04_5hidden_calculation/tiramisu/base.py +++ b/tests/dictionaries/04_5hidden_calculation/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -13,5 +17,5 @@ dict_env['frozen_rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncondit option_2 = StrOption(name="condition", doc="the condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5hidden_calculation/tiramisu/multi.py b/tests/dictionaries/04_5hidden_calculation/tiramisu/multi.py index 1857ca371..a2f397f80 100644 --- a/tests/dictionaries/04_5hidden_calculation/tiramisu/multi.py +++ b/tests/dictionaries/04_5hidden_calculation/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -17,11 +21,11 @@ dict_env['frozen_2.rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncond option_3 = StrOption(name="condition", doc="the condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_5 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="condition", doc="the condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_9 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_10 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/04_5hidden_calculation2/tiramisu/base.py b/tests/dictionaries/04_5hidden_calculation2/tiramisu/base.py index 3d39aec16..6c6b58901 100644 --- a/tests/dictionaries/04_5hidden_calculation2/tiramisu/base.py +++ b/tests/dictionaries/04_5hidden_calculation2/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -15,5 +19,5 @@ dict_env['frozen_rougail.var2'] = "{% if rougail.condition != \"yes\" %}\ncondit option_2 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var1", doc="a first variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var1"), '_.condition': ParamOption(option_2)})), properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2"), 'rougail.condition': ParamOption(option_2)})), properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5hidden_calculation2/tiramisu/multi.py b/tests/dictionaries/04_5hidden_calculation2/tiramisu/multi.py index c2087c173..3b0fc6d19 100644 --- a/tests/dictionaries/04_5hidden_calculation2/tiramisu/multi.py +++ b/tests/dictionaries/04_5hidden_calculation2/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -21,11 +25,11 @@ dict_env['frozen_2.rougail.var2'] = "{% if rougail.condition != \"yes\" %}\ncond option_3 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var1", doc="a first variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var1"), '_.condition': ParamOption(option_3)})), properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_5 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'rougail.condition': ParamOption(option_3)})), properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_9 = StrOption(name="var1", doc="a first variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var1"), '_.condition': ParamOption(option_8)})), properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_10 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'rougail.condition': ParamOption(option_8)})), properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/04_5hidden_calculation_default_calculation/tiramisu/base.py b/tests/dictionaries/04_5hidden_calculation_default_calculation/tiramisu/base.py index 3e7a0f2e2..a0963c656 100644 --- a/tests/dictionaries/04_5hidden_calculation_default_calculation/tiramisu/base.py +++ b/tests/dictionaries/04_5hidden_calculation_default_calculation/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -15,5 +19,5 @@ dict_env['frozen_rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncondit option_2 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var1", doc="a first variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var1"), '_.condition': ParamOption(option_2)})), properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2"), 'rougail.condition': ParamOption(option_2)})), properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5hidden_calculation_default_calculation/tiramisu/multi.py b/tests/dictionaries/04_5hidden_calculation_default_calculation/tiramisu/multi.py index 37b44513f..cb1fd6d5d 100644 --- a/tests/dictionaries/04_5hidden_calculation_default_calculation/tiramisu/multi.py +++ b/tests/dictionaries/04_5hidden_calculation_default_calculation/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -21,11 +25,11 @@ dict_env['frozen_2.rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncond option_3 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var1", doc="a first variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var1"), '_.condition': ParamOption(option_3)})), properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_5 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'rougail.condition': ParamOption(option_3)})), properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_9 = StrOption(name="var1", doc="a first variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var1"), '_.condition': ParamOption(option_8)})), properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_10 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'rougail.condition': ParamOption(option_8)})), properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5hidden_calculation_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/04_5validators/tiramisu/base.py b/tests/dictionaries/04_5validators/tiramisu/base.py index 19376cf11..7b7d38fa2 100644 --- a/tests/dictionaries/04_5validators/tiramisu/base.py +++ b/tests/dictionaries/04_5validators/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['validators_rougail.int'] = "{% if _.int > 100 %}\nvalue is too high\n{% endif %}\n" option_2 = IntOption(name="int", doc="A number", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_rougail.int"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5validators/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("rougail.int"), '_.int': ParamSelfOption(whole=False)}))], properties=frozenset({"basic", "mandatory"}), informations={'type': 'number'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5validators/tiramisu/multi.py b/tests/dictionaries/04_5validators/tiramisu/multi.py index e391120d8..a29dac726 100644 --- a/tests/dictionaries/04_5validators/tiramisu/multi.py +++ b/tests/dictionaries/04_5validators/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['validators_1.rougail.int'] = "{% if _.int > 100 %}\nvalue is too high\n{% endif %}\n" dict_env['validators_2.rougail.int'] = "{% if _.int > 100 %}\nvalue is too high\n{% endif %}\n" option_3 = IntOption(name="int", doc="A number", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_1.rougail.int"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5validators/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("1.rougail.int"), '_.int': ParamSelfOption(whole=False)}))], properties=frozenset({"basic", "mandatory"}), informations={'type': 'number'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_6 = IntOption(name="int", doc="A number", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_2.rougail.int"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5validators/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("2.rougail.int"), '_.int': ParamSelfOption(whole=False)}))], properties=frozenset({"basic", "mandatory"}), informations={'type': 'number'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"basic"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/04_5validators_differ/tiramisu/base.py b/tests/dictionaries/04_5validators_differ/tiramisu/base.py index afe9b5b93..e905a0667 100644 --- a/tests/dictionaries/04_5validators_differ/tiramisu/base.py +++ b/tests/dictionaries/04_5validators_differ/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['validators_rougail.var1'] = "{% if _.var1 == _.var2 %}\nvar1 must be different than var2\n{% endif %}\n" option_3 = StrOption(name="var2", doc="A second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_2 = StrOption(name="var1", doc="a first variable", default="oui", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5validators_differ/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("rougail.var1"), '_.var2': ParamOption(option_3), '_.var1': ParamSelfOption(whole=False)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('another_value',)}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5validators_differ/tiramisu/multi.py b/tests/dictionaries/04_5validators_differ/tiramisu/multi.py index 6dc97cc7f..8b5c1f8d7 100644 --- a/tests/dictionaries/04_5validators_differ/tiramisu/multi.py +++ b/tests/dictionaries/04_5validators_differ/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,10 +14,10 @@ dict_env['validators_1.rougail.var1'] = "{% if _.var1 == _.var2 %}\nvar1 must be dict_env['validators_2.rougail.var1'] = "{% if _.var1 == _.var2 %}\nvar1 must be different than var2\n{% endif %}\n" option_4 = StrOption(name="var2", doc="A second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var1", doc="a first variable", default="oui", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5validators_differ/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("1.rougail.var1"), '_.var2': ParamOption(option_4), '_.var1': ParamSelfOption(whole=False)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('another_value',)}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="var2", doc="A second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_7 = StrOption(name="var1", doc="a first variable", default="oui", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5validators_differ/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("2.rougail.var1"), '_.var2': ParamOption(option_8), '_.var1': ParamSelfOption(whole=False)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('another_value',)}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/04_5validators_multi/tiramisu/base.py b/tests/dictionaries/04_5validators_multi/tiramisu/base.py index f49ee2cd1..092edd4ea 100644 --- a/tests/dictionaries/04_5validators_multi/tiramisu/base.py +++ b/tests/dictionaries/04_5validators_multi/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['validators_rougail.var1'] = "{% if _.var1 | length > 9 %}\nlength must be less than 10\n{% endif %}\n" option_2 = StrOption(name="var1", doc="a second variable", multi=True, default=["no", "yes"], default_multi="no", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5validators_multi/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("rougail.var1"), '_.var1': ParamSelfOption(whole=False)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5validators_multi/tiramisu/multi.py b/tests/dictionaries/04_5validators_multi/tiramisu/multi.py index 48a1a3280..cdd9fcadd 100644 --- a/tests/dictionaries/04_5validators_multi/tiramisu/multi.py +++ b/tests/dictionaries/04_5validators_multi/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['validators_1.rougail.var1'] = "{% if _.var1 | length > 9 %}\nlength must be less than 10\n{% endif %}\n" dict_env['validators_2.rougail.var1'] = "{% if _.var1 | length > 9 %}\nlength must be less than 10\n{% endif %}\n" option_3 = StrOption(name="var1", doc="a second variable", multi=True, default=["no", "yes"], default_multi="no", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5validators_multi/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("1.rougail.var1"), '_.var1': ParamSelfOption(whole=False)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="var1", doc="a second variable", multi=True, default=["no", "yes"], default_multi="no", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5validators_multi/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("2.rougail.var1"), '_.var1': ParamSelfOption(whole=False)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/04_5validators_multi2/tiramisu/base.py b/tests/dictionaries/04_5validators_multi2/tiramisu/base.py index 78e62357c..ca07bf559 100644 --- a/tests/dictionaries/04_5validators_multi2/tiramisu/base.py +++ b/tests/dictionaries/04_5validators_multi2/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['validators_rougail.var1'] = "{% if values | length > 2 %}\nlength must be less than 3\n{% endif %}\n" option_2 = StrOption(name="var1", doc="a second variable", multi=True, default=["no", "yes"], default_multi="no", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5validators_multi2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("rougail.var1"), 'values': ParamSelfOption(whole=True)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_5validators_multi2/tiramisu/multi.py b/tests/dictionaries/04_5validators_multi2/tiramisu/multi.py index 791c39080..bcc87d241 100644 --- a/tests/dictionaries/04_5validators_multi2/tiramisu/multi.py +++ b/tests/dictionaries/04_5validators_multi2/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['validators_1.rougail.var1'] = "{% if values | length > 2 %}\nlength must be less than 3\n{% endif %}\n" dict_env['validators_2.rougail.var1'] = "{% if values | length > 2 %}\nlength must be less than 3\n{% endif %}\n" option_3 = StrOption(name="var1", doc="a second variable", multi=True, default=["no", "yes"], default_multi="no", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_1.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5validators_multi2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("1.rougail.var1"), 'values': ParamSelfOption(whole=True)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="var1", doc="a second variable", multi=True, default=["no", "yes"], default_multi="no", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_2.rougail.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_5validators_multi2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("2.rougail.var1"), 'values': ParamSelfOption(whole=True)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/04_7validators_variable_optional/dictionaries/rougail/00-base.yml b/tests/dictionaries/04_7validators_variable_optional/dictionaries/rougail/00-base.yml index b8674d0be..7a000ba19 100644 --- a/tests/dictionaries/04_7validators_variable_optional/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/04_7validators_variable_optional/dictionaries/rougail/00-base.yml @@ -17,7 +17,7 @@ general: # a family optional: true description: int and int2 must be different - jinja: | - {% if _.int == int3 %} + {% if int3 is defined and _.int == int3 %} int and int3 must be different {% endif %} params: diff --git a/tests/dictionaries/04_7validators_variable_optional/tiramisu/base.py b/tests/dictionaries/04_7validators_variable_optional/tiramisu/base.py index 742e66e57..f9a155c61 100644 --- a/tests/dictionaries/04_7validators_variable_optional/tiramisu/base.py +++ b/tests/dictionaries/04_7validators_variable_optional/tiramisu/base.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['validators_rougail.general.int'] = "{% if _.int == int2 %}\nint and int2 must be different\n{% endif %}\n" -dict_env['validators_rougail.general.int_0'] = "{% if _.int == int3 %}\nint and int3 must be different\n{% endif %}\n" +dict_env['validators_rougail.general.int_0'] = "{% if int3 is defined and _.int == int3 %}\nint and int3 must be different\n{% endif %}\n" option_4 = IntOption(name="int2", doc="a second number", default=1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_3 = IntOption(name="int", doc="a first number", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_rougail.general.int"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_7validators_variable_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("rougail.general.int"), 'int2': ParamOption(option_4), '_.int': ParamSelfOption(whole=False)})), Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_rougail.general.int_0"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_7validators_variable_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("rougail.general.int"), '_.int': ParamSelfOption(whole=False)}))], properties=frozenset({"basic", "mandatory"}), informations={'type': 'number', 'test': (5,)}) optiondescription_2 = OptionDescription(name="general", doc="a family", children=[option_3, option_4], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/04_7validators_variable_optional/tiramisu/multi.py b/tests/dictionaries/04_7validators_variable_optional/tiramisu/multi.py index eae40cd62..00f5f6c29 100644 --- a/tests/dictionaries/04_7validators_variable_optional/tiramisu/multi.py +++ b/tests/dictionaries/04_7validators_variable_optional/tiramisu/multi.py @@ -3,21 +3,25 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['validators_1.rougail.general.int'] = "{% if _.int == int2 %}\nint and int2 must be different\n{% endif %}\n" -dict_env['validators_1.rougail.general.int_0'] = "{% if _.int == int3 %}\nint and int3 must be different\n{% endif %}\n" +dict_env['validators_1.rougail.general.int_0'] = "{% if int3 is defined and _.int == int3 %}\nint and int3 must be different\n{% endif %}\n" dict_env['validators_2.rougail.general.int'] = "{% if _.int == int2 %}\nint and int2 must be different\n{% endif %}\n" -dict_env['validators_2.rougail.general.int_0'] = "{% if _.int == int3 %}\nint and int3 must be different\n{% endif %}\n" +dict_env['validators_2.rougail.general.int_0'] = "{% if int3 is defined and _.int == int3 %}\nint and int3 must be different\n{% endif %}\n" option_5 = IntOption(name="int2", doc="a second number", default=1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_4 = IntOption(name="int", doc="a first number", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_1.rougail.general.int"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_7validators_variable_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("1.rougail.general.int"), 'int2': ParamOption(option_5), '_.int': ParamSelfOption(whole=False)})), Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_1.rougail.general.int_0"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_7validators_variable_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("1.rougail.general.int"), '_.int': ParamSelfOption(whole=False)}))], properties=frozenset({"basic", "mandatory"}), informations={'type': 'number', 'test': (5,)}) optiondescription_3 = OptionDescription(name="general", doc="a family", children=[option_4, option_5], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_10 = IntOption(name="int2", doc="a second number", default=1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_9 = IntOption(name="int", doc="a first number", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_2.rougail.general.int"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_7validators_variable_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("2.rougail.general.int"), 'int2': ParamOption(option_10), '_.int': ParamSelfOption(whole=False)})), Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_2.rougail.general.int_0"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_7validators_variable_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("2.rougail.general.int"), '_.int': ParamSelfOption(whole=False)}))], properties=frozenset({"basic", "mandatory"}), informations={'type': 'number', 'test': (5,)}) optiondescription_8 = OptionDescription(name="general", doc="a family", children=[option_9, option_10], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"basic"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/04_7validators_variable_optional/tiramisu/no_namespace.py b/tests/dictionaries/04_7validators_variable_optional/tiramisu/no_namespace.py index 38e7675b8..b234b1e77 100644 --- a/tests/dictionaries/04_7validators_variable_optional/tiramisu/no_namespace.py +++ b/tests/dictionaries/04_7validators_variable_optional/tiramisu/no_namespace.py @@ -7,7 +7,7 @@ ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['validators_general.int'] = "{% if _.int == int2 %}\nint and int2 must be different\n{% endif %}\n" -dict_env['validators_general.int_0'] = "{% if _.int == int3 %}\nint and int3 must be different\n{% endif %}\n" +dict_env['validators_general.int_0'] = "{% if int3 is defined and _.int == int3 %}\nint and int3 must be different\n{% endif %}\n" option_3 = IntOption(name="int2", doc="a second number", default=1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_2 = IntOption(name="int", doc="a first number", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_general.int"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_7validators_variable_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("general.int"), 'int2': ParamOption(option_3), '_.int': ParamSelfOption(whole=False)})), Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_general.int_0"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/04_7validators_variable_optional/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("general.int"), '_.int': ParamSelfOption(whole=False)}))], properties=frozenset({"basic", "mandatory"}), informations={'type': 'number', 'test': (5,)}) optiondescription_1 = OptionDescription(name="general", doc="a family", children=[option_2, option_3], properties=frozenset({"basic"})) diff --git a/tests/dictionaries/05_0multi_not_uniq/tiramisu/base.py b/tests/dictionaries/05_0multi_not_uniq/tiramisu/base.py index 7e901b2cb..838b35f0b 100644 --- a/tests/dictionaries/05_0multi_not_uniq/tiramisu/base.py +++ b/tests/dictionaries/05_0multi_not_uniq/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var1", doc="a variable", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "notunique", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/05_0multi_not_uniq/tiramisu/multi.py b/tests/dictionaries/05_0multi_not_uniq/tiramisu/multi.py index 76726e15a..d9807087d 100644 --- a/tests/dictionaries/05_0multi_not_uniq/tiramisu/multi.py +++ b/tests/dictionaries/05_0multi_not_uniq/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="a variable", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "notunique", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="var1", doc="a variable", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "notunique", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/05_0multi_uniq/tiramisu/base.py b/tests/dictionaries/05_0multi_uniq/tiramisu/base.py index c25d2bd42..511d33712 100644 --- a/tests/dictionaries/05_0multi_uniq/tiramisu/base.py +++ b/tests/dictionaries/05_0multi_uniq/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="variable", doc="a variable", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "standard", "unique"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/05_0multi_uniq/tiramisu/multi.py b/tests/dictionaries/05_0multi_uniq/tiramisu/multi.py index 877ad848d..3772cb179 100644 --- a/tests/dictionaries/05_0multi_uniq/tiramisu/multi.py +++ b/tests/dictionaries/05_0multi_uniq/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="a variable", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "standard", "unique"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "standard", "unique"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/12_1auto_save_expert/tiramisu/base.py b/tests/dictionaries/12_1auto_save_expert/tiramisu/base.py index 9c6631fc7..7f548fa00 100644 --- a/tests/dictionaries/12_1auto_save_expert/tiramisu/base.py +++ b/tests/dictionaries/12_1auto_save_expert/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="a variable", default="no", properties=frozenset({"advanced", "force_store_value", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"advanced"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"advanced"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/12_1auto_save_expert/tiramisu/multi.py b/tests/dictionaries/12_1auto_save_expert/tiramisu/multi.py index 261c76cfe..735f2c389 100644 --- a/tests/dictionaries/12_1auto_save_expert/tiramisu/multi.py +++ b/tests/dictionaries/12_1auto_save_expert/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="a variable", default="no", properties=frozenset({"advanced", "force_store_value", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"advanced"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"advanced"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"advanced"})) option_6 = StrOption(name="var", doc="a variable", default="no", properties=frozenset({"advanced", "force_store_value", "mandatory"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"advanced"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"advanced"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"advanced"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/16_0redefine_description/tiramisu/base.py b/tests/dictionaries/16_0redefine_description/tiramisu/base.py index 743ec5cf3..8fd154bcc 100644 --- a/tests/dictionaries/16_0redefine_description/tiramisu/base.py +++ b/tests/dictionaries/16_0redefine_description/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="Redefined", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_0redefine_description/tiramisu/multi.py b/tests/dictionaries/16_0redefine_description/tiramisu/multi.py index d6ff81eed..749bbe3aa 100644 --- a/tests/dictionaries/16_0redefine_description/tiramisu/multi.py +++ b/tests/dictionaries/16_0redefine_description/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="Redefined", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_6 = StrOption(name="var", doc="Redefined", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"basic"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/16_2family_redefine_calculation/tiramisu/base.py b/tests/dictionaries/16_2family_redefine_calculation/tiramisu/base.py index 1e9ed34b5..5b959eb3d 100644 --- a/tests/dictionaries/16_2family_redefine_calculation/tiramisu/base.py +++ b/tests/dictionaries/16_2family_redefine_calculation/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['disabled_rougail.family'] = "true\n" option_3 = StrOption(name="var1", doc="var1", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_2 = OptionDescription(name="family", doc="family", children=[option_3], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/16_2family_redefine_calculation/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_2family_redefine_calculation/tiramisu/multi.py b/tests/dictionaries/16_2family_redefine_calculation/tiramisu/multi.py index fd793a93b..a600d5fa0 100644 --- a/tests/dictionaries/16_2family_redefine_calculation/tiramisu/multi.py +++ b/tests/dictionaries/16_2family_redefine_calculation/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,10 +14,10 @@ dict_env['disabled_1.rougail.family'] = "true\n" dict_env['disabled_2.rougail.family'] = "true\n" option_4 = StrOption(name="var1", doc="var1", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="family", doc="family", children=[option_4], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_1.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/16_2family_redefine_calculation/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="var1", doc="var1", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_7 = OptionDescription(name="family", doc="family", children=[option_8], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_2.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/16_2family_redefine_calculation/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_7], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_7], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/16_2family_redefine_disabled/tiramisu/base.py b/tests/dictionaries/16_2family_redefine_disabled/tiramisu/base.py index 0fd38b83f..1c8a83711 100644 --- a/tests/dictionaries/16_2family_redefine_disabled/tiramisu/base.py +++ b/tests/dictionaries/16_2family_redefine_disabled/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="var1", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_2 = OptionDescription(name="family", doc="family", children=[option_3], properties=frozenset({"basic", "disabled"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_2family_redefine_disabled/tiramisu/multi.py b/tests/dictionaries/16_2family_redefine_disabled/tiramisu/multi.py index fa21ec0b5..7125b5e12 100644 --- a/tests/dictionaries/16_2family_redefine_disabled/tiramisu/multi.py +++ b/tests/dictionaries/16_2family_redefine_disabled/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="var1", doc="var1", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="family", doc="family", children=[option_4], properties=frozenset({"basic", "disabled"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="var1", doc="var1", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_7 = OptionDescription(name="family", doc="family", children=[option_8], properties=frozenset({"basic", "disabled"})) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_7], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_7], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/16_5exists_nonexists/tiramisu/base.py b/tests/dictionaries/16_5exists_nonexists/tiramisu/base.py index 631014f21..c02d0ed15 100644 --- a/tests/dictionaries/16_5exists_nonexists/tiramisu/base.py +++ b/tests/dictionaries/16_5exists_nonexists/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var1", doc="a variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var2", doc="a new variable", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_5exists_nonexists/tiramisu/multi.py b/tests/dictionaries/16_5exists_nonexists/tiramisu/multi.py index ccf1a44de..b046a338f 100644 --- a/tests/dictionaries/16_5exists_nonexists/tiramisu/multi.py +++ b/tests/dictionaries/16_5exists_nonexists/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="a variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a new variable", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_7 = StrOption(name="var1", doc="a variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="var2", doc="a new variable", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/16_5exists_redefine/tiramisu/base.py b/tests/dictionaries/16_5exists_redefine/tiramisu/base.py index 8f82c90ce..966ee69ab 100644 --- a/tests/dictionaries/16_5exists_redefine/tiramisu/base.py +++ b/tests/dictionaries/16_5exists_redefine/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_2 = StrOption(name="var1", doc="a first variable", default="yes", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +option_2 = StrOption(name="var1", doc="a first variable", default="yes", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "standard"}), informations={'type': 'string'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_5exists_redefine/tiramisu/multi.py b/tests/dictionaries/16_5exists_redefine/tiramisu/multi.py index 8f8dd4d21..00fa9d983 100644 --- a/tests/dictionaries/16_5exists_redefine/tiramisu/multi.py +++ b/tests/dictionaries/16_5exists_redefine/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_3 = StrOption(name="var1", doc="a first variable", default="yes", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +option_3 = StrOption(name="var1", doc="a first variable", default="yes", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "standard"}), informations={'type': 'string'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) -option_6 = StrOption(name="var1", doc="a first variable", default="yes", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +option_6 = StrOption(name="var1", doc="a first variable", default="yes", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "standard"}), informations={'type': 'string'}) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/16_5exists_redefine/tiramisu/no_namespace.py b/tests/dictionaries/16_5exists_redefine/tiramisu/no_namespace.py index 64bedd850..8c59dba13 100644 --- a/tests/dictionaries/16_5exists_redefine/tiramisu/no_namespace.py +++ b/tests/dictionaries/16_5exists_redefine/tiramisu/no_namespace.py @@ -6,5 +6,5 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_1 = StrOption(name="var1", doc="a first variable", default="yes", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'type': 'string'}) +option_1 = StrOption(name="var1", doc="a first variable", default="yes", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "standard"}), informations={'type': 'string'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) diff --git a/tests/dictionaries/16_5redefine_calculation/tiramisu/base.py b/tests/dictionaries/16_5redefine_calculation/tiramisu/base.py index d80187a55..2d50e0776 100644 --- a/tests/dictionaries/16_5redefine_calculation/tiramisu/base.py +++ b/tests/dictionaries/16_5redefine_calculation/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.variable'] = "yes" option_2 = StrOption(name="variable", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/16_5redefine_calculation/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.variable")})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_5redefine_calculation/tiramisu/multi.py b/tests/dictionaries/16_5redefine_calculation/tiramisu/multi.py index 716ca7585..3ace5dc04 100644 --- a/tests/dictionaries/16_5redefine_calculation/tiramisu/multi.py +++ b/tests/dictionaries/16_5redefine_calculation/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_1.rougail.variable'] = "yes" dict_env['default_2.rougail.variable'] = "yes" option_3 = StrOption(name="variable", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/16_5redefine_calculation/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.variable")})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/16_5redefine_calculation/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.variable")})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/16_5redefine_choice/tiramisu/base.py b/tests/dictionaries/16_5redefine_choice/tiramisu/base.py index ed2fd60b0..a0e24e2fe 100644 --- a/tests/dictionaries/16_5redefine_choice/tiramisu/base.py +++ b/tests/dictionaries/16_5redefine_choice/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = ChoiceOption(name="variable", doc="a variable", values=("a", "b"), properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_5redefine_choice/tiramisu/multi.py b/tests/dictionaries/16_5redefine_choice/tiramisu/multi.py index 626319a6e..c15ebed67 100644 --- a/tests/dictionaries/16_5redefine_choice/tiramisu/multi.py +++ b/tests/dictionaries/16_5redefine_choice/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = ChoiceOption(name="variable", doc="a variable", values=("a", "b"), properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_6 = ChoiceOption(name="variable", doc="a variable", values=("a", "b"), properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"basic"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/16_5redefine_default/tiramisu/base.py b/tests/dictionaries/16_5redefine_default/tiramisu/base.py index 2f6bd6234..1cc157611 100644 --- a/tests/dictionaries/16_5redefine_default/tiramisu/base.py +++ b/tests/dictionaries/16_5redefine_default/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="variable", doc="a variable", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_5redefine_default/tiramisu/multi.py b/tests/dictionaries/16_5redefine_default/tiramisu/multi.py index 9f4cbe11c..7b1356494 100644 --- a/tests/dictionaries/16_5redefine_default/tiramisu/multi.py +++ b/tests/dictionaries/16_5redefine_default/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="a variable", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/16_5redefine_default_calculation/tiramisu/base.py b/tests/dictionaries/16_5redefine_default_calculation/tiramisu/base.py index 32a264701..c23b855cd 100644 --- a/tests/dictionaries/16_5redefine_default_calculation/tiramisu/base.py +++ b/tests/dictionaries/16_5redefine_default_calculation/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_5redefine_default_calculation/tiramisu/multi.py b/tests/dictionaries/16_5redefine_default_calculation/tiramisu/multi.py index 845b55b01..5d4e5180c 100644 --- a/tests/dictionaries/16_5redefine_default_calculation/tiramisu/multi.py +++ b/tests/dictionaries/16_5redefine_default_calculation/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_6 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"basic"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/16_5redefine_family/tiramisu/base.py b/tests/dictionaries/16_5redefine_family/tiramisu/base.py index affbde487..dbf658acb 100644 --- a/tests/dictionaries/16_5redefine_family/tiramisu/base.py +++ b/tests/dictionaries/16_5redefine_family/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_2 = OptionDescription(name="family", doc="new description", children=[option_3], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_5redefine_family/tiramisu/multi.py b/tests/dictionaries/16_5redefine_family/tiramisu/multi.py index ef542f00a..e0419da9a 100644 --- a/tests/dictionaries/16_5redefine_family/tiramisu/multi.py +++ b/tests/dictionaries/16_5redefine_family/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="family", doc="new description", children=[option_4], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_7 = OptionDescription(name="family", doc="new description", children=[option_8], properties=frozenset({"basic"})) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_7], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_7], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/16_5redefine_help/tiramisu/base.py b/tests/dictionaries/16_5redefine_help/tiramisu/base.py index f2cd9b138..de2396092 100644 --- a/tests/dictionaries/16_5redefine_help/tiramisu/base.py +++ b/tests/dictionaries/16_5redefine_help/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="redefine help", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'help': 'redefine help ok'}) optiondescription_2 = OptionDescription(name="family", doc="a family", children=[option_3], properties=frozenset({"basic"}), informations={'help': 'redefine help family ok'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_5redefine_help/tiramisu/multi.py b/tests/dictionaries/16_5redefine_help/tiramisu/multi.py index 61e9f51b4..c5f34f05f 100644 --- a/tests/dictionaries/16_5redefine_help/tiramisu/multi.py +++ b/tests/dictionaries/16_5redefine_help/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="variable", doc="redefine help", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'help': 'redefine help ok'}) optiondescription_3 = OptionDescription(name="family", doc="a family", children=[option_4], properties=frozenset({"basic"}), informations={'help': 'redefine help family ok'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="variable", doc="redefine help", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'help': 'redefine help ok'}) optiondescription_7 = OptionDescription(name="family", doc="a family", children=[option_8], properties=frozenset({"basic"}), informations={'help': 'redefine help family ok'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_7], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_7], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/16_5redefine_hidden/tiramisu/base.py b/tests/dictionaries/16_5redefine_hidden/tiramisu/base.py index 633ce4630..cb64857ff 100644 --- a/tests/dictionaries/16_5redefine_hidden/tiramisu/base.py +++ b/tests/dictionaries/16_5redefine_hidden/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_2 = StrOption(name="variable", doc="a variable", default="no", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +option_2 = StrOption(name="variable", doc="a variable", default="no", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "standard"}), informations={'type': 'string'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_5redefine_hidden/tiramisu/multi.py b/tests/dictionaries/16_5redefine_hidden/tiramisu/multi.py index 95209fa57..e0775ff65 100644 --- a/tests/dictionaries/16_5redefine_hidden/tiramisu/multi.py +++ b/tests/dictionaries/16_5redefine_hidden/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_3 = StrOption(name="variable", doc="a variable", default="no", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +option_3 = StrOption(name="variable", doc="a variable", default="no", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "standard"}), informations={'type': 'string'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) -option_6 = StrOption(name="variable", doc="a variable", default="no", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +option_6 = StrOption(name="variable", doc="a variable", default="no", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "standard"}), informations={'type': 'string'}) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/16_5redefine_hidden/tiramisu/no_namespace.py b/tests/dictionaries/16_5redefine_hidden/tiramisu/no_namespace.py index 9dfe776b6..c8537bec3 100644 --- a/tests/dictionaries/16_5redefine_hidden/tiramisu/no_namespace.py +++ b/tests/dictionaries/16_5redefine_hidden/tiramisu/no_namespace.py @@ -6,5 +6,5 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_1 = StrOption(name="variable", doc="a variable", default="no", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'type': 'string'}) +option_1 = StrOption(name="variable", doc="a variable", default="no", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "standard"}), informations={'type': 'string'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1]) diff --git a/tests/dictionaries/16_5redefine_multi/tiramisu/base.py b/tests/dictionaries/16_5redefine_multi/tiramisu/base.py index 8d8b62a2d..167c3833e 100644 --- a/tests/dictionaries/16_5redefine_multi/tiramisu/base.py +++ b/tests/dictionaries/16_5redefine_multi/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="variable", doc="a variable", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_5redefine_multi/tiramisu/multi.py b/tests/dictionaries/16_5redefine_multi/tiramisu/multi.py index d7d1880e6..8b82ad591 100644 --- a/tests/dictionaries/16_5redefine_multi/tiramisu/multi.py +++ b/tests/dictionaries/16_5redefine_multi/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="variable", doc="a variable", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = StrOption(name="variable", doc="a variable", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/16_5redefine_remove_disable_calculation/tiramisu/base.py b/tests/dictionaries/16_5redefine_remove_disable_calculation/tiramisu/base.py index 39532257d..56853871e 100644 --- a/tests/dictionaries/16_5redefine_remove_disable_calculation/tiramisu/base.py +++ b/tests/dictionaries/16_5redefine_remove_disable_calculation/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_5redefine_remove_disable_calculation/tiramisu/multi.py b/tests/dictionaries/16_5redefine_remove_disable_calculation/tiramisu/multi.py index e6917b21c..3c67611c5 100644 --- a/tests/dictionaries/16_5redefine_remove_disable_calculation/tiramisu/multi.py +++ b/tests/dictionaries/16_5redefine_remove_disable_calculation/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_7 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/16_5test_redefine/tiramisu/base.py b/tests/dictionaries/16_5test_redefine/tiramisu/base.py index 399cafef0..d6897e644 100644 --- a/tests/dictionaries/16_5test_redefine/tiramisu/base.py +++ b/tests/dictionaries/16_5test_redefine/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('test1',)}) option_3 = StrOption(name="var2", doc="a second variable", default="non", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('test1',)}) option_4 = StrOption(name="var3", doc="a third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_5test_redefine/tiramisu/multi.py b/tests/dictionaries/16_5test_redefine/tiramisu/multi.py index b0328b7fb..2c448083e 100644 --- a/tests/dictionaries/16_5test_redefine/tiramisu/multi.py +++ b/tests/dictionaries/16_5test_redefine/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('test1',)}) option_4 = StrOption(name="var2", doc="a second variable", default="non", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('test1',)}) option_5 = StrOption(name="var3", doc="a third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('test1',)}) option_9 = StrOption(name="var2", doc="a second variable", default="non", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('test1',)}) option_10 = StrOption(name="var3", doc="a third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"basic"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/16_6choice_redefine/tiramisu/base.py b/tests/dictionaries/16_6choice_redefine/tiramisu/base.py index 0818f19fb..e7a247264 100644 --- a/tests/dictionaries/16_6choice_redefine/tiramisu/base.py +++ b/tests/dictionaries/16_6choice_redefine/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = ChoiceOption(name="var", doc="A choice", values=("a", "c"), default="c", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16_6choice_redefine/tiramisu/multi.py b/tests/dictionaries/16_6choice_redefine/tiramisu/multi.py index bcbf238ff..946ce3670 100644 --- a/tests/dictionaries/16_6choice_redefine/tiramisu/multi.py +++ b/tests/dictionaries/16_6choice_redefine/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = ChoiceOption(name="var", doc="A choice", values=("a", "c"), default="c", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_6 = ChoiceOption(name="var", doc="A choice", values=("a", "c"), default="c", properties=frozenset({"mandatory", "standard"}), informations={'type': 'choice'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/16exists_exists/tiramisu/base.py b/tests/dictionaries/16exists_exists/tiramisu/base.py index 75808e319..3b3de1db9 100644 --- a/tests/dictionaries/16exists_exists/tiramisu/base.py +++ b/tests/dictionaries/16exists_exists/tiramisu/base.py @@ -3,9 +3,13 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="Description", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/16exists_exists/tiramisu/multi.py b/tests/dictionaries/16exists_exists/tiramisu/multi.py index c8adce004..823605c18 100644 --- a/tests/dictionaries/16exists_exists/tiramisu/multi.py +++ b/tests/dictionaries/16exists_exists/tiramisu/multi.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="Description", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_6 = StrOption(name="var", doc="Description", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", children=[option_6], properties=frozenset({"basic"})) +optiondescription_5 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_6], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/17_5redefine_leadership/makedict/mandatory.json b/tests/dictionaries/17_5redefine_leadership/makedict/mandatory.json index 8e267443d..0637a088a 100644 --- a/tests/dictionaries/17_5redefine_leadership/makedict/mandatory.json +++ b/tests/dictionaries/17_5redefine_leadership/makedict/mandatory.json @@ -1 +1 @@ -["rougail.leader.leader"] \ No newline at end of file +[] \ No newline at end of file diff --git a/tests/dictionaries/17_5redefine_leadership/tiramisu/base.py b/tests/dictionaries/17_5redefine_leadership/tiramisu/base.py index 14e13d958..8f0c938a1 100644 --- a/tests/dictionaries/17_5redefine_leadership/tiramisu/base.py +++ b/tests/dictionaries/17_5redefine_leadership/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_4 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = Leadership(name="leader", doc="leader", children=[option_3, option_4], properties=frozenset({"basic", "hidden"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_4 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_2 = Leadership(name="leader", doc="leader", children=[option_3, option_4], properties=frozenset({"hidden", "standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/17_5redefine_leadership/tiramisu/multi.py b/tests/dictionaries/17_5redefine_leadership/tiramisu/multi.py index 12ef5a7a3..7fdf72619 100644 --- a/tests/dictionaries/17_5redefine_leadership/tiramisu/multi.py +++ b/tests/dictionaries/17_5redefine_leadership/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_5 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = Leadership(name="leader", doc="leader", children=[option_4, option_5], properties=frozenset({"basic", "hidden"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) -option_9 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_10 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_8 = Leadership(name="leader", doc="leader", children=[option_9, option_10], properties=frozenset({"basic", "hidden"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"basic"})) -optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) +option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_5 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_3 = Leadership(name="leader", doc="leader", children=[option_4, option_5], properties=frozenset({"hidden", "standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) +option_9 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_10 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_8 = Leadership(name="leader", doc="leader", children=[option_9, option_10], properties=frozenset({"hidden", "standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/17_5redefine_leadership/tiramisu/no_namespace.py b/tests/dictionaries/17_5redefine_leadership/tiramisu/no_namespace.py index fc7ae2fd1..cb12c6e51 100644 --- a/tests/dictionaries/17_5redefine_leadership/tiramisu/no_namespace.py +++ b/tests/dictionaries/17_5redefine_leadership/tiramisu/no_namespace.py @@ -6,7 +6,7 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_2 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_3 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = Leadership(name="leader", doc="leader", children=[option_2, option_3], properties=frozenset({"basic", "hidden"})) +option_2 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_3 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_1 = Leadership(name="leader", doc="leader", children=[option_2, option_3], properties=frozenset({"hidden", "standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/20_0empty_family/tiramisu/base.py b/tests/dictionaries/20_0empty_family/tiramisu/base.py index c800d9e33..bb6ab55d2 100644 --- a/tests/dictionaries/20_0empty_family/tiramisu/base.py +++ b/tests/dictionaries/20_0empty_family/tiramisu/base.py @@ -3,8 +3,12 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[], properties=frozenset({"advanced"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[], properties=frozenset({"advanced"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/20_0empty_family/tiramisu/multi.py b/tests/dictionaries/20_0empty_family/tiramisu/multi.py index 9357fd228..f8a40b84b 100644 --- a/tests/dictionaries/20_0empty_family/tiramisu/multi.py +++ b/tests/dictionaries/20_0empty_family/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") diff --git a/tests/dictionaries/20_0family_append/tiramisu/base.py b/tests/dictionaries/20_0family_append/tiramisu/base.py index 5e8ed973c..3bfde0a98 100644 --- a/tests/dictionaries/20_0family_append/tiramisu/base.py +++ b/tests/dictionaries/20_0family_append/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="The first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="The second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_2 = OptionDescription(name="family", doc="A family", children=[option_3, option_4], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/20_0family_append/tiramisu/multi.py b/tests/dictionaries/20_0family_append/tiramisu/multi.py index 9a16533e3..35b50a68d 100644 --- a/tests/dictionaries/20_0family_append/tiramisu/multi.py +++ b/tests/dictionaries/20_0family_append/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="var1", doc="The first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_5 = StrOption(name="var2", doc="The second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="family", doc="A family", children=[option_4, option_5], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = StrOption(name="var1", doc="The first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_10 = StrOption(name="var2", doc="The second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_8 = OptionDescription(name="family", doc="A family", children=[option_9, option_10], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"basic"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/20_0family_underscore/dictionaries/rougail/00-base.yml b/tests/dictionaries/20_0family_underscore/dictionaries/rougail/00-base.yml index bec89c205..f223fff68 100644 --- a/tests/dictionaries/20_0family_underscore/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/20_0family_underscore/dictionaries/rougail/00-base.yml @@ -4,7 +4,7 @@ my_family: _type: family _description: This is a great family _help: This is a great family - _mode: basic + _mode: standard _hidden: true _disabled: true type: diff --git a/tests/dictionaries/20_0family_underscore/tiramisu/base.py b/tests/dictionaries/20_0family_underscore/tiramisu/base.py index c32c0b629..0786591b9 100644 --- a/tests/dictionaries/20_0family_underscore/tiramisu/base.py +++ b/tests/dictionaries/20_0family_underscore/tiramisu/base.py @@ -3,21 +3,25 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_4 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = OptionDescription(name="type", doc="a type family", children=[option_4], properties=frozenset({"basic"})) -option_6 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="description", doc="This is a other great family", children=[option_6], properties=frozenset({"basic"})) -option_8 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_7 = OptionDescription(name="help", doc="a help family", children=[option_8], properties=frozenset({"basic"}), informations={'help': 'This is a other great family'}) +option_4 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_3 = OptionDescription(name="type", doc="a type family", children=[option_4], properties=frozenset({"standard"})) +option_6 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_5 = OptionDescription(name="description", doc="This is a other great family", children=[option_6], properties=frozenset({"standard"})) +option_8 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_7 = OptionDescription(name="help", doc="a help family", children=[option_8], properties=frozenset({"standard"}), informations={'help': 'This is a other great family'}) option_10 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"advanced", "force_default_on_freeze", "frozen"}), informations={'type': 'string'}) optiondescription_9 = OptionDescription(name="mode", doc="a mode family", children=[option_10], properties=frozenset({"advanced"})) -option_12 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_11 = OptionDescription(name="hidden", doc="an hidden family", children=[option_12], properties=frozenset({"basic", "hidden"})) -option_14 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_13 = OptionDescription(name="disabled", doc="an disabled family", children=[option_14], properties=frozenset({"basic", "disabled"})) -optiondescription_2 = OptionDescription(name="my_family", doc="This is a great family", children=[optiondescription_3, optiondescription_5, optiondescription_7, optiondescription_9, optiondescription_11, optiondescription_13], properties=frozenset({"basic", "disabled", "hidden"}), informations={'help': 'This is a great family'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +option_12 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_11 = OptionDescription(name="hidden", doc="an hidden family", children=[option_12], properties=frozenset({"hidden", "standard"})) +option_14 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_13 = OptionDescription(name="disabled", doc="an disabled family", children=[option_14], properties=frozenset({"disabled", "standard"})) +optiondescription_2 = OptionDescription(name="my_family", doc="This is a great family", children=[optiondescription_3, optiondescription_5, optiondescription_7, optiondescription_9, optiondescription_11, optiondescription_13], properties=frozenset({"disabled", "hidden", "standard"}), informations={'help': 'This is a great family'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/20_0family_underscore/tiramisu/multi.py b/tests/dictionaries/20_0family_underscore/tiramisu/multi.py index 334adc1eb..4ff89dfc3 100644 --- a/tests/dictionaries/20_0family_underscore/tiramisu/multi.py +++ b/tests/dictionaries/20_0family_underscore/tiramisu/multi.py @@ -3,37 +3,41 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_5 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_4 = OptionDescription(name="type", doc="a type family", children=[option_5], properties=frozenset({"basic"})) -option_7 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="description", doc="This is a other great family", children=[option_7], properties=frozenset({"basic"})) -option_9 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_8 = OptionDescription(name="help", doc="a help family", children=[option_9], properties=frozenset({"basic"}), informations={'help': 'This is a other great family'}) +option_5 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_4 = OptionDescription(name="type", doc="a type family", children=[option_5], properties=frozenset({"standard"})) +option_7 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_6 = OptionDescription(name="description", doc="This is a other great family", children=[option_7], properties=frozenset({"standard"})) +option_9 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_8 = OptionDescription(name="help", doc="a help family", children=[option_9], properties=frozenset({"standard"}), informations={'help': 'This is a other great family'}) option_11 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"advanced", "force_default_on_freeze", "frozen"}), informations={'type': 'string'}) optiondescription_10 = OptionDescription(name="mode", doc="a mode family", children=[option_11], properties=frozenset({"advanced"})) -option_13 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_12 = OptionDescription(name="hidden", doc="an hidden family", children=[option_13], properties=frozenset({"basic", "hidden"})) -option_15 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_14 = OptionDescription(name="disabled", doc="an disabled family", children=[option_15], properties=frozenset({"basic", "disabled"})) -optiondescription_3 = OptionDescription(name="my_family", doc="This is a great family", children=[optiondescription_4, optiondescription_6, optiondescription_8, optiondescription_10, optiondescription_12, optiondescription_14], properties=frozenset({"basic", "disabled", "hidden"}), informations={'help': 'This is a great family'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) -option_20 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_19 = OptionDescription(name="type", doc="a type family", children=[option_20], properties=frozenset({"basic"})) -option_22 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_21 = OptionDescription(name="description", doc="This is a other great family", children=[option_22], properties=frozenset({"basic"})) -option_24 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_23 = OptionDescription(name="help", doc="a help family", children=[option_24], properties=frozenset({"basic"}), informations={'help': 'This is a other great family'}) +option_13 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_12 = OptionDescription(name="hidden", doc="an hidden family", children=[option_13], properties=frozenset({"hidden", "standard"})) +option_15 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_14 = OptionDescription(name="disabled", doc="an disabled family", children=[option_15], properties=frozenset({"disabled", "standard"})) +optiondescription_3 = OptionDescription(name="my_family", doc="This is a great family", children=[optiondescription_4, optiondescription_6, optiondescription_8, optiondescription_10, optiondescription_12, optiondescription_14], properties=frozenset({"disabled", "hidden", "standard"}), informations={'help': 'This is a great family'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) +option_20 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_19 = OptionDescription(name="type", doc="a type family", children=[option_20], properties=frozenset({"standard"})) +option_22 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_21 = OptionDescription(name="description", doc="This is a other great family", children=[option_22], properties=frozenset({"standard"})) +option_24 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_23 = OptionDescription(name="help", doc="a help family", children=[option_24], properties=frozenset({"standard"}), informations={'help': 'This is a other great family'}) option_26 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"advanced", "force_default_on_freeze", "frozen"}), informations={'type': 'string'}) optiondescription_25 = OptionDescription(name="mode", doc="a mode family", children=[option_26], properties=frozenset({"advanced"})) -option_28 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_27 = OptionDescription(name="hidden", doc="an hidden family", children=[option_28], properties=frozenset({"basic", "hidden"})) -option_30 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_29 = OptionDescription(name="disabled", doc="an disabled family", children=[option_30], properties=frozenset({"basic", "disabled"})) -optiondescription_18 = OptionDescription(name="my_family", doc="This is a great family", children=[optiondescription_19, optiondescription_21, optiondescription_23, optiondescription_25, optiondescription_27, optiondescription_29], properties=frozenset({"basic", "disabled", "hidden"}), informations={'help': 'This is a great family'}) -optiondescription_17 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_18], properties=frozenset({"basic"})) -optiondescription_16 = OptionDescription(name="2", doc="2", children=[optiondescription_17], properties=frozenset({"basic"})) +option_28 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_27 = OptionDescription(name="hidden", doc="an hidden family", children=[option_28], properties=frozenset({"hidden", "standard"})) +option_30 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_29 = OptionDescription(name="disabled", doc="an disabled family", children=[option_30], properties=frozenset({"disabled", "standard"})) +optiondescription_18 = OptionDescription(name="my_family", doc="This is a great family", children=[optiondescription_19, optiondescription_21, optiondescription_23, optiondescription_25, optiondescription_27, optiondescription_29], properties=frozenset({"disabled", "hidden", "standard"}), informations={'help': 'This is a great family'}) +optiondescription_17 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_18], properties=frozenset({"standard"})) +optiondescription_16 = OptionDescription(name="2", doc="2", children=[optiondescription_17], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_16]) diff --git a/tests/dictionaries/20_0family_underscore/tiramisu/no_namespace.py b/tests/dictionaries/20_0family_underscore/tiramisu/no_namespace.py index 231f86320..7fda680ba 100644 --- a/tests/dictionaries/20_0family_underscore/tiramisu/no_namespace.py +++ b/tests/dictionaries/20_0family_underscore/tiramisu/no_namespace.py @@ -6,17 +6,17 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_3 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="type", doc="a type family", children=[option_3], properties=frozenset({"basic"})) -option_5 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_4 = OptionDescription(name="description", doc="This is a other great family", children=[option_5], properties=frozenset({"basic"})) -option_7 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="help", doc="a help family", children=[option_7], properties=frozenset({"basic"}), informations={'help': 'This is a other great family'}) +option_3 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_2 = OptionDescription(name="type", doc="a type family", children=[option_3], properties=frozenset({"standard"})) +option_5 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_4 = OptionDescription(name="description", doc="This is a other great family", children=[option_5], properties=frozenset({"standard"})) +option_7 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_6 = OptionDescription(name="help", doc="a help family", children=[option_7], properties=frozenset({"standard"}), informations={'help': 'This is a other great family'}) option_9 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"advanced", "force_default_on_freeze", "frozen"}), informations={'type': 'string'}) optiondescription_8 = OptionDescription(name="mode", doc="a mode family", children=[option_9], properties=frozenset({"advanced"})) -option_11 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_10 = OptionDescription(name="hidden", doc="an hidden family", children=[option_11], properties=frozenset({"basic", "hidden"})) -option_13 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_12 = OptionDescription(name="disabled", doc="an disabled family", children=[option_13], properties=frozenset({"basic", "disabled"})) -optiondescription_1 = OptionDescription(name="my_family", doc="This is a great family", children=[optiondescription_2, optiondescription_4, optiondescription_6, optiondescription_8, optiondescription_10, optiondescription_12], properties=frozenset({"basic", "disabled", "hidden"}), informations={'help': 'This is a great family'}) +option_11 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_10 = OptionDescription(name="hidden", doc="an hidden family", children=[option_11], properties=frozenset({"hidden", "standard"})) +option_13 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_12 = OptionDescription(name="disabled", doc="an disabled family", children=[option_13], properties=frozenset({"disabled", "standard"})) +optiondescription_1 = OptionDescription(name="my_family", doc="This is a great family", children=[optiondescription_2, optiondescription_4, optiondescription_6, optiondescription_8, optiondescription_10, optiondescription_12], properties=frozenset({"disabled", "hidden", "standard"}), informations={'help': 'This is a great family'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/20_0multi_family/tiramisu/base.py b/tests/dictionaries/20_0multi_family/tiramisu/base.py index 46a5541de..4aa86e8b3 100644 --- a/tests/dictionaries/20_0multi_family/tiramisu/base.py +++ b/tests/dictionaries/20_0multi_family/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="variable", doc="a variable", properties=frozenset({"standard"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="subfamily", doc="a sub family", children=[option_4], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="family", doc="a family", children=[optiondescription_3], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/20_0multi_family/tiramisu/multi.py b/tests/dictionaries/20_0multi_family/tiramisu/multi.py index 9076fa749..72e14fb3a 100644 --- a/tests/dictionaries/20_0multi_family/tiramisu/multi.py +++ b/tests/dictionaries/20_0multi_family/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_5 = StrOption(name="variable", doc="a variable", properties=frozenset({"standard"}), informations={'type': 'string'}) optiondescription_4 = OptionDescription(name="subfamily", doc="a sub family", children=[option_5], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="family", doc="a family", children=[optiondescription_4], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_10 = StrOption(name="variable", doc="a variable", properties=frozenset({"standard"}), informations={'type': 'string'}) optiondescription_9 = OptionDescription(name="subfamily", doc="a sub family", children=[option_10], properties=frozenset({"standard"})) optiondescription_8 = OptionDescription(name="family", doc="a family", children=[optiondescription_9], properties=frozenset({"standard"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/20_0multi_family_basic/tiramisu/base.py b/tests/dictionaries/20_0multi_family_basic/tiramisu/base.py index 6f0ff441d..2e9905f41 100644 --- a/tests/dictionaries/20_0multi_family_basic/tiramisu/base.py +++ b/tests/dictionaries/20_0multi_family_basic/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="subfamily", doc="a sub family", children=[option_4], properties=frozenset({"basic"})) optiondescription_2 = OptionDescription(name="family", doc="a family", children=[optiondescription_3], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/20_0multi_family_basic/tiramisu/multi.py b/tests/dictionaries/20_0multi_family_basic/tiramisu/multi.py index 6da2d2d80..feb8796f9 100644 --- a/tests/dictionaries/20_0multi_family_basic/tiramisu/multi.py +++ b/tests/dictionaries/20_0multi_family_basic/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_5 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_4 = OptionDescription(name="subfamily", doc="a sub family", children=[option_5], properties=frozenset({"basic"})) optiondescription_3 = OptionDescription(name="family", doc="a family", children=[optiondescription_4], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_10 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_9 = OptionDescription(name="subfamily", doc="a sub family", children=[option_10], properties=frozenset({"basic"})) optiondescription_8 = OptionDescription(name="family", doc="a family", children=[optiondescription_9], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"basic"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/20_0multi_family_expert/tiramisu/base.py b/tests/dictionaries/20_0multi_family_expert/tiramisu/base.py index 43ad5d3ad..2474a72e9 100644 --- a/tests/dictionaries/20_0multi_family_expert/tiramisu/base.py +++ b/tests/dictionaries/20_0multi_family_expert/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="variable", doc="a variable", properties=frozenset({"advanced"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="subfamily", doc="a sub family", children=[option_4], properties=frozenset({"advanced"})) optiondescription_2 = OptionDescription(name="family", doc="a family", children=[optiondescription_3], properties=frozenset({"advanced"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"advanced"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"advanced"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/20_0multi_family_expert/tiramisu/multi.py b/tests/dictionaries/20_0multi_family_expert/tiramisu/multi.py index 0a21a72ce..769694946 100644 --- a/tests/dictionaries/20_0multi_family_expert/tiramisu/multi.py +++ b/tests/dictionaries/20_0multi_family_expert/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_5 = StrOption(name="variable", doc="a variable", properties=frozenset({"advanced"}), informations={'type': 'string'}) optiondescription_4 = OptionDescription(name="subfamily", doc="a sub family", children=[option_5], properties=frozenset({"advanced"})) optiondescription_3 = OptionDescription(name="family", doc="a family", children=[optiondescription_4], properties=frozenset({"advanced"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"advanced"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"advanced"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"advanced"})) option_10 = StrOption(name="variable", doc="a variable", properties=frozenset({"advanced"}), informations={'type': 'string'}) optiondescription_9 = OptionDescription(name="subfamily", doc="a sub family", children=[option_10], properties=frozenset({"advanced"})) optiondescription_8 = OptionDescription(name="family", doc="a family", children=[optiondescription_9], properties=frozenset({"advanced"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"advanced"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"advanced"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"advanced"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/20_0multi_family_order/tiramisu/base.py b/tests/dictionaries/20_0multi_family_order/tiramisu/base.py index adb7e425e..0034afa57 100644 --- a/tests/dictionaries/20_0multi_family_order/tiramisu/base.py +++ b/tests/dictionaries/20_0multi_family_order/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,5 +16,5 @@ option_6 = StrOption(name="variable", doc="a variable", properties=frozenset({"b optiondescription_5 = OptionDescription(name="subfamily", doc="a sub family", children=[option_6], properties=frozenset({"basic"})) option_7 = StrOption(name="variable2", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="family", doc="a family", children=[option_4, optiondescription_5, option_7], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/20_0multi_family_order/tiramisu/multi.py b/tests/dictionaries/20_0multi_family_order/tiramisu/multi.py index 3e2bdb309..4630b2109 100644 --- a/tests/dictionaries/20_0multi_family_order/tiramisu/multi.py +++ b/tests/dictionaries/20_0multi_family_order/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,7 +16,7 @@ option_7 = StrOption(name="variable", doc="a variable", properties=frozenset({"b optiondescription_6 = OptionDescription(name="subfamily", doc="a sub family", children=[option_7], properties=frozenset({"basic"})) option_8 = StrOption(name="variable2", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_4 = OptionDescription(name="family", doc="a family", children=[option_5, optiondescription_6, option_8], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_11 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_13 = StrOption(name="variable1", doc="a first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) @@ -20,6 +24,6 @@ option_15 = StrOption(name="variable", doc="a variable", properties=frozenset({" optiondescription_14 = OptionDescription(name="subfamily", doc="a sub family", children=[option_15], properties=frozenset({"basic"})) option_16 = StrOption(name="variable2", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_12 = OptionDescription(name="family", doc="a family", children=[option_13, optiondescription_14, option_16], properties=frozenset({"basic"})) -optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[option_11, optiondescription_12], properties=frozenset({"basic"})) +optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_11, optiondescription_12], properties=frozenset({"basic"})) optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_9]) diff --git a/tests/dictionaries/20_0validators_differ_redefine/dictionaries/rougail/00-base.yml b/tests/dictionaries/20_0validators_differ_redefine/dictionaries/rougail/00-base.yml index 52ffb3180..dbdf367ac 100644 --- a/tests/dictionaries/20_0validators_differ_redefine/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/20_0validators_differ_redefine/dictionaries/rougail/00-base.yml @@ -5,6 +5,8 @@ var2: "no" # a second variable var3: description: a third variable default: "yes" + test: + - "yes" validators: - jinja: | {% if _.var3 == _.var1 %} diff --git a/tests/dictionaries/20_0validators_differ_redefine/tiramisu/base.py b/tests/dictionaries/20_0validators_differ_redefine/tiramisu/base.py index 429a44285..d7cd48f44 100644 --- a/tests/dictionaries/20_0validators_differ_redefine/tiramisu/base.py +++ b/tests/dictionaries/20_0validators_differ_redefine/tiramisu/base.py @@ -3,12 +3,16 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['validators_rougail.var3'] = "{% if _.var3 == _.var2 %}\nvar3 must be different than var2\n{% endif %}\n" option_2 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var3", doc="a third variable", default="yes", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_rougail.var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/20_0validators_differ_redefine/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("rougail.var3"), '_.var3': ParamSelfOption(whole=False), '_.var2': ParamOption(option_3)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"standard"})) +option_4 = StrOption(name="var3", doc="a third variable", default="yes", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_rougail.var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/20_0validators_differ_redefine/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("rougail.var3"), '_.var3': ParamSelfOption(whole=False), '_.var2': ParamOption(option_3)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('yes',)}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/20_0validators_differ_redefine/tiramisu/multi.py b/tests/dictionaries/20_0validators_differ_redefine/tiramisu/multi.py index 60f88d0f0..aaf00ea02 100644 --- a/tests/dictionaries/20_0validators_differ_redefine/tiramisu/multi.py +++ b/tests/dictionaries/20_0validators_differ_redefine/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,12 +14,12 @@ dict_env['validators_1.rougail.var3'] = "{% if _.var3 == _.var2 %}\nvar3 must be dict_env['validators_2.rougail.var3'] = "{% if _.var3 == _.var2 %}\nvar3 must be different than var2\n{% endif %}\n" option_3 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var3", doc="a third variable", default="yes", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_1.rougail.var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/20_0validators_differ_redefine/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("1.rougail.var3"), '_.var3': ParamSelfOption(whole=False), '_.var2': ParamOption(option_4)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"standard"})) +option_5 = StrOption(name="var3", doc="a third variable", default="yes", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_1.rougail.var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/20_0validators_differ_redefine/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("1.rougail.var3"), '_.var3': ParamSelfOption(whole=False), '_.var2': ParamOption(option_4)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('yes',)}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_9 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_10 = StrOption(name="var3", doc="a third variable", default="yes", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_2.rougail.var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/20_0validators_differ_redefine/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("2.rougail.var3"), '_.var3': ParamSelfOption(whole=False), '_.var2': ParamOption(option_9)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"standard"})) +option_10 = StrOption(name="var3", doc="a third variable", default="yes", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_2.rougail.var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/20_0validators_differ_redefine/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("2.rougail.var3"), '_.var3': ParamSelfOption(whole=False), '_.var2': ParamOption(option_9)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('yes',)}) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/20_0validators_differ_redefine/tiramisu/no_namespace.py b/tests/dictionaries/20_0validators_differ_redefine/tiramisu/no_namespace.py index 110895c2d..adc6b0271 100644 --- a/tests/dictionaries/20_0validators_differ_redefine/tiramisu/no_namespace.py +++ b/tests/dictionaries/20_0validators_differ_redefine/tiramisu/no_namespace.py @@ -9,5 +9,5 @@ ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['validators_var3'] = "{% if _.var3 == _.var2 %}\nvar3 must be different than var2\n{% endif %}\n" option_1 = StrOption(name="var1", doc="a first variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_2 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_3 = StrOption(name="var3", doc="a third variable", default="yes", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/20_0validators_differ_redefine/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("var3"), '_.var3': ParamSelfOption(whole=False), '_.var2': ParamOption(option_2)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_3 = StrOption(name="var3", doc="a third variable", default="yes", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/20_0validators_differ_redefine/dictionaries/rougail/01-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("var3"), '_.var3': ParamSelfOption(whole=False), '_.var2': ParamOption(option_2)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('yes',)}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_2, option_3]) diff --git a/tests/dictionaries/20_1empty_subfamily/tiramisu/base.py b/tests/dictionaries/20_1empty_subfamily/tiramisu/base.py index c800d9e33..bb6ab55d2 100644 --- a/tests/dictionaries/20_1empty_subfamily/tiramisu/base.py +++ b/tests/dictionaries/20_1empty_subfamily/tiramisu/base.py @@ -3,8 +3,12 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[], properties=frozenset({"advanced"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[], properties=frozenset({"advanced"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/20_1empty_subfamily/tiramisu/multi.py b/tests/dictionaries/20_1empty_subfamily/tiramisu/multi.py index 2e874a701..c4fbb0af2 100644 --- a/tests/dictionaries/20_1empty_subfamily/tiramisu/multi.py +++ b/tests/dictionaries/20_1empty_subfamily/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") diff --git a/tests/dictionaries/20_9default_information_parent/tiramisu/base.py b/tests/dictionaries/20_9default_information_parent/tiramisu/base.py index 9b7152a74..30b28a02a 100644 --- a/tests/dictionaries/20_9default_information_parent/tiramisu/base.py +++ b/tests/dictionaries/20_9default_information_parent/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,5 +15,5 @@ information_0 = ParamInformation("test_information", None) option_4 = StrOption(name="var2", doc="a second variable", default=Calculation(func['calc_value'], Params((information_0))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_2 = OptionDescription(name="family", doc="family", children=[option_3, option_4], properties=frozenset({"basic"})) information_0.set_option(optiondescription_2) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/20_9default_information_parent/tiramisu/multi.py b/tests/dictionaries/20_9default_information_parent/tiramisu/multi.py index 418c1ae85..e8d98fa06 100644 --- a/tests/dictionaries/20_9default_information_parent/tiramisu/multi.py +++ b/tests/dictionaries/20_9default_information_parent/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,13 +15,13 @@ information_0 = ParamInformation("test_information", None) option_5 = StrOption(name="var2", doc="a second variable", default=Calculation(func['calc_value'], Params((information_0))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="family", doc="family", children=[option_4, option_5], properties=frozenset({"basic"})) information_0.set_option(optiondescription_3) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = StrOption(name="var1", doc="a first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) information_1 = ParamInformation("test_information", None) option_10 = StrOption(name="var2", doc="a second variable", default=Calculation(func['calc_value'], Params((information_1))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_8 = OptionDescription(name="family", doc="family", children=[option_9, option_10], properties=frozenset({"basic"})) information_1.set_option(optiondescription_8) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"basic"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/24_0family_hidden_condition/tiramisu/base.py b/tests/dictionaries/24_0family_hidden_condition/tiramisu/base.py index 8f099cbb3..6bfbba94d 100644 --- a/tests/dictionaries/24_0family_hidden_condition/tiramisu/base.py +++ b/tests/dictionaries/24_0family_hidden_condition/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,5 +15,5 @@ dict_env['hidden_rougail.family'] = "{% if rougail.condition == \"yes\" %}\ncond option_2 = StrOption(name="condition", doc="the variable use has condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.family.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.family.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="family", doc="possibly hidden family", children=[option_4], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/24_0family_hidden_condition/tiramisu/multi.py b/tests/dictionaries/24_0family_hidden_condition/tiramisu/multi.py index 58dca1273..b4640a093 100644 --- a/tests/dictionaries/24_0family_hidden_condition/tiramisu/multi.py +++ b/tests/dictionaries/24_0family_hidden_condition/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -13,11 +17,11 @@ dict_env['hidden_2.rougail.family'] = "{% if rougail.condition == \"yes\" %}\nco option_3 = StrOption(name="condition", doc="the variable use has condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.family.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.family.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_4 = OptionDescription(name="family", doc="possibly hidden family", children=[option_5], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="condition", doc="the variable use has condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.family.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.family.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_9 = OptionDescription(name="family", doc="possibly hidden family", children=[option_10], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"basic"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml b/tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml index ab867df45..8ad55dcda 100644 --- a/tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml @@ -9,4 +9,6 @@ family: condition is false {% endif %} description: if not condition - variable: # a variable + variable: + description: a variable + mandatory: false diff --git a/tests/dictionaries/24_0family_hidden_condition_boolean/makedict/mandatory.json b/tests/dictionaries/24_0family_hidden_condition_boolean/makedict/mandatory.json index 6084a0014..0637a088a 100644 --- a/tests/dictionaries/24_0family_hidden_condition_boolean/makedict/mandatory.json +++ b/tests/dictionaries/24_0family_hidden_condition_boolean/makedict/mandatory.json @@ -1 +1 @@ -["rougail.family.variable"] \ No newline at end of file +[] \ No newline at end of file diff --git a/tests/dictionaries/24_0family_hidden_condition_boolean/tiramisu/base.py b/tests/dictionaries/24_0family_hidden_condition_boolean/tiramisu/base.py index 639e07856..ac70a2e8a 100644 --- a/tests/dictionaries/24_0family_hidden_condition_boolean/tiramisu/base.py +++ b/tests/dictionaries/24_0family_hidden_condition_boolean/tiramisu/base.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['frozen_rougail.family.variable'] = "{% if not rougail.condition %}\ncondition is false\n{% endif %}\n" dict_env['hidden_rougail.family'] = "{% if not rougail.condition %}\ncondition is false\n{% endif %}\n" option_2 = BoolOption(name="condition", doc="a conditional variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_4 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_3 = OptionDescription(name="family", doc="a family", children=[option_4], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +option_4 = StrOption(name="variable", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_3 = OptionDescription(name="family", doc="a family", children=[option_4], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/24_0family_hidden_condition_boolean/tiramisu/multi.py b/tests/dictionaries/24_0family_hidden_condition_boolean/tiramisu/multi.py index 75f8c85c9..08148f4e7 100644 --- a/tests/dictionaries/24_0family_hidden_condition_boolean/tiramisu/multi.py +++ b/tests/dictionaries/24_0family_hidden_condition_boolean/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,13 +15,13 @@ dict_env['hidden_1.rougail.family'] = "{% if not rougail.condition %}\ncondition dict_env['frozen_2.rougail.family.variable'] = "{% if not rougail.condition %}\ncondition is false\n{% endif %}\n" dict_env['hidden_2.rougail.family'] = "{% if not rougail.condition %}\ncondition is false\n{% endif %}\n" option_3 = BoolOption(name="condition", doc="a conditional variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_5 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_4 = OptionDescription(name="family", doc="a family", children=[option_5], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) +option_5 = StrOption(name="variable", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_4 = OptionDescription(name="family", doc="a family", children=[option_5], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = BoolOption(name="condition", doc="a conditional variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_10 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_9 = OptionDescription(name="family", doc="a family", children=[option_10], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"basic"})) -optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) +option_10 = StrOption(name="variable", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_9 = OptionDescription(name="family", doc="a family", children=[option_10], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_8)}), help_function=func['jinja_to_property_help'])})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/24_0family_hidden_condition_sub_family/tiramisu/base.py b/tests/dictionaries/24_0family_hidden_condition_sub_family/tiramisu/base.py index dbffbe206..9ba3441a7 100644 --- a/tests/dictionaries/24_0family_hidden_condition_sub_family/tiramisu/base.py +++ b/tests/dictionaries/24_0family_hidden_condition_sub_family/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,5 +16,5 @@ option_2 = StrOption(name="condition", doc="the variable use has condition", def option_5 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.family.subfamily.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_sub_family/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.family.subfamily.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_4 = OptionDescription(name="subfamily", doc="subfamily", children=[option_5], properties=frozenset({"basic"})) optiondescription_3 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_4], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_sub_family/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/24_0family_hidden_condition_sub_family/tiramisu/multi.py b/tests/dictionaries/24_0family_hidden_condition_sub_family/tiramisu/multi.py index 1e2d99044..f5dc6919b 100644 --- a/tests/dictionaries/24_0family_hidden_condition_sub_family/tiramisu/multi.py +++ b/tests/dictionaries/24_0family_hidden_condition_sub_family/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -14,12 +18,12 @@ option_3 = StrOption(name="condition", doc="the variable use has condition", def option_6 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.family.subfamily.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_sub_family/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.family.subfamily.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_5 = OptionDescription(name="subfamily", doc="subfamily", children=[option_6], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_5], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_sub_family/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = StrOption(name="condition", doc="the variable use has condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_12 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.family.subfamily.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_sub_family/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.family.subfamily.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_9)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_11 = OptionDescription(name="subfamily", doc="subfamily", children=[option_12], properties=frozenset({"basic"})) optiondescription_10 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_11], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_sub_family/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_9)}), help_function=func['jinja_to_property_help'])})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/dictionaries/rougail/00-base.yml b/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/dictionaries/rougail/00-base.yml index b7216f691..a842134c7 100644 --- a/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/dictionaries/rougail/00-base.yml @@ -6,4 +6,6 @@ family: hidden: variable: _.condition subfamily: # a subfamily - var1: # a variable + var1: + description: a variable + mandatory: false diff --git a/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/makedict/mandatory.json b/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/makedict/mandatory.json index 181a2eee9..0637a088a 100644 --- a/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/makedict/mandatory.json +++ b/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/makedict/mandatory.json @@ -1 +1 @@ -["rougail.family.subfamily.var1"] \ No newline at end of file +[] \ No newline at end of file diff --git a/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/base.py b/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/base.py index 58a9a863d..66e1f2a5f 100644 --- a/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/base.py +++ b/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/base.py @@ -3,12 +3,16 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = BoolOption(name="condition", doc="the variable use has condition", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_5 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("frozen"), ParamOption(option_2)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_4 = OptionDescription(name="subfamily", doc="a subfamily", children=[option_5], properties=frozenset({"basic"})) -optiondescription_3 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_4], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((ParamValue("hidden"), ParamOption(option_2)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +option_5 = StrOption(name="var1", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['variable_to_property'], Params((ParamValue("frozen"), ParamOption(option_2)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) +optiondescription_4 = OptionDescription(name="subfamily", doc="a subfamily", children=[option_5], properties=frozenset({"standard"})) +optiondescription_3 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_4], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((ParamValue("hidden"), ParamOption(option_2)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/multi.py b/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/multi.py index e176508a3..e5c92785b 100644 --- a/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/multi.py +++ b/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/multi.py @@ -3,19 +3,23 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = BoolOption(name="condition", doc="the variable use has condition", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_6 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("frozen"), ParamOption(option_3)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="subfamily", doc="a subfamily", children=[option_6], properties=frozenset({"basic"})) -optiondescription_4 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_5], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((ParamValue("hidden"), ParamOption(option_3)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) +option_6 = StrOption(name="var1", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['variable_to_property'], Params((ParamValue("frozen"), ParamOption(option_3)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) +optiondescription_5 = OptionDescription(name="subfamily", doc="a subfamily", children=[option_6], properties=frozenset({"standard"})) +optiondescription_4 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_5], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((ParamValue("hidden"), ParamOption(option_3)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_9 = BoolOption(name="condition", doc="the variable use has condition", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_12 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("frozen"), ParamOption(option_9)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_11 = OptionDescription(name="subfamily", doc="a subfamily", children=[option_12], properties=frozenset({"basic"})) -optiondescription_10 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_11], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((ParamValue("hidden"), ParamOption(option_9)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) +option_12 = StrOption(name="var1", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['variable_to_property'], Params((ParamValue("frozen"), ParamOption(option_9)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) +optiondescription_11 = OptionDescription(name="subfamily", doc="a subfamily", children=[option_12], properties=frozenset({"standard"})) +optiondescription_10 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_11], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((ParamValue("hidden"), ParamOption(option_9)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/no_namespace.py b/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/no_namespace.py index cd157c186..30c9cb0c0 100644 --- a/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/no_namespace.py +++ b/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/no_namespace.py @@ -7,7 +7,7 @@ ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_1 = BoolOption(name="condition", doc="the variable use has condition", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_4 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("frozen"), ParamOption(option_1)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_3 = OptionDescription(name="subfamily", doc="a subfamily", children=[option_4], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_3], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((ParamValue("hidden"), ParamOption(option_1)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])})) +option_4 = StrOption(name="var1", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['variable_to_property'], Params((ParamValue("frozen"), ParamOption(option_1)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) +optiondescription_3 = OptionDescription(name="subfamily", doc="a subfamily", children=[option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_3], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((ParamValue("hidden"), ParamOption(option_1)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2]) diff --git a/tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml b/tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml index 0eeca7e03..394acaa48 100644 --- a/tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml @@ -18,3 +18,4 @@ family: condition2 is true {% endif %} description: if condition2 is false + mandatory: false diff --git a/tests/dictionaries/24_0family_hidden_condition_with_variable/makedict/mandatory.json b/tests/dictionaries/24_0family_hidden_condition_with_variable/makedict/mandatory.json index 6084a0014..0637a088a 100644 --- a/tests/dictionaries/24_0family_hidden_condition_with_variable/makedict/mandatory.json +++ b/tests/dictionaries/24_0family_hidden_condition_with_variable/makedict/mandatory.json @@ -1 +1 @@ -["rougail.family.variable"] \ No newline at end of file +[] \ No newline at end of file diff --git a/tests/dictionaries/24_0family_hidden_condition_with_variable/tiramisu/base.py b/tests/dictionaries/24_0family_hidden_condition_with_variable/tiramisu/base.py index 1b67da33d..c2da3e16c 100644 --- a/tests/dictionaries/24_0family_hidden_condition_with_variable/tiramisu/base.py +++ b/tests/dictionaries/24_0family_hidden_condition_with_variable/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,7 +16,7 @@ dict_env['frozen_rougail.family.variable_0'] = "{% if rougail.condition2 %}\ncon dict_env['hidden_rougail.family'] = "{% if not rougail.condition1 %}\ncondition1 is false\n{% endif %}\n" option_2 = BoolOption(name="condition1", doc="a first conditional variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_3 = BoolOption(name="condition2", doc="a second conditional variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_5 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition2': ParamOption(option_3)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition1': ParamOption(option_2)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.family.variable_0"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition2': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_4 = OptionDescription(name="family", doc="a family", children=[option_5], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition1': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, optiondescription_4], properties=frozenset({"basic"})) +option_5 = StrOption(name="variable", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition2': ParamOption(option_3)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition1': ParamOption(option_2)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.family.variable_0"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition2': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_4 = OptionDescription(name="family", doc="a family", children=[option_5], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition1': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, optiondescription_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/24_0family_hidden_condition_with_variable/tiramisu/multi.py b/tests/dictionaries/24_0family_hidden_condition_with_variable/tiramisu/multi.py index f92786d5c..111df28bf 100644 --- a/tests/dictionaries/24_0family_hidden_condition_with_variable/tiramisu/multi.py +++ b/tests/dictionaries/24_0family_hidden_condition_with_variable/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -16,14 +20,14 @@ dict_env['frozen_2.rougail.family.variable_0'] = "{% if rougail.condition2 %}\nc dict_env['hidden_2.rougail.family'] = "{% if not rougail.condition1 %}\ncondition1 is false\n{% endif %}\n" option_3 = BoolOption(name="condition1", doc="a first conditional variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_4 = BoolOption(name="condition2", doc="a second conditional variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_6 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition2': ParamOption(option_4)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition1': ParamOption(option_3)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.family.variable_0"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition2': ParamOption(option_4)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="family", doc="a family", children=[option_6], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition1': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, optiondescription_5], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) +option_6 = StrOption(name="variable", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition2': ParamOption(option_4)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition1': ParamOption(option_3)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.family.variable_0"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition2': ParamOption(option_4)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_5 = OptionDescription(name="family", doc="a family", children=[option_6], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition1': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, optiondescription_5], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_9 = BoolOption(name="condition1", doc="a first conditional variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_10 = BoolOption(name="condition2", doc="a second conditional variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_12 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition2': ParamOption(option_10)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition1': ParamOption(option_9)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.family.variable_0"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition2': ParamOption(option_10)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_11 = OptionDescription(name="family", doc="a family", children=[option_12], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition1': ParamOption(option_9)}), help_function=func['jinja_to_property_help'])})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, option_10, optiondescription_11], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) +option_12 = StrOption(name="variable", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition2': ParamOption(option_10)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.family.variable"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition1': ParamOption(option_9)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.family.variable_0"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.family.variable"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition2': ParamOption(option_10)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_11 = OptionDescription(name="family", doc="a family", children=[option_12], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_condition_with_variable/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition1': ParamOption(option_9)}), help_function=func['jinja_to_property_help'])})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, option_10, optiondescription_11], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/24_0family_hidden_param_condition_sub_family/tiramisu/base.py b/tests/dictionaries/24_0family_hidden_param_condition_sub_family/tiramisu/base.py index 9233c1332..385bd4cf0 100644 --- a/tests/dictionaries/24_0family_hidden_param_condition_sub_family/tiramisu/base.py +++ b/tests/dictionaries/24_0family_hidden_param_condition_sub_family/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,5 +16,5 @@ option_2 = StrOption(name="condition", doc="the variable use has condition", def option_5 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.family.sub_family.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_param_condition_sub_family/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.family.sub_family.var1"), 'condition': ParamOption(option_2), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_4 = OptionDescription(name="sub_family", doc="a subfamily", children=[option_5], properties=frozenset({"basic"})) optiondescription_3 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_4], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_param_condition_sub_family/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.family"), 'condition': ParamOption(option_2), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/24_0family_hidden_param_condition_sub_family/tiramisu/multi.py b/tests/dictionaries/24_0family_hidden_param_condition_sub_family/tiramisu/multi.py index 84e82ff02..747696acb 100644 --- a/tests/dictionaries/24_0family_hidden_param_condition_sub_family/tiramisu/multi.py +++ b/tests/dictionaries/24_0family_hidden_param_condition_sub_family/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -14,12 +18,12 @@ option_3 = StrOption(name="condition", doc="the variable use has condition", def option_6 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.family.sub_family.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_param_condition_sub_family/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.family.sub_family.var1"), 'condition': ParamOption(option_3), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_5 = OptionDescription(name="sub_family", doc="a subfamily", children=[option_6], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_5], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_param_condition_sub_family/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.family"), 'condition': ParamOption(option_3), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = StrOption(name="condition", doc="the variable use has condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_12 = StrOption(name="var1", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.family.sub_family.var1"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_param_condition_sub_family/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.family.sub_family.var1"), 'condition': ParamOption(option_9), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_11 = OptionDescription(name="sub_family", doc="a subfamily", children=[option_12], properties=frozenset({"basic"})) optiondescription_10 = OptionDescription(name="family", doc="possibly hidden family", children=[optiondescription_11], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.family"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_hidden_param_condition_sub_family/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.family"), 'condition': ParamOption(option_9), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/24_0family_mandatory_condition/tiramisu/base.py b/tests/dictionaries/24_0family_mandatory_condition/tiramisu/base.py index dd8ddb98b..ce9b67fc0 100644 --- a/tests/dictionaries/24_0family_mandatory_condition/tiramisu/base.py +++ b/tests/dictionaries/24_0family_mandatory_condition/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['mandatory_rougail.var'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" option_2 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var", doc="a variable", properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("mandatory")), kwargs={'__internal_jinja': ParamValue("mandatory_rougail.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_mandatory_condition/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("mandatory"), '__internal_variable': ParamValue("rougail.var"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/24_0family_mandatory_condition/tiramisu/multi.py b/tests/dictionaries/24_0family_mandatory_condition/tiramisu/multi.py index a4567c0ff..7b500af8d 100644 --- a/tests/dictionaries/24_0family_mandatory_condition/tiramisu/multi.py +++ b/tests/dictionaries/24_0family_mandatory_condition/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,10 +14,10 @@ dict_env['mandatory_1.rougail.var'] = "{% if _.condition == \"yes\" %}\nconditio dict_env['mandatory_2.rougail.var'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" option_3 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var", doc="a variable", properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("mandatory")), kwargs={'__internal_jinja': ParamValue("mandatory_1.rougail.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_mandatory_condition/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("mandatory"), '__internal_variable': ParamValue("1.rougail.var"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_7 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="var", doc="a variable", properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("mandatory")), kwargs={'__internal_jinja': ParamValue("mandatory_2.rougail.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/24_0family_mandatory_condition/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("mandatory"), '__internal_variable': ParamValue("2.rougail.var"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_7)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/24_0family_mandatory_condition_variable/tiramisu/base.py b/tests/dictionaries/24_0family_mandatory_condition_variable/tiramisu/base.py index 687a7e3d8..519724d6e 100644 --- a/tests/dictionaries/24_0family_mandatory_condition_variable/tiramisu/base.py +++ b/tests/dictionaries/24_0family_mandatory_condition_variable/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = BoolOption(name="condition", doc="a condition", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_3 = StrOption(name="var", doc="a variable", properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((ParamValue("mandatory"), ParamOption(option_2)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/24_0family_mandatory_condition_variable/tiramisu/multi.py b/tests/dictionaries/24_0family_mandatory_condition_variable/tiramisu/multi.py index 03c61d21e..247fbd102 100644 --- a/tests/dictionaries/24_0family_mandatory_condition_variable/tiramisu/multi.py +++ b/tests/dictionaries/24_0family_mandatory_condition_variable/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = BoolOption(name="condition", doc="a condition", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_4 = StrOption(name="var", doc="a variable", properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((ParamValue("mandatory"), ParamOption(option_3)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_7 = BoolOption(name="condition", doc="a condition", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_8 = StrOption(name="var", doc="a variable", properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((ParamValue("mandatory"), ParamOption(option_7)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/24_family_disabled_var_hidden/dictionaries/rougail/00-base.yml b/tests/dictionaries/24_family_disabled_var_hidden/dictionaries/rougail/00-base.yml new file mode 100644 index 000000000..d9f149c89 --- /dev/null +++ b/tests/dictionaries/24_family_disabled_var_hidden/dictionaries/rougail/00-base.yml @@ -0,0 +1,12 @@ +--- +version: 1.1 + +family: + disabled: true + + var1: true # A description + + var2: + description: A description + hidden: + variable: _.var1 diff --git a/tests/dictionaries/24_family_disabled_var_hidden/makedict/after.json b/tests/dictionaries/24_family_disabled_var_hidden/makedict/after.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/dictionaries/24_family_disabled_var_hidden/makedict/after.json @@ -0,0 +1 @@ +{} diff --git a/tests/dictionaries/24_family_disabled_var_hidden/makedict/base.json b/tests/dictionaries/24_family_disabled_var_hidden/makedict/base.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/dictionaries/24_family_disabled_var_hidden/makedict/base.json @@ -0,0 +1 @@ +{} diff --git a/tests/dictionaries/24_family_disabled_var_hidden/makedict/before.json b/tests/dictionaries/24_family_disabled_var_hidden/makedict/before.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/dictionaries/24_family_disabled_var_hidden/makedict/before.json @@ -0,0 +1 @@ +{} diff --git a/tests/dictionaries/24_family_disabled_var_hidden/makedict/mandatory.json b/tests/dictionaries/24_family_disabled_var_hidden/makedict/mandatory.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/tests/dictionaries/24_family_disabled_var_hidden/makedict/mandatory.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/dictionaries/24_family_disabled_var_hidden/tiramisu/base.py b/tests/dictionaries/24_family_disabled_var_hidden/tiramisu/base.py new file mode 100644 index 000000000..0e9487a51 --- /dev/null +++ b/tests/dictionaries/24_family_disabled_var_hidden/tiramisu/base.py @@ -0,0 +1,17 @@ +from tiramisu import * +from tiramisu.setting import ALLOWED_LEADER_PROPERTIES +from re import compile as re_compile +from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription +load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') +ALLOWED_LEADER_PROPERTIES.add("basic") +ALLOWED_LEADER_PROPERTIES.add("standard") +ALLOWED_LEADER_PROPERTIES.add("advanced") +option_3 = BoolOption(name="var1", doc="A description", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) +option_4 = StrOption(name="var2", doc="A description", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("hidden"), ParamOption(option_3)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((ParamValue("frozen"), ParamOption(option_3)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) +optiondescription_2 = OptionDescription(name="family", doc="family", children=[option_3, option_4], properties=frozenset({"basic", "disabled"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) +option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/24_family_disabled_var_hidden/tiramisu/multi.py b/tests/dictionaries/24_family_disabled_var_hidden/tiramisu/multi.py new file mode 100644 index 000000000..aec1f02b1 --- /dev/null +++ b/tests/dictionaries/24_family_disabled_var_hidden/tiramisu/multi.py @@ -0,0 +1,23 @@ +from tiramisu import * +from tiramisu.setting import ALLOWED_LEADER_PROPERTIES +from re import compile as re_compile +from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription +load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') +ALLOWED_LEADER_PROPERTIES.add("basic") +ALLOWED_LEADER_PROPERTIES.add("standard") +ALLOWED_LEADER_PROPERTIES.add("advanced") +option_4 = BoolOption(name="var1", doc="A description", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) +option_5 = StrOption(name="var2", doc="A description", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("hidden"), ParamOption(option_4)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((ParamValue("frozen"), ParamOption(option_4)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) +optiondescription_3 = OptionDescription(name="family", doc="family", children=[option_4, option_5], properties=frozenset({"basic", "disabled"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) +option_9 = BoolOption(name="var1", doc="A description", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) +option_10 = StrOption(name="var2", doc="A description", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("hidden"), ParamOption(option_9)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((ParamValue("frozen"), ParamOption(option_9)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) +optiondescription_8 = OptionDescription(name="family", doc="family", children=[option_9, option_10], properties=frozenset({"basic", "disabled"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) +option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/24_family_disabled_var_hidden/tiramisu/no_namespace.py b/tests/dictionaries/24_family_disabled_var_hidden/tiramisu/no_namespace.py new file mode 100644 index 000000000..bd08232de --- /dev/null +++ b/tests/dictionaries/24_family_disabled_var_hidden/tiramisu/no_namespace.py @@ -0,0 +1,12 @@ +from tiramisu import * +from tiramisu.setting import ALLOWED_LEADER_PROPERTIES +from re import compile as re_compile +from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription +load_functions('tests/dictionaries/../eosfunc/test.py') +ALLOWED_LEADER_PROPERTIES.add("basic") +ALLOWED_LEADER_PROPERTIES.add("standard") +ALLOWED_LEADER_PROPERTIES.add("advanced") +option_2 = BoolOption(name="var1", doc="A description", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) +option_3 = StrOption(name="var2", doc="A description", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("hidden"), ParamOption(option_2)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((ParamValue("frozen"), ParamOption(option_2)), kwargs={'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) +optiondescription_1 = OptionDescription(name="family", doc="family", children=[option_2, option_3], properties=frozenset({"basic", "disabled"})) +option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_0leadership/dictionaries/rougail/00-base.yml b/tests/dictionaries/40_0leadership/dictionaries/rougail/00-base.yml index 465a39d3e..f31311d89 100644 --- a/tests/dictionaries/40_0leadership/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/40_0leadership/dictionaries/rougail/00-base.yml @@ -3,8 +3,6 @@ version: '1.1' leader: description: a leadership type: leadership - leader: - description: a leader - multi: true + leader: # a leader follower1: # a follower follower2: # an other follower diff --git a/tests/dictionaries/40_0leadership/tiramisu/base.py b/tests/dictionaries/40_0leadership/tiramisu/base.py index 6e5a0a12e..9e899f4f7 100644 --- a/tests/dictionaries/40_0leadership/tiramisu/base.py +++ b/tests/dictionaries/40_0leadership/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,5 +14,5 @@ option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=froze option_4 = StrOption(name="follower1", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_5 = StrOption(name="follower2", doc="an other follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4, option_5], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_0leadership/tiramisu/multi.py b/tests/dictionaries/40_0leadership/tiramisu/multi.py index a9e33ecb6..03deac3ff 100644 --- a/tests/dictionaries/40_0leadership/tiramisu/multi.py +++ b/tests/dictionaries/40_0leadership/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,12 +14,12 @@ option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=froze option_5 = StrOption(name="follower1", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_6 = StrOption(name="follower2", doc="an other follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5, option_6], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_10 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_11 = StrOption(name="follower1", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_12 = StrOption(name="follower2", doc="an other follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_9 = Leadership(name="leader", doc="a leadership", children=[option_10, option_11, option_12], properties=frozenset({"basic"})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_9], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_9], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/40_0leadership_diff_name/tiramisu/base.py b/tests/dictionaries/40_0leadership_diff_name/tiramisu/base.py index caa461274..8e5c1f87e 100644 --- a/tests/dictionaries/40_0leadership_diff_name/tiramisu/base.py +++ b/tests/dictionaries/40_0leadership_diff_name/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,5 +14,5 @@ option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=froze option_4 = StrOption(name="follower1", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_5 = StrOption(name="follower2", doc="an other follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leadership", doc="a leadership", children=[option_3, option_4, option_5], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_0leadership_diff_name/tiramisu/multi.py b/tests/dictionaries/40_0leadership_diff_name/tiramisu/multi.py index cc85c4f19..6e0db7478 100644 --- a/tests/dictionaries/40_0leadership_diff_name/tiramisu/multi.py +++ b/tests/dictionaries/40_0leadership_diff_name/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,12 +14,12 @@ option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=froze option_5 = StrOption(name="follower1", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_6 = StrOption(name="follower2", doc="an other follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leadership", doc="a leadership", children=[option_4, option_5, option_6], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_10 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_11 = StrOption(name="follower1", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_12 = StrOption(name="follower2", doc="an other follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_9 = Leadership(name="leadership", doc="a leadership", children=[option_10, option_11, option_12], properties=frozenset({"basic"})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_9], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_9], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/40_0leadership_empty/tiramisu/base.py b/tests/dictionaries/40_0leadership_empty/tiramisu/base.py index c800d9e33..bb6ab55d2 100644 --- a/tests/dictionaries/40_0leadership_empty/tiramisu/base.py +++ b/tests/dictionaries/40_0leadership_empty/tiramisu/base.py @@ -3,8 +3,12 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[], properties=frozenset({"advanced"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[], properties=frozenset({"advanced"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_0leadership_empty/tiramisu/multi.py b/tests/dictionaries/40_0leadership_empty/tiramisu/multi.py index 9357fd228..f8a40b84b 100644 --- a/tests/dictionaries/40_0leadership_empty/tiramisu/multi.py +++ b/tests/dictionaries/40_0leadership_empty/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") diff --git a/tests/dictionaries/40_0leadership_follower_default_calculation/tiramisu/base.py b/tests/dictionaries/40_0leadership_follower_default_calculation/tiramisu/base.py index 7b5ef52ef..6346e1813 100644 --- a/tests/dictionaries/40_0leadership_follower_default_calculation/tiramisu/base.py +++ b/tests/dictionaries/40_0leadership_follower_default_calculation/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,5 +15,5 @@ option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=froze option_4 = StrOption(name="follower1", doc="a follower", multi=True, default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="follower2", doc="a second follower", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.leader.follower2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_0leadership_follower_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.leader.follower2"), '_.follower1': ParamOption(option_4)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4, option_5], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_0leadership_follower_default_calculation/tiramisu/multi.py b/tests/dictionaries/40_0leadership_follower_default_calculation/tiramisu/multi.py index bc06b25c7..c8201eef5 100644 --- a/tests/dictionaries/40_0leadership_follower_default_calculation/tiramisu/multi.py +++ b/tests/dictionaries/40_0leadership_follower_default_calculation/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,12 +16,12 @@ option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=froze option_5 = StrOption(name="follower1", doc="a follower", multi=True, default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="follower2", doc="a second follower", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.leader.follower2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_0leadership_follower_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.leader.follower2"), '_.follower1': ParamOption(option_5)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5, option_6], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_10 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_11 = StrOption(name="follower1", doc="a follower", multi=True, default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_12 = StrOption(name="follower2", doc="a second follower", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.leader.follower2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_0leadership_follower_default_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.leader.follower2"), '_.follower1': ParamOption(option_11)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_9 = Leadership(name="leader", doc="a leadership", children=[option_10, option_11, option_12], properties=frozenset({"basic"})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_9], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_9], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/40_0leadership_follower_default_submulti/tiramisu/base.py b/tests/dictionaries/40_0leadership_follower_default_submulti/tiramisu/base.py index b0fb8ffa9..46aa04030 100644 --- a/tests/dictionaries/40_0leadership_follower_default_submulti/tiramisu/base.py +++ b/tests/dictionaries/40_0leadership_follower_default_submulti/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,5 +14,5 @@ option_3 = StrOption(name="leader", doc="a leader", multi=True, default=["leader option_4 = StrOption(name="follower1", doc="a follower1", multi=submulti, default_multi=["value"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="follower2", doc="a follower2", multi=submulti, default_multi=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4, option_5], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_0leadership_follower_default_submulti/tiramisu/multi.py b/tests/dictionaries/40_0leadership_follower_default_submulti/tiramisu/multi.py index 53192e199..b2cd664ee 100644 --- a/tests/dictionaries/40_0leadership_follower_default_submulti/tiramisu/multi.py +++ b/tests/dictionaries/40_0leadership_follower_default_submulti/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,12 +14,12 @@ option_4 = StrOption(name="leader", doc="a leader", multi=True, default=["leader option_5 = StrOption(name="follower1", doc="a follower1", multi=submulti, default_multi=["value"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="follower2", doc="a follower2", multi=submulti, default_multi=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5, option_6], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_10 = StrOption(name="leader", doc="a leader", multi=True, default=["leader"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_11 = StrOption(name="follower1", doc="a follower1", multi=submulti, default_multi=["value"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_12 = StrOption(name="follower2", doc="a follower2", multi=submulti, default_multi=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_9 = Leadership(name="leader", doc="a leadership", children=[option_10, option_11, option_12], properties=frozenset({"standard"})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_9], properties=frozenset({"standard"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_9], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/40_0leadership_follower_default_submulti_calculation/tiramisu/base.py b/tests/dictionaries/40_0leadership_follower_default_submulti_calculation/tiramisu/base.py index 4d1cdbf6e..779f7b67b 100644 --- a/tests/dictionaries/40_0leadership_follower_default_submulti_calculation/tiramisu/base.py +++ b/tests/dictionaries/40_0leadership_follower_default_submulti_calculation/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,5 +14,5 @@ option_3 = StrOption(name="leader", doc="the leader", multi=True, default=["lead option_4 = StrOption(name="follower1", doc="the follower1", multi=submulti, default_multi=["value"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="follower2", doc="the follower2", multi=submulti, default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4, option_5], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_0leadership_follower_default_submulti_calculation/tiramisu/multi.py b/tests/dictionaries/40_0leadership_follower_default_submulti_calculation/tiramisu/multi.py index 0546826a4..dcc248954 100644 --- a/tests/dictionaries/40_0leadership_follower_default_submulti_calculation/tiramisu/multi.py +++ b/tests/dictionaries/40_0leadership_follower_default_submulti_calculation/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,12 +14,12 @@ option_4 = StrOption(name="leader", doc="the leader", multi=True, default=["lead option_5 = StrOption(name="follower1", doc="the follower1", multi=submulti, default_multi=["value"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="follower2", doc="the follower2", multi=submulti, default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5, option_6], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_10 = StrOption(name="leader", doc="the leader", multi=True, default=["leader"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_11 = StrOption(name="follower1", doc="the follower1", multi=submulti, default_multi=["value"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_12 = StrOption(name="follower2", doc="the follower2", multi=submulti, default=Calculation(func['calc_value'], Params((ParamOption(option_11)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_9 = Leadership(name="leader", doc="a leadership", children=[option_10, option_11, option_12], properties=frozenset({"standard"})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_9], properties=frozenset({"standard"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_9], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/40_0leadership_follower_default_value/tiramisu/base.py b/tests/dictionaries/40_0leadership_follower_default_value/tiramisu/base.py index b8cf05b19..709313bd1 100644 --- a/tests/dictionaries/40_0leadership_follower_default_value/tiramisu/base.py +++ b/tests/dictionaries/40_0leadership_follower_default_value/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_4 = StrOption(name="follower1", doc="a follower with default value", multi=True, default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_0leadership_follower_default_value/tiramisu/multi.py b/tests/dictionaries/40_0leadership_follower_default_value/tiramisu/multi.py index ea40df054..5089651ee 100644 --- a/tests/dictionaries/40_0leadership_follower_default_value/tiramisu/multi.py +++ b/tests/dictionaries/40_0leadership_follower_default_value/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_5 = StrOption(name="follower1", doc="a follower with default value", multi=True, default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_9 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_10 = StrOption(name="follower1", doc="a follower with default value", multi=True, default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_8 = Leadership(name="leader", doc="a leadership", children=[option_9, option_10], properties=frozenset({"standard"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/40_0leadership_leader_not_multi/tiramisu/base.py b/tests/dictionaries/40_0leadership_leader_not_multi/tiramisu/base.py index f6f2c5115..5be360ea4 100644 --- a/tests/dictionaries/40_0leadership_leader_not_multi/tiramisu/base.py +++ b/tests/dictionaries/40_0leadership_leader_not_multi/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -13,5 +17,5 @@ option_7 = StrOption(name="follower1", doc="follower1", multi=True, properties=f option_8 = StrOption(name="follower2", doc="follower2", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_5 = Leadership(name="leader", doc="leader", children=[option_6, option_7, option_8], properties=frozenset({"basic"})) optiondescription_4 = OptionDescription(name="general1", doc="general1", children=[optiondescription_5], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2, optiondescription_4], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_0leadership_leader_not_multi/tiramisu/multi.py b/tests/dictionaries/40_0leadership_leader_not_multi/tiramisu/multi.py index 9900e6a2c..95c82f7e8 100644 --- a/tests/dictionaries/40_0leadership_leader_not_multi/tiramisu/multi.py +++ b/tests/dictionaries/40_0leadership_leader_not_multi/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -13,7 +17,7 @@ option_8 = StrOption(name="follower1", doc="follower1", multi=True, properties=f option_9 = StrOption(name="follower2", doc="follower2", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_6 = Leadership(name="leader", doc="leader", children=[option_7, option_8, option_9], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="general1", doc="general1", children=[optiondescription_6], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3, optiondescription_5], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3, optiondescription_5], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_13 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_12 = OptionDescription(name="general", doc="general", children=[option_13], properties=frozenset({"standard"})) @@ -22,6 +26,6 @@ option_17 = StrOption(name="follower1", doc="follower1", multi=True, properties= option_18 = StrOption(name="follower2", doc="follower2", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_15 = Leadership(name="leader", doc="leader", children=[option_16, option_17, option_18], properties=frozenset({"basic"})) optiondescription_14 = OptionDescription(name="general1", doc="general1", children=[optiondescription_15], properties=frozenset({"basic"})) -optiondescription_11 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_12, optiondescription_14], properties=frozenset({"basic"})) +optiondescription_11 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_12, optiondescription_14], properties=frozenset({"basic"})) optiondescription_10 = OptionDescription(name="2", doc="2", children=[optiondescription_11], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_10]) diff --git a/tests/dictionaries/40_1leadership_append_follower/tiramisu/base.py b/tests/dictionaries/40_1leadership_append_follower/tiramisu/base.py index 599318840..20a5d34df 100644 --- a/tests/dictionaries/40_1leadership_append_follower/tiramisu/base.py +++ b/tests/dictionaries/40_1leadership_append_follower/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,5 +15,5 @@ option_4 = StrOption(name="follower1", doc="the follower1", multi=True, properti option_5 = StrOption(name="follower2", doc="the follower2", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_6 = StrOption(name="follower3", doc="the follower3", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4, option_5, option_6], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_1leadership_append_follower/tiramisu/multi.py b/tests/dictionaries/40_1leadership_append_follower/tiramisu/multi.py index f8fb86dfa..15a6ee5b4 100644 --- a/tests/dictionaries/40_1leadership_append_follower/tiramisu/multi.py +++ b/tests/dictionaries/40_1leadership_append_follower/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,13 +15,13 @@ option_5 = StrOption(name="follower1", doc="the follower1", multi=True, properti option_6 = StrOption(name="follower2", doc="the follower2", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_7 = StrOption(name="follower3", doc="the follower3", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5, option_6, option_7], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_11 = StrOption(name="leader", doc="the leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_12 = StrOption(name="follower1", doc="the follower1", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_13 = StrOption(name="follower2", doc="the follower2", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_14 = StrOption(name="follower3", doc="the follower3", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_10 = Leadership(name="leader", doc="a leadership", children=[option_11, option_12, option_13, option_14], properties=frozenset({"basic"})) -optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_10], properties=frozenset({"basic"})) +optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_10], properties=frozenset({"basic"})) optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_8]) diff --git a/tests/dictionaries/40_2leadership_calculation_index/tiramisu/base.py b/tests/dictionaries/40_2leadership_calculation_index/tiramisu/base.py index 5a411d209..fa0ea96e6 100644 --- a/tests/dictionaries/40_2leadership_calculation_index/tiramisu/base.py +++ b/tests/dictionaries/40_2leadership_calculation_index/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="leader", doc="a leader", multi=True, default=["a", "b", "c"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = IntOption(name="follower1", doc="a follower", multi=True, default=Calculation(func['calc_value'], Params((ParamIndex()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_2leadership_calculation_index/tiramisu/multi.py b/tests/dictionaries/40_2leadership_calculation_index/tiramisu/multi.py index 38eedbac0..4391a8891 100644 --- a/tests/dictionaries/40_2leadership_calculation_index/tiramisu/multi.py +++ b/tests/dictionaries/40_2leadership_calculation_index/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="leader", doc="a leader", multi=True, default=["a", "b", "c"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = IntOption(name="follower1", doc="a follower", multi=True, default=Calculation(func['calc_value'], Params((ParamIndex()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_9 = StrOption(name="leader", doc="a leader", multi=True, default=["a", "b", "c"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = IntOption(name="follower1", doc="a follower", multi=True, default=Calculation(func['calc_value'], Params((ParamIndex()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) optiondescription_8 = Leadership(name="leader", doc="a leadership", children=[option_9, option_10], properties=frozenset({"standard"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/40_2leadership_calculation_param_index/tiramisu/base.py b/tests/dictionaries/40_2leadership_calculation_param_index/tiramisu/base.py index bfa033b47..e91a9ea6d 100644 --- a/tests/dictionaries/40_2leadership_calculation_param_index/tiramisu/base.py +++ b/tests/dictionaries/40_2leadership_calculation_param_index/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,5 +14,5 @@ dict_env['default_rougail.leader.follower1'] = "{{ index }}" option_3 = StrOption(name="leader", doc="a leader", multi=True, default=["a", "b", "c"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = IntOption(name="follower1", doc="a follower", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.leader.follower1"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_2leadership_calculation_param_index/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.leader.follower1"), 'index': ParamIndex()})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) optiondescription_2 = Leadership(name="leader", doc="leadership", children=[option_3, option_4], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_2leadership_calculation_param_index/tiramisu/multi.py b/tests/dictionaries/40_2leadership_calculation_param_index/tiramisu/multi.py index 286dbccd0..c70caef71 100644 --- a/tests/dictionaries/40_2leadership_calculation_param_index/tiramisu/multi.py +++ b/tests/dictionaries/40_2leadership_calculation_param_index/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,11 +15,11 @@ dict_env['default_2.rougail.leader.follower1'] = "{{ index }}" option_4 = StrOption(name="leader", doc="a leader", multi=True, default=["a", "b", "c"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = IntOption(name="follower1", doc="a follower", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.leader.follower1"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_2leadership_calculation_param_index/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.leader.follower1"), 'index': ParamIndex()})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) optiondescription_3 = Leadership(name="leader", doc="leadership", children=[option_4, option_5], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_9 = StrOption(name="leader", doc="a leader", multi=True, default=["a", "b", "c"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = IntOption(name="follower1", doc="a follower", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.leader.follower1"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_2leadership_calculation_param_index/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.leader.follower1"), 'index': ParamIndex()})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) optiondescription_8 = Leadership(name="leader", doc="leadership", children=[option_9, option_10], properties=frozenset({"standard"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/40_2leadership_leader_calculation/dictionaries/rougail/00-base.yml b/tests/dictionaries/40_2leadership_leader_calculation/dictionaries/rougail/00-base.yml index 7689f222d..a8fb9e533 100644 --- a/tests/dictionaries/40_2leadership_leader_calculation/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/40_2leadership_leader_calculation/dictionaries/rougail/00-base.yml @@ -1,8 +1,10 @@ --- version: '1.1' + leader: description: a leadership type: leadership + leader: description: a leader multi: true @@ -11,5 +13,7 @@ leader: val1 val2 description: returns val1 and val2 + follower1: # a first follower + follower2: # a second follower diff --git a/tests/dictionaries/40_2leadership_leader_calculation/tiramisu/base.py b/tests/dictionaries/40_2leadership_leader_calculation/tiramisu/base.py index 675551da8..0f8f98602 100644 --- a/tests/dictionaries/40_2leadership_leader_calculation/tiramisu/base.py +++ b/tests/dictionaries/40_2leadership_leader_calculation/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,5 +15,5 @@ option_3 = StrOption(name="leader", doc="a leader", multi=True, default=Calculat option_4 = StrOption(name="follower1", doc="a first follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_5 = StrOption(name="follower2", doc="a second follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4, option_5], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_2leadership_leader_calculation/tiramisu/multi.py b/tests/dictionaries/40_2leadership_leader_calculation/tiramisu/multi.py index 6d3b794ee..9565fd1d6 100644 --- a/tests/dictionaries/40_2leadership_leader_calculation/tiramisu/multi.py +++ b/tests/dictionaries/40_2leadership_leader_calculation/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,12 +16,12 @@ option_4 = StrOption(name="leader", doc="a leader", multi=True, default=Calculat option_5 = StrOption(name="follower1", doc="a first follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_6 = StrOption(name="follower2", doc="a second follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5, option_6], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_10 = StrOption(name="leader", doc="a leader", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/40_2leadership_leader_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.leader.leader")})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_11 = StrOption(name="follower1", doc="a first follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_12 = StrOption(name="follower2", doc="a second follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_9 = Leadership(name="leader", doc="a leadership", children=[option_10, option_11, option_12], properties=frozenset({"basic"})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_9], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_9], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/40_6leadership_follower_multi/tiramisu/base.py b/tests/dictionaries/40_6leadership_follower_multi/tiramisu/base.py index b36febd80..ceb9e9dc5 100644 --- a/tests/dictionaries/40_6leadership_follower_multi/tiramisu/base.py +++ b/tests/dictionaries/40_6leadership_follower_multi/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,5 +14,5 @@ option_3 = StrOption(name="leader", doc="The leader", multi=True, properties=fro option_4 = StrOption(name="follower1", doc="The first follower", multi=submulti, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_5 = StrOption(name="follower2", doc="The second follower", multi=submulti, default_multi=["value"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leadership", doc="A leadership", children=[option_3, option_4, option_5], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_6leadership_follower_multi/tiramisu/multi.py b/tests/dictionaries/40_6leadership_follower_multi/tiramisu/multi.py index 93cf12649..f101f5c28 100644 --- a/tests/dictionaries/40_6leadership_follower_multi/tiramisu/multi.py +++ b/tests/dictionaries/40_6leadership_follower_multi/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,12 +14,12 @@ option_4 = StrOption(name="leader", doc="The leader", multi=True, properties=fro option_5 = StrOption(name="follower1", doc="The first follower", multi=submulti, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_6 = StrOption(name="follower2", doc="The second follower", multi=submulti, default_multi=["value"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leadership", doc="A leadership", children=[option_4, option_5, option_6], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_10 = StrOption(name="leader", doc="The leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_11 = StrOption(name="follower1", doc="The first follower", multi=submulti, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_12 = StrOption(name="follower2", doc="The second follower", multi=submulti, default_multi=["value"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_9 = Leadership(name="leadership", doc="A leadership", children=[option_10, option_11, option_12], properties=frozenset({"basic"})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_9], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_9], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/40_8calculation_boolean/tiramisu/base.py b/tests/dictionaries/40_8calculation_boolean/tiramisu/base.py index 9d0978564..cc7832646 100644 --- a/tests/dictionaries/40_8calculation_boolean/tiramisu/base.py +++ b/tests/dictionaries/40_8calculation_boolean/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,5 +15,5 @@ dict_env['default_rougail.multi2'] = "{% if not _.bool %}\nTrue\nFalse\n{% else option_2 = BoolOption(name="bool", doc="a boolean variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_3 = BoolOption(name="multi1", doc="a first multi variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.multi1"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.multi1"), '_.bool': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_4 = BoolOption(name="multi2", doc="a second multi variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.multi2"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.multi2"), '_.bool': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_8calculation_boolean/tiramisu/multi.py b/tests/dictionaries/40_8calculation_boolean/tiramisu/multi.py index 2fdf4272e..c7f57c48b 100644 --- a/tests/dictionaries/40_8calculation_boolean/tiramisu/multi.py +++ b/tests/dictionaries/40_8calculation_boolean/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -13,11 +17,11 @@ dict_env['default_2.rougail.multi2'] = "{% if not _.bool %}\nTrue\nFalse\n{% els option_3 = BoolOption(name="bool", doc="a boolean variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_4 = BoolOption(name="multi1", doc="a first multi variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.multi1"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.multi1"), '_.bool': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_5 = BoolOption(name="multi2", doc="a second multi variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.multi2"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.multi2"), '_.bool': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = BoolOption(name="bool", doc="a boolean variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_9 = BoolOption(name="multi1", doc="a first multi variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.multi1"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.multi1"), '_.bool': ParamOption(option_8)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_10 = BoolOption(name="multi2", doc="a second multi variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.multi2"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_boolean/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.multi2"), '_.bool': ParamOption(option_8)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/40_8calculation_boolean_return_none/tiramisu/base.py b/tests/dictionaries/40_8calculation_boolean_return_none/tiramisu/base.py index 03e6a5090..2cc35b7c1 100644 --- a/tests/dictionaries/40_8calculation_boolean_return_none/tiramisu/base.py +++ b/tests/dictionaries/40_8calculation_boolean_return_none/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.var2'] = "{% if rougail.var1 == 'no' %}\nfalse\n{% endif %}\n" option_2 = StrOption(name="var1", doc="a first variable", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = BoolOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_boolean_return_none/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2"), 'rougail.var1': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_8calculation_boolean_return_none/tiramisu/multi.py b/tests/dictionaries/40_8calculation_boolean_return_none/tiramisu/multi.py index eb3b6bf39..f868fceec 100644 --- a/tests/dictionaries/40_8calculation_boolean_return_none/tiramisu/multi.py +++ b/tests/dictionaries/40_8calculation_boolean_return_none/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,10 +14,10 @@ dict_env['default_1.rougail.var2'] = "{% if rougail.var1 == 'no' %}\nfalse\n{% e dict_env['default_2.rougail.var2'] = "{% if rougail.var1 == 'no' %}\nfalse\n{% endif %}\n" option_3 = StrOption(name="var1", doc="a first variable", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = BoolOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_boolean_return_none/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'rougail.var1': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_7 = StrOption(name="var1", doc="a first variable", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = BoolOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_boolean_return_none/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'rougail.var1': ParamOption(option_7)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_7, option_8], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/40_8calculation_integer/tiramisu/base.py b/tests/dictionaries/40_8calculation_integer/tiramisu/base.py index 3cee7d447..123144908 100644 --- a/tests/dictionaries/40_8calculation_integer/tiramisu/base.py +++ b/tests/dictionaries/40_8calculation_integer/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,5 +15,5 @@ dict_env['default_rougail.int2'] = "{% if not rougail.bool %}3{% else %}4{% endi option_2 = BoolOption(name="bool", doc="a boolean variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_3 = IntOption(name="int1", doc="first integer variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.int1"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_integer/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.int1"), 'rougail.bool': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_4 = IntOption(name="int2", doc="second integer variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.int2"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_integer/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.int2"), 'rougail.bool': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_8calculation_integer/tiramisu/multi.py b/tests/dictionaries/40_8calculation_integer/tiramisu/multi.py index 4d66ff1e3..06cac226a 100644 --- a/tests/dictionaries/40_8calculation_integer/tiramisu/multi.py +++ b/tests/dictionaries/40_8calculation_integer/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -13,11 +17,11 @@ dict_env['default_2.rougail.int2'] = "{% if not rougail.bool %}3{% else %}4{% en option_3 = BoolOption(name="bool", doc="a boolean variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_4 = IntOption(name="int1", doc="first integer variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.int1"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_integer/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.int1"), 'rougail.bool': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_5 = IntOption(name="int2", doc="second integer variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.int2"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_integer/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.int2"), 'rougail.bool': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = BoolOption(name="bool", doc="a boolean variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_9 = IntOption(name="int1", doc="first integer variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.int1"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_integer/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.int1"), 'rougail.bool': ParamOption(option_8)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_10 = IntOption(name="int2", doc="second integer variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.int2"), '__internal_type': ParamValue("number"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/40_8calculation_integer/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.int2"), 'rougail.bool': ParamOption(option_8)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/40_8calculation_multi_variable/tiramisu/base.py b/tests/dictionaries/40_8calculation_multi_variable/tiramisu/base.py index 34c8e225d..394de124e 100644 --- a/tests/dictionaries/40_8calculation_multi_variable/tiramisu/base.py +++ b/tests/dictionaries/40_8calculation_multi_variable/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var3", doc="a third variable", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_2 = StrOption(name="var", doc="a first variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_3)))), Calculation(func['calc_value'], Params((ParamOption(option_4))))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_3)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, option_4], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, option_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_8calculation_multi_variable/tiramisu/multi.py b/tests/dictionaries/40_8calculation_multi_variable/tiramisu/multi.py index 2f6ad27c8..85ef763e2 100644 --- a/tests/dictionaries/40_8calculation_multi_variable/tiramisu/multi.py +++ b/tests/dictionaries/40_8calculation_multi_variable/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="var3", doc="a third variable", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var", doc="a first variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_4)))), Calculation(func['calc_value'], Params((ParamOption(option_5))))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, option_5], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, option_5], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_9 = StrOption(name="var2", doc="a second variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = StrOption(name="var3", doc="a third variable", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="var", doc="a first variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_9)))), Calculation(func['calc_value'], Params((ParamOption(option_10))))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_9)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, option_9, option_10], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, option_9, option_10], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/40_8calculation_multi_variable_parent/tiramisu/base.py b/tests/dictionaries/40_8calculation_multi_variable_parent/tiramisu/base.py index d81bbcc11..073a5b16b 100644 --- a/tests/dictionaries/40_8calculation_multi_variable_parent/tiramisu/base.py +++ b/tests/dictionaries/40_8calculation_multi_variable_parent/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="a variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var", doc="a calculated variable", default=Calculation(func['calc_value'], Params((ParamOption(option_2)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="fam1", doc="a family", children=[option_4], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_8calculation_multi_variable_parent/tiramisu/multi.py b/tests/dictionaries/40_8calculation_multi_variable_parent/tiramisu/multi.py index 051984373..e3baeca7c 100644 --- a/tests/dictionaries/40_8calculation_multi_variable_parent/tiramisu/multi.py +++ b/tests/dictionaries/40_8calculation_multi_variable_parent/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="a variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="var", doc="a calculated variable", default=Calculation(func['calc_value'], Params((ParamOption(option_3)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_4 = OptionDescription(name="fam1", doc="a family", children=[option_5], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="var", doc="a variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = StrOption(name="var", doc="a calculated variable", default=Calculation(func['calc_value'], Params((ParamOption(option_8)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_9 = OptionDescription(name="fam1", doc="a family", children=[option_10], properties=frozenset({"standard"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/40_8calculation_multi_variable_parent2/tiramisu/base.py b/tests/dictionaries/40_8calculation_multi_variable_parent2/tiramisu/base.py index 9697b8290..79621373d 100644 --- a/tests/dictionaries/40_8calculation_multi_variable_parent2/tiramisu/base.py +++ b/tests/dictionaries/40_8calculation_multi_variable_parent2/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,5 +14,5 @@ option_3 = StrOption(name="var", doc="a variable", default="no", properties=froz optiondescription_2 = OptionDescription(name="fam1", doc="first family", children=[option_3], properties=frozenset({"standard"})) option_5 = StrOption(name="var", doc="a varaible", default=Calculation(func['calc_value'], Params((ParamOption(option_3)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_4 = OptionDescription(name="fam2", doc="second family", children=[option_5], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2, optiondescription_4], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2, optiondescription_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/40_8calculation_multi_variable_parent2/tiramisu/multi.py b/tests/dictionaries/40_8calculation_multi_variable_parent2/tiramisu/multi.py index 17ad2f6e9..c3e3a961f 100644 --- a/tests/dictionaries/40_8calculation_multi_variable_parent2/tiramisu/multi.py +++ b/tests/dictionaries/40_8calculation_multi_variable_parent2/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,12 +14,12 @@ option_4 = StrOption(name="var", doc="a variable", default="no", properties=froz optiondescription_3 = OptionDescription(name="fam1", doc="first family", children=[option_4], properties=frozenset({"standard"})) option_6 = StrOption(name="var", doc="a varaible", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_5 = OptionDescription(name="fam2", doc="second family", children=[option_6], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3, optiondescription_5], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3, optiondescription_5], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_10 = StrOption(name="var", doc="a variable", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_9 = OptionDescription(name="fam1", doc="first family", children=[option_10], properties=frozenset({"standard"})) option_12 = StrOption(name="var", doc="a varaible", default=Calculation(func['calc_value'], Params((ParamOption(option_10)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_11 = OptionDescription(name="fam2", doc="second family", children=[option_12], properties=frozenset({"standard"})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_9, optiondescription_11], properties=frozenset({"standard"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_9, optiondescription_11], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/41_0choice_leader/tiramisu/base.py b/tests/dictionaries/41_0choice_leader/tiramisu/base.py index 59d5f4be7..21aba90ab 100644 --- a/tests/dictionaries/41_0choice_leader/tiramisu/base.py +++ b/tests/dictionaries/41_0choice_leader/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="leader", doc="The leader", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_4 = ChoiceOption(name="follower1", doc="A follower", values=("a", "b", "c"), multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) optiondescription_2 = Leadership(name="leader", doc="The leadership", children=[option_3, option_4], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/41_0choice_leader/tiramisu/multi.py b/tests/dictionaries/41_0choice_leader/tiramisu/multi.py index 21a14ba5f..97da21961 100644 --- a/tests/dictionaries/41_0choice_leader/tiramisu/multi.py +++ b/tests/dictionaries/41_0choice_leader/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="leader", doc="The leader", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_5 = ChoiceOption(name="follower1", doc="A follower", values=("a", "b", "c"), multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) optiondescription_3 = Leadership(name="leader", doc="The leadership", children=[option_4, option_5], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = StrOption(name="leader", doc="The leader", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_10 = ChoiceOption(name="follower1", doc="A follower", values=("a", "b", "c"), multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) optiondescription_8 = Leadership(name="leader", doc="The leadership", children=[option_9, option_10], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"basic"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/44_0leadership_hidden/dictionaries/rougail/00-base.yml b/tests/dictionaries/44_0leadership_hidden/dictionaries/rougail/00-base.yml index 89eff44a0..3eb68fd9c 100644 --- a/tests/dictionaries/44_0leadership_hidden/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/44_0leadership_hidden/dictionaries/rougail/00-base.yml @@ -1,8 +1,11 @@ --- version: '1.1' + leader: description: a leadership hidden: true type: leadership - leader: [] # a leader + + leader: # a leader + follower: # a follower diff --git a/tests/dictionaries/44_0leadership_hidden/makedict/mandatory.json b/tests/dictionaries/44_0leadership_hidden/makedict/mandatory.json index 8e267443d..0637a088a 100644 --- a/tests/dictionaries/44_0leadership_hidden/makedict/mandatory.json +++ b/tests/dictionaries/44_0leadership_hidden/makedict/mandatory.json @@ -1 +1 @@ -["rougail.leader.leader"] \ No newline at end of file +[] \ No newline at end of file diff --git a/tests/dictionaries/44_0leadership_hidden/tiramisu/base.py b/tests/dictionaries/44_0leadership_hidden/tiramisu/base.py index bf40e0c67..a6b3dad44 100644 --- a/tests/dictionaries/44_0leadership_hidden/tiramisu/base.py +++ b/tests/dictionaries/44_0leadership_hidden/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_4 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4], properties=frozenset({"basic", "hidden"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_4 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4], properties=frozenset({"hidden", "standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/44_0leadership_hidden/tiramisu/multi.py b/tests/dictionaries/44_0leadership_hidden/tiramisu/multi.py index 03fbd89ab..02cb66c33 100644 --- a/tests/dictionaries/44_0leadership_hidden/tiramisu/multi.py +++ b/tests/dictionaries/44_0leadership_hidden/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_5 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5], properties=frozenset({"basic", "hidden"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) -option_9 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_10 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_8 = Leadership(name="leader", doc="a leadership", children=[option_9, option_10], properties=frozenset({"basic", "hidden"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"basic"})) -optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) +option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_5 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5], properties=frozenset({"hidden", "standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) +option_9 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_10 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_8 = Leadership(name="leader", doc="a leadership", children=[option_9, option_10], properties=frozenset({"hidden", "standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/44_0leadership_hidden/tiramisu/no_namespace.py b/tests/dictionaries/44_0leadership_hidden/tiramisu/no_namespace.py index 2d5bb4831..16b5df2c6 100644 --- a/tests/dictionaries/44_0leadership_hidden/tiramisu/no_namespace.py +++ b/tests/dictionaries/44_0leadership_hidden/tiramisu/no_namespace.py @@ -6,7 +6,7 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_2 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_3 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = Leadership(name="leader", doc="a leadership", children=[option_2, option_3], properties=frozenset({"basic", "hidden"})) +option_2 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_3 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_1 = Leadership(name="leader", doc="a leadership", children=[option_2, option_3], properties=frozenset({"hidden", "standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/44_0leadership_leader_hidden/dictionaries/rougail/00-base.yml b/tests/dictionaries/44_0leadership_leader_hidden/dictionaries/rougail/00-base.yml index ebec5e4c5..63fe6da1a 100644 --- a/tests/dictionaries/44_0leadership_leader_hidden/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/44_0leadership_leader_hidden/dictionaries/rougail/00-base.yml @@ -1,9 +1,12 @@ version: '1.1' + leader: description: a leadership type: leadership + leader: description: a leader multi: true hidden: true + follower: # a follower diff --git a/tests/dictionaries/44_0leadership_leader_hidden/makedict/mandatory.json b/tests/dictionaries/44_0leadership_leader_hidden/makedict/mandatory.json index 8e267443d..0637a088a 100644 --- a/tests/dictionaries/44_0leadership_leader_hidden/makedict/mandatory.json +++ b/tests/dictionaries/44_0leadership_leader_hidden/makedict/mandatory.json @@ -1 +1 @@ -["rougail.leader.leader"] \ No newline at end of file +[] \ No newline at end of file diff --git a/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/base.py b/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/base.py index bf40e0c67..a6b3dad44 100644 --- a/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/base.py +++ b/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_4 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4], properties=frozenset({"basic", "hidden"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_4 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4], properties=frozenset({"hidden", "standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/multi.py b/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/multi.py index 03fbd89ab..02cb66c33 100644 --- a/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/multi.py +++ b/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_5 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5], properties=frozenset({"basic", "hidden"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) -option_9 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_10 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_8 = Leadership(name="leader", doc="a leadership", children=[option_9, option_10], properties=frozenset({"basic", "hidden"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"basic"})) -optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) +option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_5 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5], properties=frozenset({"hidden", "standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) +option_9 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_10 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_8 = Leadership(name="leader", doc="a leadership", children=[option_9, option_10], properties=frozenset({"hidden", "standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/no_namespace.py b/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/no_namespace.py index 2d5bb4831..16b5df2c6 100644 --- a/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/no_namespace.py +++ b/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/no_namespace.py @@ -6,7 +6,7 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_2 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_3 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = Leadership(name="leader", doc="a leadership", children=[option_2, option_3], properties=frozenset({"basic", "hidden"})) +option_2 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_3 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_1 = Leadership(name="leader", doc="a leadership", children=[option_2, option_3], properties=frozenset({"hidden", "standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/44_1leadership_append_hidden_follower/makedict/mandatory.json b/tests/dictionaries/44_1leadership_append_hidden_follower/makedict/mandatory.json index 8e267443d..0637a088a 100644 --- a/tests/dictionaries/44_1leadership_append_hidden_follower/makedict/mandatory.json +++ b/tests/dictionaries/44_1leadership_append_hidden_follower/makedict/mandatory.json @@ -1 +1 @@ -["rougail.leader.leader"] \ No newline at end of file +[] \ No newline at end of file diff --git a/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/base.py b/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/base.py index 4f43c378b..01cee501f 100644 --- a/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/base.py +++ b/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/base.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_4 = StrOption(name="follower1", doc="the follower1", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_5 = StrOption(name="follower2", doc="the follower2", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_6 = StrOption(name="follower3", doc="follower3", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4, option_5, option_6], properties=frozenset({"basic", "hidden"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_4 = StrOption(name="follower1", doc="the follower1", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_5 = StrOption(name="follower2", doc="the follower2", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_6 = StrOption(name="follower3", doc="follower3", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4, option_5, option_6], properties=frozenset({"hidden", "standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/multi.py b/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/multi.py index 160b9dfc8..c5722d306 100644 --- a/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/multi.py +++ b/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/multi.py @@ -3,21 +3,25 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_5 = StrOption(name="follower1", doc="the follower1", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_6 = StrOption(name="follower2", doc="the follower2", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_7 = StrOption(name="follower3", doc="follower3", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5, option_6, option_7], properties=frozenset({"basic", "hidden"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) -option_11 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_12 = StrOption(name="follower1", doc="the follower1", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_13 = StrOption(name="follower2", doc="the follower2", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_14 = StrOption(name="follower3", doc="follower3", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_10 = Leadership(name="leader", doc="a leadership", children=[option_11, option_12, option_13, option_14], properties=frozenset({"basic", "hidden"})) -optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_10], properties=frozenset({"basic"})) -optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9], properties=frozenset({"basic"})) +option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_5 = StrOption(name="follower1", doc="the follower1", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_6 = StrOption(name="follower2", doc="the follower2", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_7 = StrOption(name="follower3", doc="follower3", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5, option_6, option_7], properties=frozenset({"hidden", "standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) +option_11 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_12 = StrOption(name="follower1", doc="the follower1", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_13 = StrOption(name="follower2", doc="the follower2", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_14 = StrOption(name="follower3", doc="follower3", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_10 = Leadership(name="leader", doc="a leadership", children=[option_11, option_12, option_13, option_14], properties=frozenset({"hidden", "standard"})) +optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_10], properties=frozenset({"standard"})) +optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_8]) diff --git a/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/no_namespace.py b/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/no_namespace.py index 324d3d2e2..eabaddf7b 100644 --- a/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/no_namespace.py +++ b/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/no_namespace.py @@ -6,9 +6,9 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_2 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_3 = StrOption(name="follower1", doc="the follower1", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_4 = StrOption(name="follower2", doc="the follower2", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -option_5 = StrOption(name="follower3", doc="follower3", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = Leadership(name="leader", doc="a leadership", children=[option_2, option_3, option_4, option_5], properties=frozenset({"basic", "hidden"})) +option_2 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_3 = StrOption(name="follower1", doc="the follower1", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_4 = StrOption(name="follower2", doc="the follower2", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +option_5 = StrOption(name="follower3", doc="follower3", multi=True, properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_1 = Leadership(name="leader", doc="a leadership", children=[option_2, option_3, option_4, option_5], properties=frozenset({"hidden", "standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/44_4disabled_calcultion_follower/tiramisu/base.py b/tests/dictionaries/44_4disabled_calcultion_follower/tiramisu/base.py index 08b0a8b89..f8b8c8289 100644 --- a/tests/dictionaries/44_4disabled_calcultion_follower/tiramisu/base.py +++ b/tests/dictionaries/44_4disabled_calcultion_follower/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,5 +15,5 @@ option_2 = BoolOption(name="condition", doc="a condition", default=True, propert option_4 = StrOption(name="leader", doc="aleader", multi=True, default=["a"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_4disabled_calcultion_follower/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("rougail.leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/44_4disabled_calcultion_follower/tiramisu/multi.py b/tests/dictionaries/44_4disabled_calcultion_follower/tiramisu/multi.py index 704820d67..57faf832a 100644 --- a/tests/dictionaries/44_4disabled_calcultion_follower/tiramisu/multi.py +++ b/tests/dictionaries/44_4disabled_calcultion_follower/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -12,12 +16,12 @@ option_3 = BoolOption(name="condition", doc="a condition", default=True, propert option_5 = StrOption(name="leader", doc="aleader", multi=True, default=["a"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_1.rougail.leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_4disabled_calcultion_follower/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_4 = Leadership(name="leader", doc="a leadership", children=[option_5, option_6], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = BoolOption(name="condition", doc="a condition", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) option_11 = StrOption(name="leader", doc="aleader", multi=True, default=["a"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_12 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_2.rougail.leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_4disabled_calcultion_follower/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.condition': ParamOption(option_9)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_10 = Leadership(name="leader", doc="a leadership", children=[option_11, option_12], properties=frozenset({"basic"})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/44_4leadership_mandatory/tiramisu/base.py b/tests/dictionaries/44_4leadership_mandatory/tiramisu/base.py index f64cc3b21..be5fc56e3 100644 --- a/tests/dictionaries/44_4leadership_mandatory/tiramisu/base.py +++ b/tests/dictionaries/44_4leadership_mandatory/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_4 = StrOption(name="follower1", doc="a follower", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/44_4leadership_mandatory/tiramisu/multi.py b/tests/dictionaries/44_4leadership_mandatory/tiramisu/multi.py index 5638caa8d..c924bc1bb 100644 --- a/tests/dictionaries/44_4leadership_mandatory/tiramisu/multi.py +++ b/tests/dictionaries/44_4leadership_mandatory/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_5 = StrOption(name="follower1", doc="a follower", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_10 = StrOption(name="follower1", doc="a follower", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) optiondescription_8 = Leadership(name="leader", doc="a leadership", children=[option_9, option_10], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"basic"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/44_4leadership_mandatory_follower/tiramisu/base.py b/tests/dictionaries/44_4leadership_mandatory_follower/tiramisu/base.py index 4cba31acd..8d4f16ec6 100644 --- a/tests/dictionaries/44_4leadership_mandatory_follower/tiramisu/base.py +++ b/tests/dictionaries/44_4leadership_mandatory_follower/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_4 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/44_4leadership_mandatory_follower/tiramisu/multi.py b/tests/dictionaries/44_4leadership_mandatory_follower/tiramisu/multi.py index 89f56c9d7..71832f129 100644 --- a/tests/dictionaries/44_4leadership_mandatory_follower/tiramisu/multi.py +++ b/tests/dictionaries/44_4leadership_mandatory_follower/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_5 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_10 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_8 = Leadership(name="leader", doc="a leadership", children=[option_9, option_10], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"basic"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml b/tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml index b5bb499c6..5d156680e 100644 --- a/tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml @@ -13,4 +13,5 @@ leader: condition is no {% endif %} description: if condition is no + mandatory: false follower: # a follower diff --git a/tests/dictionaries/44_5leadership_leader_hidden_calculation/makedict/mandatory.json b/tests/dictionaries/44_5leadership_leader_hidden_calculation/makedict/mandatory.json index 8e267443d..fe51488c7 100644 --- a/tests/dictionaries/44_5leadership_leader_hidden_calculation/makedict/mandatory.json +++ b/tests/dictionaries/44_5leadership_leader_hidden_calculation/makedict/mandatory.json @@ -1 +1 @@ -["rougail.leader.leader"] \ No newline at end of file +[] diff --git a/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/base.py b/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/base.py index 6af806c4d..07bbe4027 100644 --- a/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/base.py +++ b/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,8 +14,8 @@ dict_env['frozen_rougail.leader.leader'] = "{% if __.condition == \"no\" %}\ncon dict_env['frozen_rougail.leader.follower'] = "{% if __.condition == \"no\" %}\ncondition is no\n{% endif %}\n" dict_env['hidden_rougail.leader.leader'] = "{% if __.condition == \"no\" %}\ncondition is no\n{% endif %}\n" option_2 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.leader.leader"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.leader.leader"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_5 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.leader.leader"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/multi.py b/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/multi.py index ee28bb100..2b326862d 100644 --- a/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/multi.py +++ b/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -13,15 +17,15 @@ dict_env['frozen_2.rougail.leader.leader'] = "{% if __.condition == \"no\" %}\nc dict_env['frozen_2.rougail.leader.follower'] = "{% if __.condition == \"no\" %}\ncondition is no\n{% endif %}\n" dict_env['hidden_2.rougail.leader.leader'] = "{% if __.condition == \"no\" %}\ncondition is no\n{% endif %}\n" option_3 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.leader.leader"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_5 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.leader.leader"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_6 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_4 = Leadership(name="leader", doc="a leadership", children=[option_5, option_6], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.leader.leader"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_11 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.leader.leader"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_9)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_11 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.leader.leader"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_9)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_12 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_9)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_10 = Leadership(name="leader", doc="a leadership", children=[option_11, option_12], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.leader.leader"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_9)}), help_function=func['jinja_to_property_help'])})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/no_namespace.py b/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/no_namespace.py index 00d1e5ff7..309102bb4 100644 --- a/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/no_namespace.py +++ b/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/no_namespace.py @@ -10,7 +10,7 @@ dict_env['frozen_leader.leader'] = "{% if __.condition == \"no\" %}\ncondition i dict_env['frozen_leader.follower'] = "{% if __.condition == \"no\" %}\ncondition is no\n{% endif %}\n" dict_env['hidden_leader.leader'] = "{% if __.condition == \"no\" %}\ncondition is no\n{% endif %}\n" option_1 = StrOption(name="condition", doc="a condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("leader.leader"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_1)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("leader.leader"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_1)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) option_4 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_1)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_5leadership_leader_hidden_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("leader.leader"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_1)}), help_function=func['jinja_to_property_help'])})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2]) diff --git a/tests/dictionaries/44_6leadership_follower_disabled_calculation/dictionaries/rougail/00-base.yml b/tests/dictionaries/44_6leadership_follower_disabled_calculation/dictionaries/rougail/00-base.yml index 5d553dfeb..693834671 100644 --- a/tests/dictionaries/44_6leadership_follower_disabled_calculation/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/44_6leadership_follower_disabled_calculation/dictionaries/rougail/00-base.yml @@ -11,5 +11,7 @@ leader: description: a follower disabled: jinja: | - {% if __.condition == "yes" %}true{% else %}false{% endif %} + {% if __.condition == "yes" %} + disabled + {% endif %} description: if condition is yes diff --git a/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/base.py b/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/base.py index 372cf5f03..ab21f6baf 100644 --- a/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/base.py +++ b/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/base.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['disabled_rougail.leader.follower'] = "{% if __.condition == \"yes\" %}true{% else %}false{% endif %}\n" +dict_env['disabled_rougail.leader.follower'] = "{% if __.condition == \"yes\" %}\ndisabled\n{% endif %}\n" option_2 = StrOption(name="condition", doc="a condition", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_5 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_6leadership_follower_disabled_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("rougail.leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/multi.py b/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/multi.py index b126a9d33..b0b5e1f07 100644 --- a/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/multi.py +++ b/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/multi.py @@ -3,21 +3,25 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['disabled_1.rougail.leader.follower'] = "{% if __.condition == \"yes\" %}true{% else %}false{% endif %}\n" -dict_env['disabled_2.rougail.leader.follower'] = "{% if __.condition == \"yes\" %}true{% else %}false{% endif %}\n" +dict_env['disabled_1.rougail.leader.follower'] = "{% if __.condition == \"yes\" %}\ndisabled\n{% endif %}\n" +dict_env['disabled_2.rougail.leader.follower'] = "{% if __.condition == \"yes\" %}\ndisabled\n{% endif %}\n" option_3 = StrOption(name="condition", doc="a condition", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_6 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_1.rougail.leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_6leadership_follower_disabled_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_4 = Leadership(name="leader", doc="a leadership", children=[option_5, option_6], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = StrOption(name="condition", doc="a condition", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_11 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_12 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_2.rougail.leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_6leadership_follower_disabled_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_9)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_10 = Leadership(name="leader", doc="a leadership", children=[option_11, option_12], properties=frozenset({"basic"})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/no_namespace.py b/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/no_namespace.py index fe6f164ac..0f3b846f8 100644 --- a/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/no_namespace.py +++ b/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/no_namespace.py @@ -6,7 +6,7 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['disabled_leader.follower'] = "{% if __.condition == \"yes\" %}true{% else %}false{% endif %}\n" +dict_env['disabled_leader.follower'] = "{% if __.condition == \"yes\" %}\ndisabled\n{% endif %}\n" option_1 = StrOption(name="condition", doc="a condition", default="yes", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_4 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_6leadership_follower_disabled_calculation/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.condition': ParamOption(option_1)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) diff --git a/tests/dictionaries/44_9calculated_default_leadership_leader/tiramisu/base.py b/tests/dictionaries/44_9calculated_default_leadership_leader/tiramisu/base.py index 7bde96f0a..e4e15abba 100644 --- a/tests/dictionaries/44_9calculated_default_leadership_leader/tiramisu/base.py +++ b/tests/dictionaries/44_9calculated_default_leadership_leader/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,5 +14,5 @@ dict_env['disabled_rougail.leader.follower'] = "{% if _.leader == \"a\" %}\nthe option_3 = StrOption(name="leader", doc="a leader", multi=True, default=["a", "b"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="follower", doc="a follower", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_3)))), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_9calculated_default_leadership_leader/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("rougail.leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.leader': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leader", doc="leader", children=[option_3, option_4], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/44_9calculated_default_leadership_leader/tiramisu/multi.py b/tests/dictionaries/44_9calculated_default_leadership_leader/tiramisu/multi.py index db75b1eb6..12e54bedc 100644 --- a/tests/dictionaries/44_9calculated_default_leadership_leader/tiramisu/multi.py +++ b/tests/dictionaries/44_9calculated_default_leadership_leader/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,11 +15,11 @@ dict_env['disabled_2.rougail.leader.follower'] = "{% if _.leader == \"a\" %}\nth option_4 = StrOption(name="leader", doc="a leader", multi=True, default=["a", "b"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="follower", doc="a follower", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_1.rougail.leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_9calculated_default_leadership_leader/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.leader': ParamOption(option_4)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="leader", children=[option_4, option_5], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_9 = StrOption(name="leader", doc="a leader", multi=True, default=["a", "b"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = StrOption(name="follower", doc="a follower", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_9)))), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_2.rougail.leader.follower"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/44_9calculated_default_leadership_leader/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.leader.follower"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.leader': ParamOption(option_9)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) optiondescription_8 = Leadership(name="leader", doc="leader", children=[option_9, option_10], properties=frozenset({"standard"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_8], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_8], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/60_0family_dynamic/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_0family_dynamic/dictionaries/rougail/00-base.yml index 83db9b7b1..3f9aa5da6 100644 --- a/tests/dictionaries/60_0family_dynamic/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_0family_dynamic/dictionaries/rougail/00-base.yml @@ -3,7 +3,7 @@ version: '1.1' var: # A suffix variable - val1 - val2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: A dynamic family dynamic: variable: _.var diff --git a/tests/dictionaries/60_0family_dynamic/tiramisu/base.py b/tests/dictionaries/60_0family_dynamic/tiramisu/base.py index 4aedc90ee..2e382f210 100644 --- a/tests/dictionaries/60_0family_dynamic/tiramisu/base.py +++ b/tests/dictionaries/60_0family_dynamic/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"basic"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_dynamic/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic/tiramisu/multi.py index 4609d641e..13c4f9592 100644 --- a/tests/dictionaries/60_0family_dynamic/tiramisu/multi.py +++ b/tests/dictionaries/60_0family_dynamic/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"basic"}), informations={'dynamic_variable': '1.rougail.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_8)))), children=[option_10], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"basic"})) +optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_8)))), children=[option_10], properties=frozenset({"basic"}), informations={'dynamic_variable': '2.rougail.var'}) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/60_0family_dynamic/tiramisu/no_namespace.py b/tests/dictionaries/60_0family_dynamic/tiramisu/no_namespace.py index fa30c8935..dcd83fc63 100644 --- a/tests/dictionaries/60_0family_dynamic/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_0family_dynamic/tiramisu/no_namespace.py @@ -8,5 +8,5 @@ ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_1 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"basic"}), informations={'dynamic_variable': 'var'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2]) diff --git a/tests/dictionaries/60_0family_dynamic_1_0/tiramisu/base.py b/tests/dictionaries/60_0family_dynamic_1_0/tiramisu/base.py index 0e28b4a98..889eb5dd7 100644 --- a/tests/dictionaries/60_0family_dynamic_1_0/tiramisu/base.py +++ b/tests/dictionaries/60_0family_dynamic_1_0/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="vardyn", doc="Dynamic variable", properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_4], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"standard"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_4], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_dynamic_1_0/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_1_0/tiramisu/multi.py index f21bf4cfc..72fb7224c 100644 --- a/tests/dictionaries/60_0family_dynamic_1_0/tiramisu/multi.py +++ b/tests/dictionaries/60_0family_dynamic_1_0/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="vardyn", doc="Dynamic variable", properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_5], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"standard"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_5], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = StrOption(name="vardyn", doc="Dynamic variable", properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_8, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_10], properties=frozenset({"standard"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"standard"})) +optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_8, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_10], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.var'}) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/60_0family_dynamic_1_0_type/tiramisu/base.py b/tests/dictionaries/60_0family_dynamic_1_0_type/tiramisu/base.py index d3f773249..c3999340f 100644 --- a/tests/dictionaries/60_0family_dynamic_1_0_type/tiramisu/base.py +++ b/tests/dictionaries/60_0family_dynamic_1_0_type/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="vardyn", doc="A dyn variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_4], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_4], properties=frozenset({"basic"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_dynamic_1_0_type/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_1_0_type/tiramisu/multi.py index 8b44f1bbf..1114b870f 100644 --- a/tests/dictionaries/60_0family_dynamic_1_0_type/tiramisu/multi.py +++ b/tests/dictionaries/60_0family_dynamic_1_0_type/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="vardyn", doc="A dyn variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_5], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_5], properties=frozenset({"basic"}), informations={'dynamic_variable': '1.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = StrOption(name="vardyn", doc="A dyn variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_8, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_10], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"basic"})) +optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_8, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_10], properties=frozenset({"basic"}), informations={'dynamic_variable': '2.var'}) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/base.py b/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/base.py index bb992dff0..dd9a40c37 100644 --- a/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/base.py +++ b/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="vardyn", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_4], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_4], properties=frozenset({"basic"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/multi.py index a8b21f6f2..0740ed11f 100644 --- a/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/multi.py +++ b/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="vardyn", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_5], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_5], properties=frozenset({"basic"}), informations={'dynamic_variable': '1.rougail.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = StrOption(name="vardyn", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_8, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_10], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"basic"})) +optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_8, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_10], properties=frozenset({"basic"}), informations={'dynamic_variable': '2.rougail.var'}) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/no_namespace.py b/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/no_namespace.py index 9d26084f7..95e80a0ed 100644 --- a/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/no_namespace.py @@ -8,5 +8,5 @@ ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_1 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="vardyn", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_1, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_3], properties=frozenset({"basic"}), informations={'dynamic_variable': 'var'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2]) diff --git a/tests/dictionaries/60_0family_dynamic_jinja_number/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_0family_dynamic_jinja_number/dictionaries/rougail/00-base.yml index e4b9f832a..47ade725f 100644 --- a/tests/dictionaries/60_0family_dynamic_jinja_number/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_0family_dynamic_jinja_number/dictionaries/rougail/00-base.yml @@ -3,7 +3,7 @@ version: '1.1' var: # a suffix variable - 1 - 2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: a dynamic family dynamic: variable: _.var diff --git a/tests/dictionaries/60_0family_dynamic_jinja_number/tiramisu/base.py b/tests/dictionaries/60_0family_dynamic_jinja_number/tiramisu/base.py index 7c7d7c5c5..e2938030e 100644 --- a/tests/dictionaries/60_0family_dynamic_jinja_number/tiramisu/base.py +++ b/tests/dictionaries/60_0family_dynamic_jinja_number/tiramisu/base.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.var2'] = "{{ rougail.dyn1.var }}\n" option_2 = IntOption(name="var", doc="a suffix variable", multi=True, default=[1, 2], default_multi=1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_4 = StrOption(name="var", doc="a variable inside dynamic family", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) option_5 = StrOption(name="var2", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_0family_dynamic_jinja_number/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2"), 'rougail.dyn1.var': ParamDynOption(option_4, ["1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3, option_5], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3, option_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_dynamic_jinja_number/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_jinja_number/tiramisu/multi.py index 295db670a..1a7cbeaf4 100644 --- a/tests/dictionaries/60_0family_dynamic_jinja_number/tiramisu/multi.py +++ b/tests/dictionaries/60_0family_dynamic_jinja_number/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,14 +14,14 @@ dict_env['default_1.rougail.var2'] = "{{ rougail.dyn1.var }}\n" dict_env['default_2.rougail.var2'] = "{{ rougail.dyn1.var }}\n" option_3 = IntOption(name="var", doc="a suffix variable", multi=True, default=[1, 2], default_multi=1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_5 = StrOption(name="var", doc="a variable inside dynamic family", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) option_6 = StrOption(name="var2", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_0family_dynamic_jinja_number/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'rougail.dyn1.var': ParamDynOption(option_5, ["1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4, option_6], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4, option_6], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_9 = IntOption(name="var", doc="a suffix variable", multi=True, default=[1, 2], default_multi=1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) option_11 = StrOption(name="var", doc="a variable inside dynamic family", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_10 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_11], properties=frozenset({"standard"})) +optiondescription_10 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_11], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) option_12 = StrOption(name="var2", doc="a variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_0family_dynamic_jinja_number/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'rougail.dyn1.var': ParamDynOption(option_11, ["1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10, option_12], properties=frozenset({"standard"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10, option_12], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/60_0family_dynamic_static/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_0family_dynamic_static/dictionaries/rougail/00-base.yml index d5233a6cf..a2a38577d 100644 --- a/tests/dictionaries/60_0family_dynamic_static/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_0family_dynamic_static/dictionaries/rougail/00-base.yml @@ -1,6 +1,6 @@ --- version: '1.1' -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: a dynamic family dynamic: - val1 diff --git a/tests/dictionaries/60_0family_dynamic_static/tiramisu/base.py b/tests/dictionaries/60_0family_dynamic_static/tiramisu/base.py index 1252442eb..02b0cf029 100644 --- a/tests/dictionaries/60_0family_dynamic_static/tiramisu/base.py +++ b/tests/dictionaries/60_0family_dynamic_static/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="a variable inside a dynamic family", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=["val1", "val2"], children=[option_3], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=["val1", "val2"], children=[option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_dynamic_static/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_static/tiramisu/multi.py index aae144f56..8d24b84e9 100644 --- a/tests/dictionaries/60_0family_dynamic_static/tiramisu/multi.py +++ b/tests/dictionaries/60_0family_dynamic_static/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="var", doc="a variable inside a dynamic family", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=["val1", "val2"], children=[option_4], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=["val1", "val2"], children=[option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="var", doc="a variable inside a dynamic family", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_7 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=["val1", "val2"], children=[option_8], properties=frozenset({"basic"})) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_7], properties=frozenset({"basic"})) +optiondescription_7 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=["val1", "val2"], children=[option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_7], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/60_0family_dynamic_static/tiramisu/no_namespace.py b/tests/dictionaries/60_0family_dynamic_static/tiramisu/no_namespace.py index b0e5e6750..a808796df 100644 --- a/tests/dictionaries/60_0family_dynamic_static/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_0family_dynamic_static/tiramisu/no_namespace.py @@ -7,5 +7,5 @@ ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="a variable inside a dynamic family", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=["val1", "val2"], children=[option_2], properties=frozenset({"basic"})) +optiondescription_1 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=["val1", "val2"], children=[option_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_dynamic_variable_empty/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_0family_dynamic_variable_empty/dictionaries/rougail/00-base.yml index e4b1f100d..f450d7b12 100644 --- a/tests/dictionaries/60_0family_dynamic_variable_empty/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_0family_dynamic_variable_empty/dictionaries/rougail/00-base.yml @@ -1,7 +1,7 @@ --- version: '1.1' var: [] # a suffix variable -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: a dynamic family dynamic: variable: _.var diff --git a/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/base.py b/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/base.py index 5e181d05a..724146a87 100644 --- a/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/base.py +++ b/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="a suffix variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_4 = StrOption(name="var", doc="a variable inside dynamic family", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/multi.py index e63207ded..e59f10a44 100644 --- a/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/multi.py +++ b/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="a suffix variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_5 = StrOption(name="var", doc="a variable inside dynamic family", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="var", doc="a suffix variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_10 = StrOption(name="var", doc="a variable inside dynamic family", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_8)))), children=[option_10], properties=frozenset({"standard"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"basic"})) +optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_8)))), children=[option_10], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/no_namespace.py b/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/no_namespace.py index df09cfa1e..f71a43063 100644 --- a/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/no_namespace.py @@ -8,5 +8,5 @@ ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_1 = StrOption(name="var", doc="a suffix variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_3 = StrOption(name="var", doc="a variable inside dynamic family", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"standard"}), informations={'dynamic_variable': 'var'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2]) diff --git a/tests/dictionaries/60_0family_dynamic_variable_suffix/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_0family_dynamic_variable_suffix/dictionaries/rougail/00-base.yml index b5cd6cb9c..9a9c1e043 100644 --- a/tests/dictionaries/60_0family_dynamic_variable_suffix/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_0family_dynamic_variable_suffix/dictionaries/rougail/00-base.yml @@ -3,8 +3,8 @@ version: '1.1' var: # A suffix variable - val1 - val2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: A dynamic family dynamic: variable: _.var - var: a value # A dynamic variable with suffix {{ suffix }} + var: a value # A dynamic variable with suffix {{ identifier }} diff --git a/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/base.py b/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/base.py index 2f72625b3..24e5f8aab 100644 --- a/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/base.py +++ b/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var", doc="A dynamic variable with suffix {{ suffix }}", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"standard"})) +option_4 = StrOption(name="var", doc="A dynamic variable with suffix {{ identifier }}", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/multi.py index 023d24a39..7b1c63ef0 100644 --- a/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/multi.py +++ b/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var", doc="A dynamic variable with suffix {{ suffix }}", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"standard"})) +option_5 = StrOption(name="var", doc="A dynamic variable with suffix {{ identifier }}", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_10 = StrOption(name="var", doc="A dynamic variable with suffix {{ suffix }}", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_8)))), children=[option_10], properties=frozenset({"standard"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"standard"})) +option_10 = StrOption(name="var", doc="A dynamic variable with suffix {{ identifier }}", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_8)))), children=[option_10], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/no_namespace.py b/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/no_namespace.py index 5f4e8c887..ceb6631c8 100644 --- a/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/no_namespace.py @@ -7,6 +7,6 @@ ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_1 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_3 = StrOption(name="var", doc="A dynamic variable with suffix {{ suffix }}", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"standard"})) +option_3 = StrOption(name="var", doc="A dynamic variable with suffix {{ identifier }}", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"standard"}), informations={'dynamic_variable': 'var'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2]) diff --git a/tests/dictionaries/60_0family_empty/tiramisu/base.py b/tests/dictionaries/60_0family_empty/tiramisu/base.py index c800d9e33..bb6ab55d2 100644 --- a/tests/dictionaries/60_0family_empty/tiramisu/base.py +++ b/tests/dictionaries/60_0family_empty/tiramisu/base.py @@ -3,8 +3,12 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[], properties=frozenset({"advanced"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[], properties=frozenset({"advanced"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_empty/tiramisu/multi.py b/tests/dictionaries/60_0family_empty/tiramisu/multi.py index 9357fd228..f8a40b84b 100644 --- a/tests/dictionaries/60_0family_empty/tiramisu/multi.py +++ b/tests/dictionaries/60_0family_empty/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") diff --git a/tests/dictionaries/60_0family_hidden/makedict/mandatory.json b/tests/dictionaries/60_0family_hidden/makedict/mandatory.json index 624401491..0637a088a 100644 --- a/tests/dictionaries/60_0family_hidden/makedict/mandatory.json +++ b/tests/dictionaries/60_0family_hidden/makedict/mandatory.json @@ -1 +1 @@ -["rougail.family.var"] \ No newline at end of file +[] \ No newline at end of file diff --git a/tests/dictionaries/60_0family_hidden/tiramisu/base.py b/tests/dictionaries/60_0family_hidden/tiramisu/base.py index 29204c8f3..a21ec3011 100644 --- a/tests/dictionaries/60_0family_hidden/tiramisu/base.py +++ b/tests/dictionaries/60_0family_hidden/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_3 = StrOption(name="var", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="family", doc="a family", children=[option_3], properties=frozenset({"basic", "hidden"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +option_3 = StrOption(name="var", doc="a variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_2 = OptionDescription(name="family", doc="a family", children=[option_3], properties=frozenset({"hidden", "standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_hidden/tiramisu/multi.py b/tests/dictionaries/60_0family_hidden/tiramisu/multi.py index 83cf2c412..f41e1f4a4 100644 --- a/tests/dictionaries/60_0family_hidden/tiramisu/multi.py +++ b/tests/dictionaries/60_0family_hidden/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_4 = StrOption(name="var", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = OptionDescription(name="family", doc="a family", children=[option_4], properties=frozenset({"basic", "hidden"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) -option_8 = StrOption(name="var", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_7 = OptionDescription(name="family", doc="a family", children=[option_8], properties=frozenset({"basic", "hidden"})) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_7], properties=frozenset({"basic"})) -optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) +option_4 = StrOption(name="var", doc="a variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_3 = OptionDescription(name="family", doc="a family", children=[option_4], properties=frozenset({"hidden", "standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) +option_8 = StrOption(name="var", doc="a variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_7 = OptionDescription(name="family", doc="a family", children=[option_8], properties=frozenset({"hidden", "standard"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_7], properties=frozenset({"standard"})) +optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/60_0family_hidden/tiramisu/no_namespace.py b/tests/dictionaries/60_0family_hidden/tiramisu/no_namespace.py index ab7e151f3..34a18f213 100644 --- a/tests/dictionaries/60_0family_hidden/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_0family_hidden/tiramisu/no_namespace.py @@ -6,6 +6,6 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_2 = StrOption(name="var", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "frozen", "mandatory"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="family", doc="a family", children=[option_2], properties=frozenset({"basic", "hidden"})) +option_2 = StrOption(name="var", doc="a variable", properties=frozenset({"force_default_on_freeze", "frozen", "standard"}), informations={'type': 'string'}) +optiondescription_1 = OptionDescription(name="family", doc="a family", children=[option_2], properties=frozenset({"hidden", "standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_mode/tiramisu/base.py b/tests/dictionaries/60_0family_mode/tiramisu/base.py index 6115a9da6..6966a618e 100644 --- a/tests/dictionaries/60_0family_mode/tiramisu/base.py +++ b/tests/dictionaries/60_0family_mode/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="A variable", default="non", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_2 = OptionDescription(name="family", doc="a family", children=[option_3], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_0family_mode/tiramisu/multi.py b/tests/dictionaries/60_0family_mode/tiramisu/multi.py index 4b1c41b92..68cb1c814 100644 --- a/tests/dictionaries/60_0family_mode/tiramisu/multi.py +++ b/tests/dictionaries/60_0family_mode/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="var", doc="A variable", default="non", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="family", doc="a family", children=[option_4], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="var", doc="A variable", default="non", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_7 = OptionDescription(name="family", doc="a family", children=[option_8], properties=frozenset({"basic"})) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_7], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_7], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/60_1family_dynamic_jinja/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_1family_dynamic_jinja/dictionaries/rougail/00-base.yml index c2c3242bf..41e839d71 100644 --- a/tests/dictionaries/60_1family_dynamic_jinja/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_1family_dynamic_jinja/dictionaries/rougail/00-base.yml @@ -3,7 +3,7 @@ version: '1.1' var: # a suffix variable - val1 - val2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: A dynamic family dynamic: jinja: | diff --git a/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/base.py b/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/base.py index b4bd259de..45cbddb34 100644 --- a/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/base.py +++ b/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/base.py @@ -3,12 +3,16 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['dynamic_rougail.dyn{{ suffix }}'] = "{% for val in _.var %}\n{{ loop.index }}\n{% endfor %}\n" +dict_env['dynamic_rougail.dyn{{ identifier }}'] = "{% for val in _.var %}\n{{ loop.index }}\n{% endfor %}\n" option_2 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var", doc="a dynamic variable", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("dynamic_rougail.dyn{{ suffix }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_1family_dynamic_jinja/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("dynamic"), '__internal_variable': ParamValue("rougail.dyn{{ suffix }}"), '_.var': ParamOption(option_2)})), children=[option_4], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"standard"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("dynamic_rougail.dyn{{ identifier }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_1family_dynamic_jinja/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("dynamic"), '__internal_variable': ParamValue("rougail.dyn{{ identifier }}"), '_.var': ParamOption(option_2)})), children=[option_4], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/multi.py b/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/multi.py index a142d58c1..530001572 100644 --- a/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/multi.py +++ b/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/multi.py @@ -3,19 +3,23 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['dynamic_1.rougail.dyn{{ suffix }}'] = "{% for val in _.var %}\n{{ loop.index }}\n{% endfor %}\n" -dict_env['dynamic_2.rougail.dyn{{ suffix }}'] = "{% for val in _.var %}\n{{ loop.index }}\n{% endfor %}\n" +dict_env['dynamic_1.rougail.dyn{{ identifier }}'] = "{% for val in _.var %}\n{{ loop.index }}\n{% endfor %}\n" +dict_env['dynamic_2.rougail.dyn{{ identifier }}'] = "{% for val in _.var %}\n{{ loop.index }}\n{% endfor %}\n" option_3 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="var", doc="a dynamic variable", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("dynamic_1.rougail.dyn{{ suffix }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_1family_dynamic_jinja/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("dynamic"), '__internal_variable': ParamValue("1.rougail.dyn{{ suffix }}"), '_.var': ParamOption(option_3)})), children=[option_5], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"standard"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("dynamic_1.rougail.dyn{{ identifier }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_1family_dynamic_jinja/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("dynamic"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}"), '_.var': ParamOption(option_3)})), children=[option_5], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = StrOption(name="var", doc="a dynamic variable", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("dynamic_2.rougail.dyn{{ suffix }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_1family_dynamic_jinja/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("dynamic"), '__internal_variable': ParamValue("2.rougail.dyn{{ suffix }}"), '_.var': ParamOption(option_8)})), children=[option_10], properties=frozenset({"standard"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"standard"})) +optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("dynamic_2.rougail.dyn{{ identifier }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_1family_dynamic_jinja/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("dynamic"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}"), '_.var': ParamOption(option_8)})), children=[option_10], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/no_namespace.py b/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/no_namespace.py index 672c7f30e..6bfe9d5ec 100644 --- a/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/no_namespace.py @@ -6,8 +6,8 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['dynamic_dyn{{ suffix }}'] = "{% for val in _.var %}\n{{ loop.index }}\n{% endfor %}\n" +dict_env['dynamic_dyn{{ identifier }}'] = "{% for val in _.var %}\n{{ loop.index }}\n{% endfor %}\n" option_1 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var", doc="a dynamic variable", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("dynamic_dyn{{ suffix }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_1family_dynamic_jinja/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("dynamic"), '__internal_variable': ParamValue("dyn{{ suffix }}"), '_.var': ParamOption(option_1)})), children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("dynamic_dyn{{ identifier }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_1family_dynamic_jinja/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("dynamic"), '__internal_variable': ParamValue("dyn{{ identifier }}"), '_.var': ParamOption(option_1)})), children=[option_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2]) diff --git a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/dictionaries/rougail/00-base.yml index d6a075b04..82781b85b 100644 --- a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/dictionaries/rougail/00-base.yml @@ -3,7 +3,7 @@ version: '1.1' var1: # a suffix variable - val1 - val2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: a dynamic family dynamic: variable: _.var1 diff --git a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/base.py b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/base.py index fa39ce55a..6357372ed 100644 --- a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/base.py +++ b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,7 +14,7 @@ dict_env['default_rougail.var2'] = "{{ _.dynval1.family.var }}\n" option_2 = StrOption(name="var1", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="var", doc="with a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_4 = OptionDescription(name="family", doc="a family", children=[option_5], properties=frozenset({"basic"})) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[optiondescription_4], properties=frozenset({"basic"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[optiondescription_4], properties=frozenset({"basic"}), informations={'dynamic_variable': 'rougail.var1'}) option_6 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_5, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3, option_6], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3, option_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/multi.py b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/multi.py index 51e7476f3..3023751c2 100644 --- a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/multi.py +++ b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,15 +15,15 @@ dict_env['default_2.rougail.var2'] = "{{ _.dynval1.family.var }}\n" option_3 = StrOption(name="var1", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="var", doc="with a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_5 = OptionDescription(name="family", doc="a family", children=[option_6], properties=frozenset({"basic"})) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[optiondescription_5], properties=frozenset({"basic"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[optiondescription_5], properties=frozenset({"basic"}), informations={'dynamic_variable': '1.rougail.var1'}) option_7 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_6, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4, option_7], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4, option_7], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_10 = StrOption(name="var1", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_13 = StrOption(name="var", doc="with a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_12 = OptionDescription(name="family", doc="a family", children=[option_13], properties=frozenset({"basic"})) -optiondescription_11 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_10)))), children=[optiondescription_12], properties=frozenset({"basic"})) +optiondescription_11 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_10)))), children=[optiondescription_12], properties=frozenset({"basic"}), informations={'dynamic_variable': '2.rougail.var1'}) option_14 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_13, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", children=[option_10, optiondescription_11, option_14], properties=frozenset({"basic"})) +optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_10, optiondescription_11, option_14], properties=frozenset({"basic"})) optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_8]) diff --git a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/no_namespace.py b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/no_namespace.py index 882f6589c..1f39f319a 100644 --- a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/no_namespace.py @@ -10,6 +10,6 @@ dict_env['default_var2'] = "{{ _.dynval1.family.var }}\n" option_1 = StrOption(name="var1", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var", doc="with a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="family", doc="a family", children=[option_4], properties=frozenset({"basic"})) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[optiondescription_3], properties=frozenset({"basic"}), informations={'dynamic_variable': 'var1'}) option_5 = StrOption(name="var2", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("var2"), '_.dynval1.family.var': ParamDynOption(option_4, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_5]) diff --git a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/dictionaries/rougail/00-base.yml index 90af81993..c6c09a7b2 100644 --- a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/dictionaries/rougail/00-base.yml @@ -1,9 +1,9 @@ --- version: '1.1' -var: # a suffix variable +var: # a identifier variable - val1 - val2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: a dynamic family dynamic: variable: _.var @@ -12,7 +12,7 @@ var: # a suffix variable var: description: a dynamic variable default: - type: 'suffix' + type: 'identifier' var2: description: a varible outside dynamic family default: diff --git a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/base.py b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/base.py index 2e8b02ce0..60baa0e00 100644 --- a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/base.py +++ b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/base.py @@ -3,14 +3,18 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.var2'] = "{{ _.dynval1.family.var }}\n" -option_2 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var", doc="a dynamic variable", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_2 = StrOption(name="var", doc="a identifier variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_5 = StrOption(name="var", doc="a dynamic variable", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_4 = OptionDescription(name="family", doc="a family inside dynamic family", children=[option_5], properties=frozenset({"standard"})) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[optiondescription_4], properties=frozenset({"standard"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[optiondescription_4], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) option_6 = StrOption(name="var2", doc="a varible outside dynamic family", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_5, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3, option_6], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3, option_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/multi.py b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/multi.py index b4395cbd5..32a521049 100644 --- a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/multi.py +++ b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/multi.py @@ -3,23 +3,27 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_1.rougail.var2'] = "{{ _.dynval1.family.var }}\n" dict_env['default_2.rougail.var2'] = "{{ _.dynval1.family.var }}\n" -option_3 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_6 = StrOption(name="var", doc="a dynamic variable", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_3 = StrOption(name="var", doc="a identifier variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_6 = StrOption(name="var", doc="a dynamic variable", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_5 = OptionDescription(name="family", doc="a family inside dynamic family", children=[option_6], properties=frozenset({"standard"})) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[optiondescription_5], properties=frozenset({"standard"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[optiondescription_5], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) option_7 = StrOption(name="var2", doc="a varible outside dynamic family", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_6, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4, option_7], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4, option_7], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) -option_10 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_13 = StrOption(name="var", doc="a dynamic variable", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_10 = StrOption(name="var", doc="a identifier variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_13 = StrOption(name="var", doc="a dynamic variable", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_12 = OptionDescription(name="family", doc="a family inside dynamic family", children=[option_13], properties=frozenset({"standard"})) -optiondescription_11 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_10)))), children=[optiondescription_12], properties=frozenset({"standard"})) +optiondescription_11 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_10)))), children=[optiondescription_12], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) option_14 = StrOption(name="var2", doc="a varible outside dynamic family", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_13, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", children=[option_10, optiondescription_11, option_14], properties=frozenset({"standard"})) +optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_10, optiondescription_11, option_14], properties=frozenset({"standard"})) optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_8]) diff --git a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/no_namespace.py b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/no_namespace.py index 83555bc42..abec8e430 100644 --- a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/no_namespace.py @@ -7,9 +7,9 @@ ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_var2'] = "{{ _.dynval1.family.var }}\n" -option_1 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var", doc="a dynamic variable", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_1 = StrOption(name="var", doc="a identifier variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_4 = StrOption(name="var", doc="a dynamic variable", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="family", doc="a family inside dynamic family", children=[option_4], properties=frozenset({"standard"})) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[optiondescription_3], properties=frozenset({"standard"}), informations={'dynamic_variable': 'var'}) option_5 = StrOption(name="var2", doc="a varible outside dynamic family", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("var2"), '_.dynval1.family.var': ParamDynOption(option_4, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_5]) diff --git a/tests/dictionaries/60_2family_dynamic_outside_calc/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_2family_dynamic_outside_calc/dictionaries/rougail/00-base.yml index 8c2815f44..a0c56ccd1 100644 --- a/tests/dictionaries/60_2family_dynamic_outside_calc/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_2family_dynamic_outside_calc/dictionaries/rougail/00-base.yml @@ -3,7 +3,7 @@ version: '1.1' var1: # a suffx variable - val1 - val2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: a dynamic family dynamic: variable: _.var1 diff --git a/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/base.py b/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/base.py index 96109332e..a3fcce54f 100644 --- a/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/base.py +++ b/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/base.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.newvar'] = "{{ _.dynval1.var }}\n" option_2 = StrOption(name="var1", doc="a suffx variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var", doc="a dynamic variable", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var1'}) option_5 = StrOption(name="newvar", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.newvar"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_2family_dynamic_outside_calc/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.newvar"), '_.dynval1.var': ParamDynOption(option_4, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3, option_5], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3, option_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/multi.py b/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/multi.py index 22dd40328..38b109e96 100644 --- a/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/multi.py +++ b/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,14 +14,14 @@ dict_env['default_1.rougail.newvar'] = "{{ _.dynval1.var }}\n" dict_env['default_2.rougail.newvar'] = "{{ _.dynval1.var }}\n" option_3 = StrOption(name="var1", doc="a suffx variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="var", doc="a dynamic variable", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var1'}) option_6 = StrOption(name="newvar", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.newvar"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_2family_dynamic_outside_calc/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.newvar"), '_.dynval1.var': ParamDynOption(option_5, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4, option_6], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4, option_6], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_9 = StrOption(name="var1", doc="a suffx variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_11 = StrOption(name="var", doc="a dynamic variable", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_10 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_11], properties=frozenset({"standard"})) +optiondescription_10 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_11], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var1'}) option_12 = StrOption(name="newvar", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.newvar"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_2family_dynamic_outside_calc/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.newvar"), '_.dynval1.var': ParamDynOption(option_11, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10, option_12], properties=frozenset({"standard"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10, option_12], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/no_namespace.py b/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/no_namespace.py index f1b713701..e5ee2707e 100644 --- a/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/no_namespace.py @@ -9,6 +9,6 @@ ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_newvar'] = "{{ _.dynval1.var }}\n" option_1 = StrOption(name="var1", doc="a suffx variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var", doc="a dynamic variable", default="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"standard"}), informations={'dynamic_variable': 'var1'}) option_4 = StrOption(name="newvar", doc="a second variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_newvar"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_2family_dynamic_outside_calc/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("newvar"), '_.dynval1.var': ParamDynOption(option_3, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_4]) diff --git a/tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml index f52902f65..39d1f4b75 100644 --- a/tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml @@ -4,7 +4,7 @@ var: # A suffix variable - val1 - val2 var2: # a second variable -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: A dynamic family dynamic: variable: _.var diff --git a/tests/dictionaries/60_5family_dynamic_calc2/tiramisu/base.py b/tests/dictionaries/60_5family_dynamic_calc2/tiramisu/base.py index a45411fcd..40b14ca8e 100644 --- a/tests/dictionaries/60_5family_dynamic_calc2/tiramisu/base.py +++ b/tests/dictionaries/60_5family_dynamic_calc2/tiramisu/base.py @@ -3,14 +3,18 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['frozen_rougail.dyn{{ suffix }}.vardyn'] = "{% if rougail.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" -dict_env['hidden_rougail.dyn{{ suffix }}'] = "{% if rougail.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" +dict_env['frozen_rougail.dyn{{ identifier }}.vardyn'] = "{% if rougail.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" +dict_env['hidden_rougail.dyn{{ identifier }}'] = "{% if rougail.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" option_2 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -option_5 = StrOption(name="vardyn", doc="a dynamic variable", default="val", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.dyn{{ suffix }}.vardyn"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.dyn{{ suffix }}.vardyn"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.var2': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)))), children=[option_5], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.dyn{{ suffix }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.dyn{{ suffix }}"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.var2': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, option_3, optiondescription_4], properties=frozenset({"basic"})) +option_5 = StrOption(name="vardyn", doc="a dynamic variable", default="val", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.dyn{{ identifier }}.vardyn"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.dyn{{ identifier }}.vardyn"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.var2': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)))), children=[option_5], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.dyn{{ identifier }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.dyn{{ identifier }}"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.var2': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, option_3, optiondescription_4], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_calc2/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc2/tiramisu/multi.py index c39783d59..264706dad 100644 --- a/tests/dictionaries/60_5family_dynamic_calc2/tiramisu/multi.py +++ b/tests/dictionaries/60_5family_dynamic_calc2/tiramisu/multi.py @@ -3,23 +3,27 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['frozen_1.rougail.dyn{{ suffix }}.vardyn'] = "{% if rougail.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" -dict_env['hidden_1.rougail.dyn{{ suffix }}'] = "{% if rougail.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" -dict_env['frozen_2.rougail.dyn{{ suffix }}.vardyn'] = "{% if rougail.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" -dict_env['hidden_2.rougail.dyn{{ suffix }}'] = "{% if rougail.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" +dict_env['frozen_1.rougail.dyn{{ identifier }}.vardyn'] = "{% if rougail.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" +dict_env['hidden_1.rougail.dyn{{ identifier }}'] = "{% if rougail.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" +dict_env['frozen_2.rougail.dyn{{ identifier }}.vardyn'] = "{% if rougail.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" +dict_env['hidden_2.rougail.dyn{{ identifier }}'] = "{% if rougail.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" option_3 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -option_6 = StrOption(name="vardyn", doc="a dynamic variable", default="val", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.dyn{{ suffix }}.vardyn"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.dyn{{ suffix }}.vardyn"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.var2': ParamOption(option_4)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_5 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)))), children=[option_6], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.dyn{{ suffix }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.dyn{{ suffix }}"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.var2': ParamOption(option_4)}), help_function=func['jinja_to_property_help'])})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4, optiondescription_5], properties=frozenset({"basic"})) +option_6 = StrOption(name="vardyn", doc="a dynamic variable", default="val", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.dyn{{ identifier }}.vardyn"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}.vardyn"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.var2': ParamOption(option_4)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_5 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)))), children=[option_6], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.dyn{{ identifier }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.var2': ParamOption(option_4)}), help_function=func['jinja_to_property_help'])}), informations={'dynamic_variable': '1.rougail.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, option_4, optiondescription_5], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -option_12 = StrOption(name="vardyn", doc="a dynamic variable", default="val", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.dyn{{ suffix }}.vardyn"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.dyn{{ suffix }}.vardyn"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.var2': ParamOption(option_10)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_11 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_9, notraisepropertyerror=True)))), children=[option_12], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.dyn{{ suffix }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.dyn{{ suffix }}"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.var2': ParamOption(option_10)}), help_function=func['jinja_to_property_help'])})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, option_10, optiondescription_11], properties=frozenset({"basic"})) +option_12 = StrOption(name="vardyn", doc="a dynamic variable", default="val", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.dyn{{ identifier }}.vardyn"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}.vardyn"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.var2': ParamOption(option_10)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_11 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_9, notraisepropertyerror=True)))), children=[option_12], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.dyn{{ identifier }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc2/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}"), 'when': ParamValue(True), 'inverse': ParamValue(False), 'rougail.var2': ParamOption(option_10)}), help_function=func['jinja_to_property_help'])}), informations={'dynamic_variable': '2.rougail.var'}) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, option_10, optiondescription_11], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_5family_dynamic_calc_suffix/dictionaries/rougail/00-base.yml index 8a8cd363b..f2992927a 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix/dictionaries/rougail/00-base.yml @@ -5,7 +5,7 @@ var1: default: - val1 - val2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": dynamic: variable: _.var1 propertyerror: false diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix/tiramisu/base.py b/tests/dictionaries/60_5family_dynamic_calc_suffix/tiramisu/base.py index cabcf1caa..5952548f5 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix/tiramisu/base.py +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix/tiramisu/base.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.var2'] = "{{ vardyn }}\n" option_2 = StrOption(name="var1", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)))), children=[option_4], properties=frozenset({"basic"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)))), children=[option_4], properties=frozenset({"basic"}), informations={'dynamic_variable': 'rougail.var1'}) option_5 = StrOption(name="var2", doc="A variable calculated", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2"), 'vardyn': ParamDynOption(option_4, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3, option_5], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3, option_5], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_suffix/tiramisu/multi.py index 849df9d32..8e0cf5c4f 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix/tiramisu/multi.py +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,14 +14,14 @@ dict_env['default_1.rougail.var2'] = "{{ vardyn }}\n" dict_env['default_2.rougail.var2'] = "{{ vardyn }}\n" option_3 = StrOption(name="var1", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)))), children=[option_5], properties=frozenset({"basic"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)))), children=[option_5], properties=frozenset({"basic"}), informations={'dynamic_variable': '1.rougail.var1'}) option_6 = StrOption(name="var2", doc="A variable calculated", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'vardyn': ParamDynOption(option_5, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4, option_6], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4, option_6], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = StrOption(name="var1", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_11 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_10 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_9, notraisepropertyerror=True)))), children=[option_11], properties=frozenset({"basic"})) +optiondescription_10 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_9, notraisepropertyerror=True)))), children=[option_11], properties=frozenset({"basic"}), informations={'dynamic_variable': '2.rougail.var1'}) option_12 = StrOption(name="var2", doc="A variable calculated", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'vardyn': ParamDynOption(option_11, ["val1"])})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10, option_12], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10, option_12], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix2/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_5family_dynamic_calc_suffix2/dictionaries/rougail/00-base.yml index 638ec08da..320fb96d4 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix2/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix2/dictionaries/rougail/00-base.yml @@ -3,11 +3,11 @@ version: '1.1' var: # a suffix variable - val1 - val2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: a dynamic family dynamic: variable: _.var var: description: Suffix has value default: - type: suffix + type: identifier diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/base.py b/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/base.py index 31df69a95..9433eed3b 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/base.py +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var", doc="Suffix has value", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"standard"})) +option_4 = StrOption(name="var", doc="Suffix has value", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/multi.py index 059662a0d..17b4a6e7d 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/multi.py +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var", doc="Suffix has value", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"standard"})) +option_5 = StrOption(name="var", doc="Suffix has value", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_8 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_10 = StrOption(name="var", doc="Suffix has value", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_8)))), children=[option_10], properties=frozenset({"standard"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"standard"})) +option_10 = StrOption(name="var", doc="Suffix has value", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_8)))), children=[option_10], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/no_namespace.py b/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/no_namespace.py index 5d8c1bd1f..98eab7832 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/no_namespace.py @@ -7,6 +7,6 @@ ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_1 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_3 = StrOption(name="var", doc="Suffix has value", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"standard"})) +option_3 = StrOption(name="var", doc="Suffix has value", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"standard"}), informations={'dynamic_variable': 'var'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/dictionaries/rougail/00-base.yml index a2be47de5..1df2a0c55 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/dictionaries/rougail/00-base.yml @@ -1,11 +1,11 @@ --- version: '1.1' -"dyn{{ suffix }}": +"dyn{{ identifier }}": dynamic: - val1 - val2 var: description: A dynamic variable disabled: - type: suffix + type: identifier when: 'val1' diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/tiramisu/base.py b/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/tiramisu/base.py index 7b0738b0a..d445cc5a0 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/tiramisu/base.py +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/tiramisu/base.py @@ -3,10 +3,14 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_3 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamSuffix()), kwargs={'when': ParamValue("val1"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=["val1", "val2"], children=[option_3], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +option_3 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamIdentifier()), kwargs={'when': ParamValue("val1"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=["val1", "val2"], children=[option_3], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/tiramisu/multi.py index 458098733..174cba10d 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/tiramisu/multi.py +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/tiramisu/multi.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_4 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamSuffix()), kwargs={'when': ParamValue("val1"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=["val1", "val2"], children=[option_4], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +option_4 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamIdentifier()), kwargs={'when': ParamValue("val1"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=["val1", "val2"], children=[option_4], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) -option_8 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamSuffix()), kwargs={'when': ParamValue("val1"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -optiondescription_7 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=["val1", "val2"], children=[option_8], properties=frozenset({"basic"})) -optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_7], properties=frozenset({"basic"})) +option_8 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamIdentifier()), kwargs={'when': ParamValue("val1"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) +optiondescription_7 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=["val1", "val2"], children=[option_8], properties=frozenset({"basic"})) +optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_7], properties=frozenset({"basic"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix_param/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_5family_dynamic_calc_suffix_param/dictionaries/rougail/00-base.yml index 57893b4a1..acff186b5 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix_param/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix_param/dictionaries/rougail/00-base.yml @@ -1,9 +1,9 @@ --- version: '1.1' -var: # A suffix variable +var: # A identifier variable - val1 - val2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: A dynamic family dynamic: variable: _.var @@ -11,8 +11,8 @@ var: # A suffix variable description: A dynamic variable default: jinja: | - {{ suffix }} + {{ identifier }} params: - suffix: - type: suffix + identifier: + type: identifier description: from suffix diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/base.py b/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/base.py index 23643aa44..fbf8e5f7a 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/base.py +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/base.py @@ -3,12 +3,16 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['default_rougail.dyn{{ suffix }}.var'] = "{{ suffix }}\n" -option_2 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var", doc="A dynamic variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.dyn{{ suffix }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc_suffix_param/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.dyn{{ suffix }}.var"), 'suffix': ParamSuffix()})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"standard"})) +dict_env['default_rougail.dyn{{ identifier }}.var'] = "{{ identifier }}\n" +option_2 = StrOption(name="var", doc="A identifier variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_4 = StrOption(name="var", doc="A dynamic variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.dyn{{ identifier }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc_suffix_param/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.dyn{{ identifier }}.var"), 'identifier': ParamIdentifier()})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/multi.py index 0726e91e1..925d50838 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/multi.py +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/multi.py @@ -3,19 +3,23 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['default_1.rougail.dyn{{ suffix }}.var'] = "{{ suffix }}\n" -dict_env['default_2.rougail.dyn{{ suffix }}.var'] = "{{ suffix }}\n" -option_3 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var", doc="A dynamic variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.dyn{{ suffix }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc_suffix_param/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.dyn{{ suffix }}.var"), 'suffix': ParamSuffix()})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"standard"})) +dict_env['default_1.rougail.dyn{{ identifier }}.var'] = "{{ identifier }}\n" +dict_env['default_2.rougail.dyn{{ identifier }}.var'] = "{{ identifier }}\n" +option_3 = StrOption(name="var", doc="A identifier variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_5 = StrOption(name="var", doc="A dynamic variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.dyn{{ identifier }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc_suffix_param/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}.var"), 'identifier': ParamIdentifier()})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) -option_8 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_10 = StrOption(name="var", doc="A dynamic variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.dyn{{ suffix }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc_suffix_param/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.dyn{{ suffix }}.var"), 'suffix': ParamSuffix()})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_8)))), children=[option_10], properties=frozenset({"standard"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"standard"})) +option_8 = StrOption(name="var", doc="A identifier variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_10 = StrOption(name="var", doc="A dynamic variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.dyn{{ identifier }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc_suffix_param/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}.var"), 'identifier': ParamIdentifier()})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_8)))), children=[option_10], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/no_namespace.py b/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/no_namespace.py index 5d0bb9492..6c5def7ab 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/no_namespace.py @@ -6,8 +6,8 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['default_dyn{{ suffix }}.var'] = "{{ suffix }}\n" -option_1 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_3 = StrOption(name="var", doc="A dynamic variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_dyn{{ suffix }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc_suffix_param/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("dyn{{ suffix }}.var"), 'suffix': ParamSuffix()})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"standard"})) +dict_env['default_dyn{{ identifier }}.var'] = "{{ identifier }}\n" +option_1 = StrOption(name="var", doc="A identifier variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_3 = StrOption(name="var", doc="A dynamic variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_dyn{{ identifier }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_calc_suffix_param/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("dyn{{ identifier }}.var"), 'identifier': ParamIdentifier()})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"standard"}), informations={'dynamic_variable': 'var'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_variable/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_5family_dynamic_calc_variable/dictionaries/rougail/00-base.yml index e9d060155..2672fe4f2 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_variable/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_5family_dynamic_calc_variable/dictionaries/rougail/00-base.yml @@ -5,7 +5,7 @@ var1: default: - val1 - val2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": dynamic: variable: _.var1 propertyerror: false diff --git a/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/base.py b/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/base.py index 38ccd43b1..fd8b0a84d 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/base.py +++ b/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/base.py @@ -3,12 +3,16 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var1", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)))), children=[option_4], properties=frozenset({"basic"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)))), children=[option_4], properties=frozenset({"basic"}), informations={'dynamic_variable': 'rougail.var1'}) option_5 = StrOption(name="var2", doc="A variable calculated", default=Calculation(func['calc_value'], Params((ParamDynOption(option_4, ["val1"])))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3, option_5], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3, option_5], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/multi.py index bb78cdb0e..7291e62a0 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/multi.py +++ b/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/multi.py @@ -3,19 +3,23 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var1", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)))), children=[option_5], properties=frozenset({"basic"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)))), children=[option_5], properties=frozenset({"basic"}), informations={'dynamic_variable': '1.rougail.var1'}) option_6 = StrOption(name="var2", doc="A variable calculated", default=Calculation(func['calc_value'], Params((ParamDynOption(option_5, ["val1"])))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4, option_6], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4, option_6], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_9 = StrOption(name="var1", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_11 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_10 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_9, notraisepropertyerror=True)))), children=[option_11], properties=frozenset({"basic"})) +optiondescription_10 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_9, notraisepropertyerror=True)))), children=[option_11], properties=frozenset({"basic"}), informations={'dynamic_variable': '2.rougail.var1'}) option_12 = StrOption(name="var2", doc="A variable calculated", default=Calculation(func['calc_value'], Params((ParamDynOption(option_11, ["val1"])))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10, option_12], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10, option_12], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/no_namespace.py b/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/no_namespace.py index 5c99c7fa3..e14fe1b82 100644 --- a/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/no_namespace.py @@ -8,6 +8,6 @@ ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_1 = StrOption(name="var1", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="dyn{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_1, notraisepropertyerror=True)))), children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1, notraisepropertyerror=True)))), children=[option_3], properties=frozenset({"basic"}), informations={'dynamic_variable': 'var1'}) option_4 = StrOption(name="var2", doc="A variable calculated", default=Calculation(func['calc_value'], Params((ParamDynOption(option_3, ["val1"])))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_4]) diff --git a/tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml index 5b2f7af9b..97833ac32 100644 --- a/tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml @@ -1,6 +1,6 @@ --- version: '1.1' -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: a dynamic family dynamic: - val1 @@ -12,9 +12,13 @@ version: '1.1' {% endif %} params: suffix: - type: suffix + type: identifier description: if suffix == 'val2' - var: # a variable + var: + description: a variable + mandatory: false family: # a family - var: # a new variable + var: + description: a new variable + mandatory: false diff --git a/tests/dictionaries/60_5family_dynamic_hidden_suffix/makedict/mandatory.json b/tests/dictionaries/60_5family_dynamic_hidden_suffix/makedict/mandatory.json index 3ddb1bfa3..0637a088a 100644 --- a/tests/dictionaries/60_5family_dynamic_hidden_suffix/makedict/mandatory.json +++ b/tests/dictionaries/60_5family_dynamic_hidden_suffix/makedict/mandatory.json @@ -1 +1 @@ -["rougail.dynval1.var", "rougail.dynval1.family.var", "rougail.dynval2.var", "rougail.dynval2.family.var"] \ No newline at end of file +[] \ No newline at end of file diff --git a/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/base.py b/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/base.py index 16963241d..5dfb2c24d 100644 --- a/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/base.py +++ b/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/base.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['frozen_rougail.dyn{{ suffix }}.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" -dict_env['frozen_rougail.dyn{{ suffix }}.family.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" -dict_env['hidden_rougail.dyn{{ suffix }}'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" -option_3 = StrOption(name="var", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.dyn{{ suffix }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.dyn{{ suffix }}.var"), 'suffix': ParamSuffix(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -option_5 = StrOption(name="var", doc="a new variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.dyn{{ suffix }}.family.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.dyn{{ suffix }}.family.var"), 'suffix': ParamSuffix(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_4 = OptionDescription(name="family", doc="a family", children=[option_5], properties=frozenset({"basic"})) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=["val1", "val2"], children=[option_3, optiondescription_4], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.dyn{{ suffix }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.dyn{{ suffix }}"), 'suffix': ParamSuffix(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +dict_env['frozen_rougail.dyn{{ identifier }}.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" +dict_env['frozen_rougail.dyn{{ identifier }}.family.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" +dict_env['hidden_rougail.dyn{{ identifier }}'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" +option_3 = StrOption(name="var", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.dyn{{ identifier }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.dyn{{ identifier }}.var"), 'suffix': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_5 = StrOption(name="var", doc="a new variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_rougail.dyn{{ identifier }}.family.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("rougail.dyn{{ identifier }}.family.var"), 'suffix': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_4 = OptionDescription(name="family", doc="a family", children=[option_5], properties=frozenset({"standard"})) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=["val1", "val2"], children=[option_3, optiondescription_4], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_rougail.dyn{{ identifier }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("rougail.dyn{{ identifier }}"), 'suffix': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/multi.py index ca0331071..5104e9437 100644 --- a/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/multi.py +++ b/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/multi.py @@ -3,25 +3,29 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['frozen_1.rougail.dyn{{ suffix }}.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" -dict_env['frozen_1.rougail.dyn{{ suffix }}.family.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" -dict_env['hidden_1.rougail.dyn{{ suffix }}'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" -dict_env['frozen_2.rougail.dyn{{ suffix }}.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" -dict_env['frozen_2.rougail.dyn{{ suffix }}.family.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" -dict_env['hidden_2.rougail.dyn{{ suffix }}'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" -option_4 = StrOption(name="var", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.dyn{{ suffix }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.dyn{{ suffix }}.var"), 'suffix': ParamSuffix(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -option_6 = StrOption(name="var", doc="a new variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.dyn{{ suffix }}.family.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.dyn{{ suffix }}.family.var"), 'suffix': ParamSuffix(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="family", doc="a family", children=[option_6], properties=frozenset({"basic"})) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=["val1", "val2"], children=[option_4, optiondescription_5], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.dyn{{ suffix }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.dyn{{ suffix }}"), 'suffix': ParamSuffix(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) -option_10 = StrOption(name="var", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.dyn{{ suffix }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.dyn{{ suffix }}.var"), 'suffix': ParamSuffix(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -option_12 = StrOption(name="var", doc="a new variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.dyn{{ suffix }}.family.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.dyn{{ suffix }}.family.var"), 'suffix': ParamSuffix(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_11 = OptionDescription(name="family", doc="a family", children=[option_12], properties=frozenset({"basic"})) -optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=["val1", "val2"], children=[option_10, optiondescription_11], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.dyn{{ suffix }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.dyn{{ suffix }}"), 'suffix': ParamSuffix(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_9], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) +dict_env['frozen_1.rougail.dyn{{ identifier }}.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" +dict_env['frozen_1.rougail.dyn{{ identifier }}.family.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" +dict_env['hidden_1.rougail.dyn{{ identifier }}'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" +dict_env['frozen_2.rougail.dyn{{ identifier }}.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" +dict_env['frozen_2.rougail.dyn{{ identifier }}.family.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" +dict_env['hidden_2.rougail.dyn{{ identifier }}'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" +option_4 = StrOption(name="var", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.dyn{{ identifier }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}.var"), 'suffix': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_6 = StrOption(name="var", doc="a new variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_1.rougail.dyn{{ identifier }}.family.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}.family.var"), 'suffix': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_5 = OptionDescription(name="family", doc="a family", children=[option_6], properties=frozenset({"standard"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=["val1", "val2"], children=[option_4, optiondescription_5], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_1.rougail.dyn{{ identifier }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}"), 'suffix': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) +option_10 = StrOption(name="var", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.dyn{{ identifier }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}.var"), 'suffix': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_12 = StrOption(name="var", doc="a new variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_2.rougail.dyn{{ identifier }}.family.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}.family.var"), 'suffix': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_11 = OptionDescription(name="family", doc="a family", children=[option_12], properties=frozenset({"standard"})) +optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=["val1", "val2"], children=[option_10, optiondescription_11], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_2.rougail.dyn{{ identifier }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}"), 'suffix': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_9], properties=frozenset({"standard"})) +optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/no_namespace.py b/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/no_namespace.py index 40af5db33..1ee59ab65 100644 --- a/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/no_namespace.py @@ -6,11 +6,11 @@ load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['frozen_dyn{{ suffix }}.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" -dict_env['frozen_dyn{{ suffix }}.family.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" -dict_env['hidden_dyn{{ suffix }}'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" -option_2 = StrOption(name="var", doc="a variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_dyn{{ suffix }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("dyn{{ suffix }}.var"), 'suffix': ParamSuffix(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -option_4 = StrOption(name="var", doc="a new variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_dyn{{ suffix }}.family.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("dyn{{ suffix }}.family.var"), 'suffix': ParamSuffix(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_3 = OptionDescription(name="family", doc="a family", children=[option_4], properties=frozenset({"basic"})) -optiondescription_1 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=["val1", "val2"], children=[option_2, optiondescription_3], properties=frozenset({"basic", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_dyn{{ suffix }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("dyn{{ suffix }}"), 'suffix': ParamSuffix(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) +dict_env['frozen_dyn{{ identifier }}.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" +dict_env['frozen_dyn{{ identifier }}.family.var'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" +dict_env['hidden_dyn{{ identifier }}'] = "{% if suffix == 'val2' %}\ndisabled\n{% endif %}\n" +option_2 = StrOption(name="var", doc="a variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_dyn{{ identifier }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("dyn{{ identifier }}.var"), 'suffix': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +option_4 = StrOption(name="var", doc="a new variable", properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen")), kwargs={'__internal_jinja': ParamValue("frozen_dyn{{ identifier }}.family.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("dyn{{ identifier }}.family.var"), 'suffix': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_3 = OptionDescription(name="family", doc="a family", children=[option_4], properties=frozenset({"standard"})) +optiondescription_1 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=["val1", "val2"], children=[option_2, optiondescription_3], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden")), kwargs={'__internal_jinja': ParamValue("hidden_dyn{{ identifier }}"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_hidden_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("dyn{{ identifier }}"), 'suffix': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['jinja_to_property_help'])})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_unknown_suffix/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_5family_dynamic_unknown_suffix/dictionaries/rougail/00-base.yml index 6efe76a0f..4b8c8ab44 100644 --- a/tests/dictionaries/60_5family_dynamic_unknown_suffix/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_5family_dynamic_unknown_suffix/dictionaries/rougail/00-base.yml @@ -1,25 +1,36 @@ --- version: '1.1' -var: # a suffix variable - - val1 - - val2 +var: + description: a suffix variable + default: + - val1 + - val2 + test: + - val1 + - val2 + - val3 + - val4 -"{{ suffix }}_dyn": +"{{ identifier }}_dyn": description: a dynamic family dynamic: variable: _.var + var1: description: a variable 1 default: - type: suffix + type: identifier + var2: description: a variable 2 default: - variable: rougail.{{ suffix }}_dyn.var1 + variable: rougail.{{ identifier }}_dyn.var1 + var3: description: a variable 3 default: variable: _.var1 + var4: description: a variable 4 default: diff --git a/tests/dictionaries/60_5family_dynamic_unknown_suffix/tiramisu/base.py b/tests/dictionaries/60_5family_dynamic_unknown_suffix/tiramisu/base.py index e9565e1b4..c3b33965e 100644 --- a/tests/dictionaries/60_5family_dynamic_unknown_suffix/tiramisu/base.py +++ b/tests/dictionaries/60_5family_dynamic_unknown_suffix/tiramisu/base.py @@ -3,15 +3,19 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['disabled_rougail.{{ suffix }}_dyn.var4'] = "{% if 'val4' not in __.var %}\nval4 is not a valid value\n{% endif %}\n" -option_2 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var1", doc="a variable 1", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +dict_env['disabled_rougail.{{ identifier }}_dyn.var4'] = "{% if 'val4' not in __.var %}\nval4 is not a valid value\n{% endif %}\n" +option_2 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('val1', 'val2', 'val3', 'val4')}) +option_4 = StrOption(name="var1", doc="a variable 1", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="var2", doc="a variable 2", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="var3", doc="a variable 3", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_7 = StrOption(name="var4", doc="a variable 4", default=Calculation(func['calc_value'], Params((ParamDynOption(option_4, ["val4"])))), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.{{ suffix }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_unknown_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("rougail.{{ suffix }}_dyn.var4"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.var': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="{{ suffix }}_dyn", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4, option_5, option_6, option_7], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"standard"})) +option_7 = StrOption(name="var4", doc="a variable 4", default=Calculation(func['calc_value'], Params((ParamDynOption(option_4, ["val4"])))), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.{{ identifier }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_unknown_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("rougail.{{ identifier }}_dyn.var4"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.var': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_3 = ConvertDynOptionDescription(name="{{ identifier }}_dyn", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4, option_5, option_6, option_7], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_unknown_suffix/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_unknown_suffix/tiramisu/multi.py index 7025149fa..aef00058d 100644 --- a/tests/dictionaries/60_5family_dynamic_unknown_suffix/tiramisu/multi.py +++ b/tests/dictionaries/60_5family_dynamic_unknown_suffix/tiramisu/multi.py @@ -3,25 +3,29 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['disabled_1.rougail.{{ suffix }}_dyn.var4'] = "{% if 'val4' not in __.var %}\nval4 is not a valid value\n{% endif %}\n" -dict_env['disabled_2.rougail.{{ suffix }}_dyn.var4'] = "{% if 'val4' not in __.var %}\nval4 is not a valid value\n{% endif %}\n" -option_3 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var1", doc="a variable 1", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +dict_env['disabled_1.rougail.{{ identifier }}_dyn.var4'] = "{% if 'val4' not in __.var %}\nval4 is not a valid value\n{% endif %}\n" +dict_env['disabled_2.rougail.{{ identifier }}_dyn.var4'] = "{% if 'val4' not in __.var %}\nval4 is not a valid value\n{% endif %}\n" +option_3 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('val1', 'val2', 'val3', 'val4')}) +option_5 = StrOption(name="var1", doc="a variable 1", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="var2", doc="a variable 2", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_7 = StrOption(name="var3", doc="a variable 3", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_8 = StrOption(name="var4", doc="a variable 4", default=Calculation(func['calc_value'], Params((ParamDynOption(option_5, ["val4"])))), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_1.rougail.{{ suffix }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_unknown_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.{{ suffix }}_dyn.var4"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.var': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="{{ suffix }}_dyn", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5, option_6, option_7, option_8], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"standard"})) +option_8 = StrOption(name="var4", doc="a variable 4", default=Calculation(func['calc_value'], Params((ParamDynOption(option_5, ["val4"])))), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_1.rougail.{{ identifier }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_unknown_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.{{ identifier }}_dyn.var4"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.var': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_4 = ConvertDynOptionDescription(name="{{ identifier }}_dyn", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5, option_6, option_7, option_8], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) -option_11 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_13 = StrOption(name="var1", doc="a variable 1", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_11 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('val1', 'val2', 'val3', 'val4')}) +option_13 = StrOption(name="var1", doc="a variable 1", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_14 = StrOption(name="var2", doc="a variable 2", default=Calculation(func['calc_value'], Params((ParamOption(option_13)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_15 = StrOption(name="var3", doc="a variable 3", default=Calculation(func['calc_value'], Params((ParamOption(option_13)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_16 = StrOption(name="var4", doc="a variable 4", default=Calculation(func['calc_value'], Params((ParamDynOption(option_13, ["val4"])))), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_2.rougail.{{ suffix }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_unknown_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.{{ suffix }}_dyn.var4"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.var': ParamOption(option_11)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -optiondescription_12 = ConvertDynOptionDescription(name="{{ suffix }}_dyn", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_11)))), children=[option_13, option_14, option_15, option_16], properties=frozenset({"standard"})) -optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[option_11, optiondescription_12], properties=frozenset({"standard"})) +option_16 = StrOption(name="var4", doc="a variable 4", default=Calculation(func['calc_value'], Params((ParamDynOption(option_13, ["val4"])))), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_2.rougail.{{ identifier }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_unknown_suffix/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.{{ identifier }}_dyn.var4"), 'when': ParamValue(True), 'inverse': ParamValue(False), '__.var': ParamOption(option_11)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) +optiondescription_12 = ConvertDynOptionDescription(name="{{ identifier }}_dyn", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_11)))), children=[option_13, option_14, option_15, option_16], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) +optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_11, optiondescription_12], properties=frozenset({"standard"})) optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_9]) diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_5family_dynamic_variable_outside/dictionaries/rougail/00-base.yml index 383baba26..3567759de 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_5family_dynamic_variable_outside/dictionaries/rougail/00-base.yml @@ -3,17 +3,17 @@ version: '1.1' var: # a suffix variable - val1 - val2 -"my_dyn_family_{{ suffix }}": +"my_dyn_family_{{ identifier }}": description: a dynamic family dynamic: variable: _.var var: description: a variable inside a dynamic family default: - type: suffix + type: identifier mandatory: false var2: description: a variable multi: true default: - variable: "rougail.my_dyn_family_{{ suffix }}.var" + variable: "rougail.my_dyn_family_{{ identifier }}.var" diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside/tiramisu/base.py b/tests/dictionaries/60_5family_dynamic_variable_outside/tiramisu/base.py index 3503d1509..afc68e259 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside/tiramisu/base.py +++ b/tests/dictionaries/60_5family_dynamic_variable_outside/tiramisu/base.py @@ -3,12 +3,16 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="my_dyn_family_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"})) +option_4 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"standard"}), informations={'type': 'string'}) +optiondescription_3 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) option_5 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3, option_5], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3, option_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside/tiramisu/multi.py index 13383a4d4..a488669d8 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside/tiramisu/multi.py +++ b/tests/dictionaries/60_5family_dynamic_variable_outside/tiramisu/multi.py @@ -3,19 +3,23 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="my_dyn_family_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"})) +option_5 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"standard"}), informations={'type': 'string'}) +optiondescription_4 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) option_6 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4, option_6], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4, option_6], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_9 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_11 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_10 = ConvertDynOptionDescription(name="my_dyn_family_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_11], properties=frozenset({"standard"})) +option_11 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"standard"}), informations={'type': 'string'}) +optiondescription_10 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_11], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) option_12 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_11)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10, option_12], properties=frozenset({"standard"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10, option_12], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/dictionaries/rougail/00-base.yml index b00682460..cf0000848 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/dictionaries/rougail/00-base.yml @@ -3,14 +3,14 @@ version: '1.1' var: # a suffix variable - val1 - val2 -"my_dyn_family_{{ suffix }}": +"my_dyn_family_{{ identifier }}": description: a dynamic family dynamic: variable: _.var var: description: a variable inside a dynamic family default: - type: suffix + type: identifier mandatory: false var2: description: a variable @@ -22,4 +22,4 @@ var2: {%- endfor -%} params: var: - variable: rougail.my_dyn_family_{{ suffix }}.var + variable: rougail.my_dyn_family_{{ identifier }}.var diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/tiramisu/base.py b/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/tiramisu/base.py index 4f2011614..1d0b1fd99 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/tiramisu/base.py +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/tiramisu/base.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_rougail.var2'] = "{%- for v in var %}\n{{ v }}\n{%- endfor -%}" option_2 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="my_dyn_family_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"})) +option_4 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"standard"}), informations={'type': 'string'}) +optiondescription_3 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) option_5 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_variable_outside_jinja/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.var2"), 'var': ParamOption(option_4)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3, option_5], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3, option_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/tiramisu/multi.py index 8b82245bc..ebd029cef 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/tiramisu/multi.py +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/tiramisu/multi.py @@ -3,21 +3,25 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['default_1.rougail.var2'] = "{%- for v in var %}\n{{ v }}\n{%- endfor -%}" dict_env['default_2.rougail.var2'] = "{%- for v in var %}\n{{ v }}\n{%- endfor -%}" option_3 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="my_dyn_family_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"})) +option_5 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"standard"}), informations={'type': 'string'}) +optiondescription_4 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) option_6 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_variable_outside_jinja/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'var': ParamOption(option_5)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4, option_6], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4, option_6], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_9 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_11 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_10 = ConvertDynOptionDescription(name="my_dyn_family_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_11], properties=frozenset({"standard"})) +option_11 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"standard"}), informations={'type': 'string'}) +optiondescription_10 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_11], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) option_12 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_5family_dynamic_variable_outside_jinja/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'var': ParamOption(option_11)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10, option_12], properties=frozenset({"standard"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10, option_12], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/dictionaries/rougail/00-base.yml index 710b5420b..d39d959dc 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/dictionaries/rougail/00-base.yml @@ -3,22 +3,22 @@ version: '1.1' var: # a suffix variable - val1 - val2 -"my_dyn_family_{{ suffix }}": +"my_dyn_family_{{ identifier }}": description: a dynamic family dynamic: variable: _.var propertyerror: false - "subdyn_{{ suffix }}": + "subdyn_{{ identifier }}": description: a sub dynamic family dynamic: variable: rougail.var var: description: a variable inside a sub dynamic family default: - type: suffix + type: identifier var2: description: a variable mandatory: false multi: true default: - variable: "rougail.my_dyn_family_val1.subdyn_{{ suffix }}.var" + variable: "rougail.my_dyn_family_val1.subdyn_{{ identifier }}.var" diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/after.json b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/after.json new file mode 100644 index 000000000..ad22326bf --- /dev/null +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/after.json @@ -0,0 +1,32 @@ +{ + "rougail.var": { + "owner": "default", + "value": [ + "val1", + "val2" + ] + }, + "rougail.my_dyn_family_val1.subdyn_val1.var": { + "owner": "default", + "value": "val1" + }, + "rougail.my_dyn_family_val1.subdyn_val2.var": { + "owner": "default", + "value": "val2" + }, + "rougail.my_dyn_family_val2.subdyn_val1.var": { + "owner": "default", + "value": "val1" + }, + "rougail.my_dyn_family_val2.subdyn_val2.var": { + "owner": "default", + "value": "val2" + }, + "rougail.var2": { + "owner": "default", + "value": [ + "val1", + "val2" + ] + } +} diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/base.json b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/base.json new file mode 100644 index 000000000..c38e18373 --- /dev/null +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/base.json @@ -0,0 +1,14 @@ +{ + "rougail.var": [ + "val1", + "val2" + ], + "rougail.my_dyn_family_val1.subdyn_val1.var": "val1", + "rougail.my_dyn_family_val1.subdyn_val2.var": "val2", + "rougail.my_dyn_family_val2.subdyn_val1.var": "val1", + "rougail.my_dyn_family_val2.subdyn_val2.var": "val2", + "rougail.var2": [ + "val1", + "val2" + ] +} diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/before.json b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/before.json new file mode 100644 index 000000000..ad22326bf --- /dev/null +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/before.json @@ -0,0 +1,32 @@ +{ + "rougail.var": { + "owner": "default", + "value": [ + "val1", + "val2" + ] + }, + "rougail.my_dyn_family_val1.subdyn_val1.var": { + "owner": "default", + "value": "val1" + }, + "rougail.my_dyn_family_val1.subdyn_val2.var": { + "owner": "default", + "value": "val2" + }, + "rougail.my_dyn_family_val2.subdyn_val1.var": { + "owner": "default", + "value": "val1" + }, + "rougail.my_dyn_family_val2.subdyn_val2.var": { + "owner": "default", + "value": "val2" + }, + "rougail.var2": { + "owner": "default", + "value": [ + "val1", + "val2" + ] + } +} diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/mandatory.json b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/mandatory.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/makedict/mandatory.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/tiramisu/base.py b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/tiramisu/base.py index 16577315e..3034dd0c9 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/tiramisu/base.py +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/tiramisu/base.py @@ -3,13 +3,17 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var", doc="a variable inside a sub dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="subdyn_{{ suffix }}", doc="a sub dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_5], properties=frozenset({"standard"})) -optiondescription_3 = ConvertDynOptionDescription(name="my_dyn_family_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)))), children=[optiondescription_4], properties=frozenset({"standard"})) -option_6 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamDynOption(option_5, ["val1", "{{ suffix }}"])))), properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3, option_6], properties=frozenset({"standard"})) +option_5 = StrOption(name="var", doc="a variable inside a sub dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_4 = ConvertDynOptionDescription(name="subdyn_{{ identifier }}", doc="a sub dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_5], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_3 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2, notraisepropertyerror=True)))), children=[optiondescription_4], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) +option_6 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamDynOption(option_5, ["val1", None])))), properties=frozenset({"standard"}), informations={'type': 'string'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3, option_6], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/tiramisu/multi.py index 21620c1fd..c9963ccb7 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/tiramisu/multi.py +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/tiramisu/multi.py @@ -3,21 +3,25 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_6 = StrOption(name="var", doc="a variable inside a sub dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = ConvertDynOptionDescription(name="subdyn_{{ suffix }}", doc="a sub dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_6], properties=frozenset({"standard"})) -optiondescription_4 = ConvertDynOptionDescription(name="my_dyn_family_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)))), children=[optiondescription_5], properties=frozenset({"standard"})) -option_7 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamDynOption(option_6, ["val1", "{{ suffix }}"])))), properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4, option_7], properties=frozenset({"standard"})) +option_6 = StrOption(name="var", doc="a variable inside a sub dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_5 = ConvertDynOptionDescription(name="subdyn_{{ identifier }}", doc="a sub dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_6], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.var'}) +optiondescription_4 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3, notraisepropertyerror=True)))), children=[optiondescription_5], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) +option_7 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamDynOption(option_6, ["val1", None])))), properties=frozenset({"standard"}), informations={'type': 'string'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4, option_7], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_10 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_13 = StrOption(name="var", doc="a variable inside a sub dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_12 = ConvertDynOptionDescription(name="subdyn_{{ suffix }}", doc="a sub dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_10)))), children=[option_13], properties=frozenset({"standard"})) -optiondescription_11 = ConvertDynOptionDescription(name="my_dyn_family_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_10, notraisepropertyerror=True)))), children=[optiondescription_12], properties=frozenset({"standard"})) -option_14 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamDynOption(option_13, ["val1", "{{ suffix }}"])))), properties=frozenset({"standard"}), informations={'type': 'string'}) -optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", children=[option_10, optiondescription_11, option_14], properties=frozenset({"standard"})) +option_13 = StrOption(name="var", doc="a variable inside a sub dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_12 = ConvertDynOptionDescription(name="subdyn_{{ identifier }}", doc="a sub dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_10)))), children=[option_13], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.var'}) +optiondescription_11 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_10, notraisepropertyerror=True)))), children=[optiondescription_12], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) +option_14 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamDynOption(option_13, ["val1", None])))), properties=frozenset({"standard"}), informations={'type': 'string'}) +optiondescription_9 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_10, optiondescription_11, option_14], properties=frozenset({"standard"})) optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_8]) diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/dictionaries/rougail/00-base.yml index 0e42e2107..363798d1c 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/dictionaries/rougail/00-base.yml @@ -3,14 +3,14 @@ version: '1.1' var: # a suffix variable - val1 - val2 -"dyn_{{ suffix }}": +"dyn_{{ identifier }}": description: a dynamic family dynamic: variable: _.var var: description: a variable inside dynamic family default: - type: suffix + type: identifier var2: description: a variable default: diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/base.py b/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/base.py index 92245734c..78db6b3b4 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/base.py +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/base.py @@ -3,12 +3,16 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var", doc="a variable inside dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"})) +option_4 = StrOption(name="var", doc="a variable inside dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_3 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) option_5 = StrOption(name="var2", doc="a variable", default=Calculation(func['calc_value'], Params((ParamDynOption(option_4, ["val1"])))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3, option_5], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3, option_5], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/multi.py index 62cfe95c0..d0d0b8508 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/multi.py +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/multi.py @@ -3,19 +3,23 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var", doc="a variable inside dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"})) +option_5 = StrOption(name="var", doc="a variable inside dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_4 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) option_6 = StrOption(name="var2", doc="a variable", default=Calculation(func['calc_value'], Params((ParamDynOption(option_5, ["val1"])))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4, option_6], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4, option_6], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_9 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_11 = StrOption(name="var", doc="a variable inside dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_10 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_11], properties=frozenset({"standard"})) +option_11 = StrOption(name="var", doc="a variable inside dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_10 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_11], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) option_12 = StrOption(name="var2", doc="a variable", default=Calculation(func['calc_value'], Params((ParamDynOption(option_11, ["val1"])))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9, optiondescription_10, option_12], properties=frozenset({"standard"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9, optiondescription_10, option_12], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/no_namespace.py b/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/no_namespace.py index 94326a7ba..19e72b50c 100644 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/no_namespace.py @@ -7,7 +7,7 @@ ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_1 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_3 = StrOption(name="var", doc="a variable inside dynamic family", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"standard"})) +option_3 = StrOption(name="var", doc="a variable inside dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_2 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"standard"}), informations={'dynamic_variable': 'var'}) option_4 = StrOption(name="var2", doc="a variable", default=Calculation(func['calc_value'], Params((ParamDynOption(option_3, ["val1"])))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_4]) diff --git a/tests/dictionaries/60_6family_dynamic_inside/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_6family_dynamic_inside/dictionaries/rougail/00-base.yml index c8c556f76..b8f3e70f1 100644 --- a/tests/dictionaries/60_6family_dynamic_inside/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_6family_dynamic_inside/dictionaries/rougail/00-base.yml @@ -4,18 +4,18 @@ var: # a suffix variable - val1 - val2 -"{{ suffix }}_dyn": +"{{ identifier }}_dyn": description: a dynamic family dynamic: variable: _.var var1: description: value is suffix default: - type: suffix + type: identifier var2: description: value is first variable default: - variable: rougail.{{ suffix }}_dyn.var1 + variable: rougail.{{ identifier }}_dyn.var1 var3: description: value is relative first variable default: diff --git a/tests/dictionaries/60_6family_dynamic_inside/tiramisu/base.py b/tests/dictionaries/60_6family_dynamic_inside/tiramisu/base.py index 1ffd181d0..38de5be53 100644 --- a/tests/dictionaries/60_6family_dynamic_inside/tiramisu/base.py +++ b/tests/dictionaries/60_6family_dynamic_inside/tiramisu/base.py @@ -3,14 +3,18 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var1", doc="value is suffix", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_4 = StrOption(name="var1", doc="value is suffix", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="var2", doc="value is first variable", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="var3", doc="value is relative first variable", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_7 = StrOption(name="var4", doc="value is first variable of val1", default=Calculation(func['calc_value'], Params((ParamDynOption(option_4, ["val1"])))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="{{ suffix }}_dyn", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4, option_5, option_6, option_7], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"standard"})) +optiondescription_3 = ConvertDynOptionDescription(name="{{ identifier }}_dyn", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4, option_5, option_6, option_7], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_6family_dynamic_inside/tiramisu/multi.py b/tests/dictionaries/60_6family_dynamic_inside/tiramisu/multi.py index 36ed93c34..5c70d4d68 100644 --- a/tests/dictionaries/60_6family_dynamic_inside/tiramisu/multi.py +++ b/tests/dictionaries/60_6family_dynamic_inside/tiramisu/multi.py @@ -3,23 +3,27 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var1", doc="value is suffix", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_5 = StrOption(name="var1", doc="value is suffix", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="var2", doc="value is first variable", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_7 = StrOption(name="var3", doc="value is relative first variable", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="var4", doc="value is first variable of val1", default=Calculation(func['calc_value'], Params((ParamDynOption(option_5, ["val1"])))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="{{ suffix }}_dyn", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5, option_6, option_7, option_8], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"standard"})) +optiondescription_4 = ConvertDynOptionDescription(name="{{ identifier }}_dyn", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5, option_6, option_7, option_8], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) option_11 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_13 = StrOption(name="var1", doc="value is suffix", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_13 = StrOption(name="var1", doc="value is suffix", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_14 = StrOption(name="var2", doc="value is first variable", default=Calculation(func['calc_value'], Params((ParamOption(option_13)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_15 = StrOption(name="var3", doc="value is relative first variable", default=Calculation(func['calc_value'], Params((ParamOption(option_13)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_16 = StrOption(name="var4", doc="value is first variable of val1", default=Calculation(func['calc_value'], Params((ParamDynOption(option_13, ["val1"])))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_12 = ConvertDynOptionDescription(name="{{ suffix }}_dyn", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_11)))), children=[option_13, option_14, option_15, option_16], properties=frozenset({"standard"})) -optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[option_11, optiondescription_12], properties=frozenset({"standard"})) +optiondescription_12 = ConvertDynOptionDescription(name="{{ identifier }}_dyn", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_11)))), children=[option_13, option_14, option_15, option_16], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) +optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_11, optiondescription_12], properties=frozenset({"standard"})) optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_9]) diff --git a/tests/dictionaries/60_6family_dynamic_leadership/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_6family_dynamic_leadership/dictionaries/rougail/00-base.yml index 825a79320..ee1283f8f 100644 --- a/tests/dictionaries/60_6family_dynamic_leadership/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_6family_dynamic_leadership/dictionaries/rougail/00-base.yml @@ -3,7 +3,7 @@ version: '1.1' var: # a suffix variable - val1 - val2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: a dynamic family dynamic: variable: _.var diff --git a/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/base.py b/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/base.py index 888d28867..dc21f9db2 100644 --- a/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/base.py +++ b/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,6 +15,6 @@ option_5 = StrOption(name="leader", doc="a leader", multi=True, properties=froze option_6 = StrOption(name="follower1", doc="a follower1", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_7 = StrOption(name="follower2", doc="a follower2", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) optiondescription_4 = Leadership(name="leadership", doc="a leadership", children=[option_5, option_6, option_7], properties=frozenset({"basic"})) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[optiondescription_4], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[optiondescription_4], properties=frozenset({"basic"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/multi.py b/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/multi.py index 5e2f9ba7c..aaf1af5fc 100644 --- a/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/multi.py +++ b/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -11,15 +15,15 @@ option_6 = StrOption(name="leader", doc="a leader", multi=True, properties=froze option_7 = StrOption(name="follower1", doc="a follower1", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_8 = StrOption(name="follower2", doc="a follower2", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) optiondescription_5 = Leadership(name="leadership", doc="a leadership", children=[option_6, option_7, option_8], properties=frozenset({"basic"})) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[optiondescription_5], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[optiondescription_5], properties=frozenset({"basic"}), informations={'dynamic_variable': '1.rougail.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_11 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_14 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_15 = StrOption(name="follower1", doc="a follower1", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_16 = StrOption(name="follower2", doc="a follower2", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) optiondescription_13 = Leadership(name="leadership", doc="a leadership", children=[option_14, option_15, option_16], properties=frozenset({"basic"})) -optiondescription_12 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_11)))), children=[optiondescription_13], properties=frozenset({"basic"})) -optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[option_11, optiondescription_12], properties=frozenset({"basic"})) +optiondescription_12 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_11)))), children=[optiondescription_13], properties=frozenset({"basic"}), informations={'dynamic_variable': '2.rougail.var'}) +optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_11, optiondescription_12], properties=frozenset({"basic"})) optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_9]) diff --git a/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/no_namespace.py b/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/no_namespace.py index b21631347..dec96c4a9 100644 --- a/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/no_namespace.py @@ -11,5 +11,5 @@ option_4 = StrOption(name="leader", doc="a leader", multi=True, properties=froze option_5 = StrOption(name="follower1", doc="a follower1", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_6 = StrOption(name="follower2", doc="a follower2", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leadership", doc="a leadership", children=[option_4, option_5, option_6], properties=frozenset({"basic"})) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[optiondescription_3], properties=frozenset({"basic"}), informations={'dynamic_variable': 'var'}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2]) diff --git a/tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml index 239139f0f..20d21fde1 100644 --- a/tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml @@ -1,9 +1,9 @@ --- version: '1.1' -var: # A suffix variable +var: # A identifier variable - val1 - val2 -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: A dynamic family dynamic: variable: _.var @@ -16,29 +16,29 @@ var: # A suffix variable t{{ val }} {% endfor %} description: add 't' to each var value - "dyn_{{ suffix }}": + "dyn_{{ identifier }}": description: a Second dynamic variable dynamic: - variable: "rougail.dyn{{ suffix }}.var" + variable: "rougail.dyn{{ identifier }}.var" var: description: A variable dynamic default: - type: suffix - var_suffix: - description: suffix from first family + type: identifier + var_identifier: + description: identifier from first family default: - type: suffix - suffix: 0 - var_suffixes: - description: merge suffixes + type: identifier + identifier: 0 + var_identifiers: + description: merge identifiers default: jinja: | {{ s1 }}-{{ s2 }} params: s1: - type: suffix - suffix: 0 + type: identifier + identifier: 0 s2: - type: suffix - suffix: 1 - description: join suffix 1 et suffix 2 + type: identifier + identifier: 1 + description: join identifier 1 et identifier 2 diff --git a/tests/dictionaries/60_6family_dynamic_sub_dynamic/makedict/after.json b/tests/dictionaries/60_6family_dynamic_sub_dynamic/makedict/after.json index b955cd847..2c5f0e043 100644 --- a/tests/dictionaries/60_6family_dynamic_sub_dynamic/makedict/after.json +++ b/tests/dictionaries/60_6family_dynamic_sub_dynamic/makedict/after.json @@ -17,11 +17,11 @@ "owner": "default", "value": "tval1" }, - "rougail.dynval1.dyn_tval1.var_suffix": { + "rougail.dynval1.dyn_tval1.var_identifier": { "owner": "default", "value": "val1" }, - "rougail.dynval1.dyn_tval1.var_suffixes": { + "rougail.dynval1.dyn_tval1.var_identifiers": { "owner": "default", "value": "val1-tval1" }, @@ -29,11 +29,11 @@ "owner": "default", "value": "tval2" }, - "rougail.dynval1.dyn_tval2.var_suffix": { + "rougail.dynval1.dyn_tval2.var_identifier": { "owner": "default", "value": "val1" }, - "rougail.dynval1.dyn_tval2.var_suffixes": { + "rougail.dynval1.dyn_tval2.var_identifiers": { "owner": "default", "value": "val1-tval2" }, @@ -48,11 +48,11 @@ "owner": "default", "value": "tval1" }, - "rougail.dynval2.dyn_tval1.var_suffix": { + "rougail.dynval2.dyn_tval1.var_identifier": { "owner": "default", "value": "val2" }, - "rougail.dynval2.dyn_tval1.var_suffixes": { + "rougail.dynval2.dyn_tval1.var_identifiers": { "owner": "default", "value": "val2-tval1" }, @@ -60,11 +60,11 @@ "owner": "default", "value": "tval2" }, - "rougail.dynval2.dyn_tval2.var_suffix": { + "rougail.dynval2.dyn_tval2.var_identifier": { "owner": "default", "value": "val2" }, - "rougail.dynval2.dyn_tval2.var_suffixes": { + "rougail.dynval2.dyn_tval2.var_identifiers": { "owner": "default", "value": "val2-tval2" } diff --git a/tests/dictionaries/60_6family_dynamic_sub_dynamic/makedict/base.json b/tests/dictionaries/60_6family_dynamic_sub_dynamic/makedict/base.json index c9a3ccf7f..07461b674 100644 --- a/tests/dictionaries/60_6family_dynamic_sub_dynamic/makedict/base.json +++ b/tests/dictionaries/60_6family_dynamic_sub_dynamic/makedict/base.json @@ -8,19 +8,19 @@ "tval2" ], "rougail.dynval1.dyn_tval1.var": "tval1", - "rougail.dynval1.dyn_tval1.var_suffix": "val1", - "rougail.dynval1.dyn_tval1.var_suffixes": "val1-tval1", + "rougail.dynval1.dyn_tval1.var_identifier": "val1", + "rougail.dynval1.dyn_tval1.var_identifiers": "val1-tval1", "rougail.dynval1.dyn_tval2.var": "tval2", - "rougail.dynval1.dyn_tval2.var_suffix": "val1", - "rougail.dynval1.dyn_tval2.var_suffixes": "val1-tval2", + "rougail.dynval1.dyn_tval2.var_identifier": "val1", + "rougail.dynval1.dyn_tval2.var_identifiers": "val1-tval2", "rougail.dynval2.var": [ "tval1", "tval2" ], "rougail.dynval2.dyn_tval1.var": "tval1", - "rougail.dynval2.dyn_tval1.var_suffix": "val2", - "rougail.dynval2.dyn_tval1.var_suffixes": "val2-tval1", + "rougail.dynval2.dyn_tval1.var_identifier": "val2", + "rougail.dynval2.dyn_tval1.var_identifiers": "val2-tval1", "rougail.dynval2.dyn_tval2.var": "tval2", - "rougail.dynval2.dyn_tval2.var_suffix": "val2", - "rougail.dynval2.dyn_tval2.var_suffixes": "val2-tval2" + "rougail.dynval2.dyn_tval2.var_identifier": "val2", + "rougail.dynval2.dyn_tval2.var_identifiers": "val2-tval2" } diff --git a/tests/dictionaries/60_6family_dynamic_sub_dynamic/makedict/before.json b/tests/dictionaries/60_6family_dynamic_sub_dynamic/makedict/before.json index b955cd847..2c5f0e043 100644 --- a/tests/dictionaries/60_6family_dynamic_sub_dynamic/makedict/before.json +++ b/tests/dictionaries/60_6family_dynamic_sub_dynamic/makedict/before.json @@ -17,11 +17,11 @@ "owner": "default", "value": "tval1" }, - "rougail.dynval1.dyn_tval1.var_suffix": { + "rougail.dynval1.dyn_tval1.var_identifier": { "owner": "default", "value": "val1" }, - "rougail.dynval1.dyn_tval1.var_suffixes": { + "rougail.dynval1.dyn_tval1.var_identifiers": { "owner": "default", "value": "val1-tval1" }, @@ -29,11 +29,11 @@ "owner": "default", "value": "tval2" }, - "rougail.dynval1.dyn_tval2.var_suffix": { + "rougail.dynval1.dyn_tval2.var_identifier": { "owner": "default", "value": "val1" }, - "rougail.dynval1.dyn_tval2.var_suffixes": { + "rougail.dynval1.dyn_tval2.var_identifiers": { "owner": "default", "value": "val1-tval2" }, @@ -48,11 +48,11 @@ "owner": "default", "value": "tval1" }, - "rougail.dynval2.dyn_tval1.var_suffix": { + "rougail.dynval2.dyn_tval1.var_identifier": { "owner": "default", "value": "val2" }, - "rougail.dynval2.dyn_tval1.var_suffixes": { + "rougail.dynval2.dyn_tval1.var_identifiers": { "owner": "default", "value": "val2-tval1" }, @@ -60,11 +60,11 @@ "owner": "default", "value": "tval2" }, - "rougail.dynval2.dyn_tval2.var_suffix": { + "rougail.dynval2.dyn_tval2.var_identifier": { "owner": "default", "value": "val2" }, - "rougail.dynval2.dyn_tval2.var_suffixes": { + "rougail.dynval2.dyn_tval2.var_identifiers": { "owner": "default", "value": "val2-tval2" } diff --git a/tests/dictionaries/60_6family_dynamic_sub_dynamic/tiramisu/base.py b/tests/dictionaries/60_6family_dynamic_sub_dynamic/tiramisu/base.py index c51992e36..2e16c68bc 100644 --- a/tests/dictionaries/60_6family_dynamic_sub_dynamic/tiramisu/base.py +++ b/tests/dictionaries/60_6family_dynamic_sub_dynamic/tiramisu/base.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['default_rougail.dyn{{ suffix }}.var'] = "{% for val in __.var %}\nt{{ val }}\n{% endfor %}\n" -dict_env['default_rougail.dyn{{ suffix }}.dyn_{{ suffix }}.var_suffixes'] = "{{ s1 }}-{{ s2 }}\n" -option_2 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var", doc="A dynamic variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.dyn{{ suffix }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.dyn{{ suffix }}.var"), '__.var': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_6 = StrOption(name="var", doc="A variable dynamic", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_7 = StrOption(name="var_suffix", doc="suffix from first family", default=Calculation(func['calc_value'], Params((ParamSuffix(suffix_index=0)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_8 = StrOption(name="var_suffixes", doc="merge suffixes", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.dyn{{ suffix }}.dyn_{{ suffix }}.var_suffixes"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.dyn{{ suffix }}.dyn_{{ suffix }}.var_suffixes"), 's1': ParamSuffix(suffix_index=0), 's2': ParamSuffix(suffix_index=1)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="a Second dynamic variable", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_4)))), children=[option_6, option_7, option_8], properties=frozenset({"standard"})) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4, optiondescription_5], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"standard"})) +dict_env['default_rougail.dyn{{ identifier }}.var'] = "{% for val in __.var %}\nt{{ val }}\n{% endfor %}\n" +dict_env['default_rougail.dyn{{ identifier }}.dyn_{{ identifier }}.var_identifiers'] = "{{ s1 }}-{{ s2 }}\n" +option_2 = StrOption(name="var", doc="A identifier variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_4 = StrOption(name="var", doc="A dynamic variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.dyn{{ identifier }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.dyn{{ identifier }}.var"), '__.var': ParamOption(option_2)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_6 = StrOption(name="var", doc="A variable dynamic", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_7 = StrOption(name="var_identifier", doc="identifier from first family", default=Calculation(func['calc_value'], Params((ParamIdentifier(identifier_index=0)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_8 = StrOption(name="var_identifiers", doc="merge identifiers", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.dyn{{ identifier }}.dyn_{{ identifier }}.var_identifiers"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("rougail.dyn{{ identifier }}.dyn_{{ identifier }}.var_identifiers"), 's1': ParamIdentifier(identifier_index=0), 's2': ParamIdentifier(identifier_index=1)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_5 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="a Second dynamic variable", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_4)))), children=[option_6, option_7, option_8], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.dyn{{ identifier }}.var'}) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4, optiondescription_5], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.var'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_6family_dynamic_sub_dynamic/tiramisu/multi.py b/tests/dictionaries/60_6family_dynamic_sub_dynamic/tiramisu/multi.py index 9e1a9c1ae..71bb03d70 100644 --- a/tests/dictionaries/60_6family_dynamic_sub_dynamic/tiramisu/multi.py +++ b/tests/dictionaries/60_6family_dynamic_sub_dynamic/tiramisu/multi.py @@ -3,29 +3,33 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -dict_env['default_1.rougail.dyn{{ suffix }}.var'] = "{% for val in __.var %}\nt{{ val }}\n{% endfor %}\n" -dict_env['default_1.rougail.dyn{{ suffix }}.dyn_{{ suffix }}.var_suffixes'] = "{{ s1 }}-{{ s2 }}\n" -dict_env['default_2.rougail.dyn{{ suffix }}.var'] = "{% for val in __.var %}\nt{{ val }}\n{% endfor %}\n" -dict_env['default_2.rougail.dyn{{ suffix }}.dyn_{{ suffix }}.var_suffixes'] = "{{ s1 }}-{{ s2 }}\n" -option_3 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var", doc="A dynamic variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.dyn{{ suffix }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.dyn{{ suffix }}.var"), '__.var': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_7 = StrOption(name="var", doc="A variable dynamic", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_8 = StrOption(name="var_suffix", doc="suffix from first family", default=Calculation(func['calc_value'], Params((ParamSuffix(suffix_index=0)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_9 = StrOption(name="var_suffixes", doc="merge suffixes", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.dyn{{ suffix }}.dyn_{{ suffix }}.var_suffixes"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.dyn{{ suffix }}.dyn_{{ suffix }}.var_suffixes"), 's1': ParamSuffix(suffix_index=0), 's2': ParamSuffix(suffix_index=1)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_6 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="a Second dynamic variable", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_5)))), children=[option_7, option_8, option_9], properties=frozenset({"standard"})) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5, optiondescription_6], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"standard"})) +dict_env['default_1.rougail.dyn{{ identifier }}.var'] = "{% for val in __.var %}\nt{{ val }}\n{% endfor %}\n" +dict_env['default_1.rougail.dyn{{ identifier }}.dyn_{{ identifier }}.var_identifiers'] = "{{ s1 }}-{{ s2 }}\n" +dict_env['default_2.rougail.dyn{{ identifier }}.var'] = "{% for val in __.var %}\nt{{ val }}\n{% endfor %}\n" +dict_env['default_2.rougail.dyn{{ identifier }}.dyn_{{ identifier }}.var_identifiers'] = "{{ s1 }}-{{ s2 }}\n" +option_3 = StrOption(name="var", doc="A identifier variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_5 = StrOption(name="var", doc="A dynamic variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.dyn{{ identifier }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}.var"), '__.var': ParamOption(option_3)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_7 = StrOption(name="var", doc="A variable dynamic", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_8 = StrOption(name="var_identifier", doc="identifier from first family", default=Calculation(func['calc_value'], Params((ParamIdentifier(identifier_index=0)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_9 = StrOption(name="var_identifiers", doc="merge identifiers", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.dyn{{ identifier }}.dyn_{{ identifier }}.var_identifiers"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}.dyn_{{ identifier }}.var_identifiers"), 's1': ParamIdentifier(identifier_index=0), 's2': ParamIdentifier(identifier_index=1)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_6 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="a Second dynamic variable", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_5)))), children=[option_7, option_8, option_9], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.dyn{{ identifier }}.var'}) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5, optiondescription_6], properties=frozenset({"standard"}), informations={'dynamic_variable': '1.rougail.var'}) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) -option_12 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_14 = StrOption(name="var", doc="A dynamic variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.dyn{{ suffix }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.dyn{{ suffix }}.var"), '__.var': ParamOption(option_12)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_16 = StrOption(name="var", doc="A variable dynamic", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_17 = StrOption(name="var_suffix", doc="suffix from first family", default=Calculation(func['calc_value'], Params((ParamSuffix(suffix_index=0)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_18 = StrOption(name="var_suffixes", doc="merge suffixes", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.dyn{{ suffix }}.dyn_{{ suffix }}.var_suffixes"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.dyn{{ suffix }}.dyn_{{ suffix }}.var_suffixes"), 's1': ParamSuffix(suffix_index=0), 's2': ParamSuffix(suffix_index=1)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_15 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="a Second dynamic variable", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_14)))), children=[option_16, option_17, option_18], properties=frozenset({"standard"})) -optiondescription_13 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="A dynamic family", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_12)))), children=[option_14, optiondescription_15], properties=frozenset({"standard"})) -optiondescription_11 = OptionDescription(name="rougail", doc="Rougail", children=[option_12, optiondescription_13], properties=frozenset({"standard"})) +option_12 = StrOption(name="var", doc="A identifier variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_14 = StrOption(name="var", doc="A dynamic variable", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.dyn{{ identifier }}.var"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}.var"), '__.var': ParamOption(option_12)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_16 = StrOption(name="var", doc="A variable dynamic", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_17 = StrOption(name="var_identifier", doc="identifier from first family", default=Calculation(func['calc_value'], Params((ParamIdentifier(identifier_index=0)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_18 = StrOption(name="var_identifiers", doc="merge identifiers", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.dyn{{ identifier }}.dyn_{{ identifier }}.var_identifiers"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tests/dictionaries/60_6family_dynamic_sub_dynamic/dictionaries/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}.dyn_{{ identifier }}.var_identifiers"), 's1': ParamIdentifier(identifier_index=0), 's2': ParamIdentifier(identifier_index=1)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_15 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="a Second dynamic variable", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_14)))), children=[option_16, option_17, option_18], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.dyn{{ identifier }}.var'}) +optiondescription_13 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_12)))), children=[option_14, optiondescription_15], properties=frozenset({"standard"}), informations={'dynamic_variable': '2.rougail.var'}) +optiondescription_11 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_12, optiondescription_13], properties=frozenset({"standard"})) optiondescription_10 = OptionDescription(name="2", doc="2", children=[optiondescription_11], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_10]) diff --git a/tests/dictionaries/60_9extra_dynamic/dictionaries/extra/00-base.yml b/tests/dictionaries/60_9extra_dynamic/dictionaries/extra/00-base.yml index cbd6b1a2e..87fe0c39a 100644 --- a/tests/dictionaries/60_9extra_dynamic/dictionaries/extra/00-base.yml +++ b/tests/dictionaries/60_9extra_dynamic/dictionaries/extra/00-base.yml @@ -1,6 +1,6 @@ --- version: 1.1 -dyn_{{ suffix }}: +dyn_{{ identifier }}: dynamic: variable: rougail.var var: diff --git a/tests/dictionaries/60_9extra_dynamic/tiramisu/base.py b/tests/dictionaries/60_9extra_dynamic/tiramisu/base.py index ea4b9d372..12e93d984 100644 --- a/tests/dictionaries/60_9extra_dynamic/tiramisu/base.py +++ b/tests/dictionaries/60_9extra_dynamic/tiramisu/base.py @@ -3,12 +3,16 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="a variable", multi=True, default=["a"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], properties=frozenset({"standard"})) option_5 = StrOption(name="var", doc="var", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="dyn_{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_5], properties=frozenset({"basic"})) -optiondescription_3 = OptionDescription(name="extra", doc="extra", children=[optiondescription_4], properties=frozenset({"basic"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="dyn_{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_5], properties=frozenset({"basic"}), informations={'dynamic_variable': 'extra.var'}) +optiondescription_3 = OptionDescription(name="extra", doc="extra", group_type=groups.namespace, children=[optiondescription_4], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_3]) diff --git a/tests/dictionaries/60_9extra_dynamic/tiramisu/multi.py b/tests/dictionaries/60_9extra_dynamic/tiramisu/multi.py index 812c18f7a..773dc637f 100644 --- a/tests/dictionaries/60_9extra_dynamic/tiramisu/multi.py +++ b/tests/dictionaries/60_9extra_dynamic/tiramisu/multi.py @@ -3,19 +3,23 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="a variable", multi=True, default=["a"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3], properties=frozenset({"standard"})) option_6 = StrOption(name="var", doc="var", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_5 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="dyn_{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_6], properties=frozenset({"basic"})) -optiondescription_4 = OptionDescription(name="extra", doc="extra", children=[optiondescription_5], properties=frozenset({"basic"})) +optiondescription_5 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="dyn_{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_6], properties=frozenset({"basic"}), informations={'dynamic_variable': '1.var'}) +optiondescription_4 = OptionDescription(name="extra", doc="extra", group_type=groups.namespace, children=[optiondescription_5], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2, optiondescription_4], properties=frozenset({"basic"})) option_9 = StrOption(name="var", doc="a variable", multi=True, default=["a"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[option_9], properties=frozenset({"standard"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_9], properties=frozenset({"standard"})) option_12 = StrOption(name="var", doc="var", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_11 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="dyn_{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_12], properties=frozenset({"basic"})) -optiondescription_10 = OptionDescription(name="extra", doc="extra", children=[optiondescription_11], properties=frozenset({"basic"})) +optiondescription_11 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="dyn_{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_12], properties=frozenset({"basic"}), informations={'dynamic_variable': '2.var'}) +optiondescription_10 = OptionDescription(name="extra", doc="extra", group_type=groups.namespace, children=[optiondescription_11], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8, optiondescription_10], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/60_9extra_dynamic_extra/dictionaries/extra/00-base.yml b/tests/dictionaries/60_9extra_dynamic_extra/dictionaries/extra/00-base.yml index 5e8adbcb2..46703943f 100644 --- a/tests/dictionaries/60_9extra_dynamic_extra/dictionaries/extra/00-base.yml +++ b/tests/dictionaries/60_9extra_dynamic_extra/dictionaries/extra/00-base.yml @@ -2,7 +2,7 @@ version: '1.1' var: # a varaible - a -"dyn_{{ suffix }}": +"dyn_{{ identifier }}": dynamic: variable: _.var var: diff --git a/tests/dictionaries/60_9extra_dynamic_extra/tiramisu/base.py b/tests/dictionaries/60_9extra_dynamic_extra/tiramisu/base.py index 91f3dfec6..9657e60f7 100644 --- a/tests/dictionaries/60_9extra_dynamic_extra/tiramisu/base.py +++ b/tests/dictionaries/60_9extra_dynamic_extra/tiramisu/base.py @@ -3,14 +3,18 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="varname", doc="No change", multi=True, default=["a"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"standard"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"standard"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"})) option_5 = StrOption(name="var", doc="a varaible", multi=True, default=["a"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_7 = StrOption(name="var", doc="var", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_6 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="dyn_{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_5)))), children=[option_7], properties=frozenset({"basic"})) -optiondescription_4 = OptionDescription(name="extra", doc="extra", children=[option_5, optiondescription_6], properties=frozenset({"basic"})) +optiondescription_6 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="dyn_{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_5)))), children=[option_7], properties=frozenset({"basic"}), informations={'dynamic_variable': 'extra.var'}) +optiondescription_4 = OptionDescription(name="extra", doc="extra", group_type=groups.namespace, children=[option_5, optiondescription_6], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/60_9extra_dynamic_extra/tiramisu/multi.py b/tests/dictionaries/60_9extra_dynamic_extra/tiramisu/multi.py index b146ded47..313f908e7 100644 --- a/tests/dictionaries/60_9extra_dynamic_extra/tiramisu/multi.py +++ b/tests/dictionaries/60_9extra_dynamic_extra/tiramisu/multi.py @@ -3,23 +3,27 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_4 = StrOption(name="varname", doc="No change", multi=True, default=["a"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_3 = OptionDescription(name="general", doc="général", children=[option_4], properties=frozenset({"standard"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"})) option_6 = StrOption(name="var", doc="a varaible", multi=True, default=["a"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_8 = StrOption(name="var", doc="var", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_7 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="dyn_{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_6)))), children=[option_8], properties=frozenset({"basic"})) -optiondescription_5 = OptionDescription(name="extra", doc="extra", children=[option_6, optiondescription_7], properties=frozenset({"basic"})) +optiondescription_7 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="dyn_{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_6)))), children=[option_8], properties=frozenset({"basic"}), informations={'dynamic_variable': '1.extra.var'}) +optiondescription_5 = OptionDescription(name="extra", doc="extra", group_type=groups.namespace, children=[option_6, optiondescription_7], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2, optiondescription_5], properties=frozenset({"basic"})) option_12 = StrOption(name="varname", doc="No change", multi=True, default=["a"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) optiondescription_11 = OptionDescription(name="general", doc="général", children=[option_12], properties=frozenset({"standard"})) -optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_11], properties=frozenset({"standard"})) +optiondescription_10 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_11], properties=frozenset({"standard"})) option_14 = StrOption(name="var", doc="a varaible", multi=True, default=["a"], default_multi="a", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_16 = StrOption(name="var", doc="var", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_15 = ConvertDynOptionDescription(name="dyn_{{ suffix }}", doc="dyn_{{ suffix }}", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_14)))), children=[option_16], properties=frozenset({"basic"})) -optiondescription_13 = OptionDescription(name="extra", doc="extra", children=[option_14, optiondescription_15], properties=frozenset({"basic"})) +optiondescription_15 = ConvertDynOptionDescription(name="dyn_{{ identifier }}", doc="dyn_{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_14)))), children=[option_16], properties=frozenset({"basic"}), informations={'dynamic_variable': '2.extra.var'}) +optiondescription_13 = OptionDescription(name="extra", doc="extra", group_type=groups.namespace, children=[option_14, optiondescription_15], properties=frozenset({"basic"})) optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10, optiondescription_13], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_9]) diff --git a/tests/dictionaries/60_9family_dynamic_calc_both/dictionaries/rougail/00-base.yml b/tests/dictionaries/60_9family_dynamic_calc_both/dictionaries/rougail/00-base.yml index b5936d129..e26057d1e 100644 --- a/tests/dictionaries/60_9family_dynamic_calc_both/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/60_9family_dynamic_calc_both/dictionaries/rougail/00-base.yml @@ -1,7 +1,7 @@ --- version: '1.1' var: val2 # a suffix variable -"dyn{{ suffix }}": +"dyn{{ identifier }}": description: a dynamic family dynamic: - val1 diff --git a/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/base.py b/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/base.py index 2f5f78a55..353ca4a4e 100644 --- a/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/base.py +++ b/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/base.py @@ -3,11 +3,15 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var", doc="a suffix variable", default="val2", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_4 = StrOption(name="vardyn", doc="a dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=["val1", Calculation(func['calc_value'], Params((ParamOption(option_2))))], children=[option_4], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[option_2, optiondescription_3], properties=frozenset({"basic"})) +optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=["val1", Calculation(func['calc_value'], Params((ParamOption(option_2))))], children=[option_4], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/multi.py b/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/multi.py index 277e37a2f..1b323ba1b 100644 --- a/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/multi.py +++ b/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/multi.py @@ -3,17 +3,21 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="var", doc="a suffix variable", default="val2", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="vardyn", doc="a dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=["val1", Calculation(func['calc_value'], Params((ParamOption(option_3))))], children=[option_5], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=["val1", Calculation(func['calc_value'], Params((ParamOption(option_3))))], children=[option_5], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_3, optiondescription_4], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_8 = StrOption(name="var", doc="a suffix variable", default="val2", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_10 = StrOption(name="vardyn", doc="a dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=["val1", Calculation(func['calc_value'], Params((ParamOption(option_8))))], children=[option_10], properties=frozenset({"basic"})) -optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", children=[option_8, optiondescription_9], properties=frozenset({"basic"})) +optiondescription_9 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=["val1", Calculation(func['calc_value'], Params((ParamOption(option_8))))], children=[option_10], properties=frozenset({"basic"})) +optiondescription_7 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_8, optiondescription_9], properties=frozenset({"basic"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6]) diff --git a/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/no_namespace.py b/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/no_namespace.py index 1ea5aa7bb..0b77e5b25 100644 --- a/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/no_namespace.py +++ b/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/no_namespace.py @@ -8,5 +8,5 @@ ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_1 = StrOption(name="var", doc="a suffix variable", default="val2", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_3 = StrOption(name="vardyn", doc="a dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ suffix }}", doc="a dynamic family", suffixes=["val1", Calculation(func['calc_value'], Params((ParamOption(option_1))))], children=[option_3], properties=frozenset({"basic"})) +optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic family", identifiers=["val1", Calculation(func['calc_value'], Params((ParamOption(option_1))))], children=[option_3], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2]) diff --git a/tests/dictionaries/68_0family_leadership_mode/tiramisu/base.py b/tests/dictionaries/68_0family_leadership_mode/tiramisu/base.py index ec9b766fd..3c59248ca 100644 --- a/tests/dictionaries/68_0family_leadership_mode/tiramisu/base.py +++ b/tests/dictionaries/68_0family_leadership_mode/tiramisu/base.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,5 +14,5 @@ option_3 = StrOption(name="leader", doc="A leader", multi=True, properties=froze option_4 = StrOption(name="follower1", doc="a follower1", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_5 = StrOption(name="follower2", doc="a follower2", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_2 = Leadership(name="leader", doc="A leadership", children=[option_3, option_4, option_5], properties=frozenset({"basic"})) -optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_2], properties=frozenset({"basic"})) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/dictionaries/68_0family_leadership_mode/tiramisu/multi.py b/tests/dictionaries/68_0family_leadership_mode/tiramisu/multi.py index 821bc7152..8599346c9 100644 --- a/tests/dictionaries/68_0family_leadership_mode/tiramisu/multi.py +++ b/tests/dictionaries/68_0family_leadership_mode/tiramisu/multi.py @@ -3,6 +3,10 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') +try: + groups.namespace +except: + groups.addgroup('namespace') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") @@ -10,12 +14,12 @@ option_4 = StrOption(name="leader", doc="A leader", multi=True, properties=froze option_5 = StrOption(name="follower1", doc="a follower1", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_6 = StrOption(name="follower2", doc="a follower2", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_3 = Leadership(name="leader", doc="A leadership", children=[option_4, option_5, option_6], properties=frozenset({"basic"})) -optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_3], properties=frozenset({"basic"})) +optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) option_10 = StrOption(name="leader", doc="A leader", multi=True, properties=frozenset({"basic"}), informations={'type': 'string'}) option_11 = StrOption(name="follower1", doc="a follower1", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'}) option_12 = StrOption(name="follower2", doc="a follower2", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) optiondescription_9 = Leadership(name="leader", doc="A leadership", children=[option_10, option_11, option_12], properties=frozenset({"basic"})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_9], properties=frozenset({"basic"})) +optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_9], properties=frozenset({"basic"})) optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"basic"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7]) diff --git a/tests/dictionaries/80family_dynamic_not_multi/dictionaries/rougail/00-base.yml b/tests/dictionaries/80family_dynamic_not_multi/dictionaries/rougail/00-base.yml index 81ec73267..4e9d13db9 100644 --- a/tests/dictionaries/80family_dynamic_not_multi/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/80family_dynamic_not_multi/dictionaries/rougail/00-base.yml @@ -2,7 +2,7 @@ version: '1.1' varname: default: val1 -dyn{{ suffix }}: +dyn{{ identifier }}: dynamic: variable: _.varname vardyn: diff --git a/tests/dictionaries/80family_dynamic_optional/dictionaries/rougail/00-base.yml b/tests/dictionaries/80family_dynamic_optional/dictionaries/rougail/00-base.yml index 8501ee862..8aaa826df 100644 --- a/tests/dictionaries/80family_dynamic_optional/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/80family_dynamic_optional/dictionaries/rougail/00-base.yml @@ -3,7 +3,7 @@ version: '1.1' varname: default: - val1 -dyn{{ suffix }}: +dyn{{ identifier }}: dynamic: type: variable variable: _.varname diff --git a/tests/dictionaries/80family_dynamic_unknown_variable/dictionaries/rougail/00-base.yml b/tests/dictionaries/80family_dynamic_unknown_variable/dictionaries/rougail/00-base.yml index 6b8e485ad..84938f50c 100644 --- a/tests/dictionaries/80family_dynamic_unknown_variable/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/80family_dynamic_unknown_variable/dictionaries/rougail/00-base.yml @@ -6,7 +6,7 @@ varname: - val1 - val2 -"{{ suffix }}_dyn": +"{{ identifier }}_dyn": type: dynamic variable: rougail.varname var1: diff --git a/tests/dictionaries/80family_not_dynamic_calc_suffix/dictionaries/rougail/00-base.yml b/tests/dictionaries/80family_not_dynamic_calc_suffix/dictionaries/rougail/00-base.yml index 43c57f747..f9c07c518 100644 --- a/tests/dictionaries/80family_not_dynamic_calc_suffix/dictionaries/rougail/00-base.yml +++ b/tests/dictionaries/80family_not_dynamic_calc_suffix/dictionaries/rougail/00-base.yml @@ -2,4 +2,4 @@ version: '1.0' newvar: default: - type: suffix + type: identifier diff --git a/tests/test_1_flattener.py b/tests/test_1_flattener.py index 8ccd54c8d..5174fa694 100644 --- a/tests/test_1_flattener.py +++ b/tests/test_1_flattener.py @@ -38,7 +38,7 @@ excludes = set([ ]) test_ok -= excludes test_raise -= excludes -#test_ok = ['04_5disabled_calculation_variable3'] +# test_ok = ['60_5family_dynamic_variable_outside_sub_suffix'] #test_ok = [] #test_raise = ['88valid_enum_invalid_default'] #test_raise = [] diff --git a/tests/test_2_makedict.py b/tests/test_2_makedict.py index 166285816..844c858f4 100644 --- a/tests/test_2_makedict.py +++ b/tests/test_2_makedict.py @@ -24,12 +24,12 @@ for test in listdir(dico_dirs): debug = False #debug = True excludes = set([]) -excludes = set([ - '80leadership_subfamily', - '80valid_enum_variables', -]) +#excludes = set([ +# '80leadership_subfamily', +# '80valid_enum_variables', +#]) -excludes = set(['60_5family_dynamic_variable_outside_sub_suffix']) +# excludes = set(['60_5family_dynamic_variable_outside_sub_suffix']) test_ok -= excludes #test_ok = ['00_8calculation_information'] @@ -214,7 +214,7 @@ def mandatory(mandatory_file, mandatories, filename): assert ret_prefix['1'] == ret_prefix['2'] ret = ret_prefix['1'] with mandatory_file.open() as fh: - assert load(fh) == ret, f"error in file {mandatory_file}" + assert ret == load(fh), f"error in file {mandatory_file}" def test_dictionary(test_dir):