From 6c1df5578fe7b9560722e985682ef026b5e23b40 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 2 Jan 2025 21:02:44 +0100 Subject: [PATCH] feat: remove prefix --- src/rougail/__init__.py | 13 +- src/rougail/annotator/variable.py | 7 - src/rougail/convert.py | 459 +++--------------- src/rougail/utils.py | 14 +- .../00_0version_underscore/tiramisu/multi.py | 19 - .../00_1empty_variable/tiramisu/multi.py | 19 - .../00_2default_calculated/tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 21 - .../00_4load_subfolder/tiramisu/multi.py | 21 - .../00_5load_notype/tiramisu/multi.py | 19 - .../00_6boolean/tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 19 - .../dictionaries/00_6choice/tiramisu/multi.py | 29 -- .../00_6choice_calculation/tiramisu/multi.py | 21 - .../00_6choice_variable/tiramisu/multi.py | 21 - .../dictionaries/00_6custom/tiramisu/multi.py | 21 - .../00_6domainname/tiramisu/multi.py | 19 - .../00_6domainname_params/tiramisu/multi.py | 19 - .../dictionaries/00_6float/tiramisu/multi.py | 29 -- .../dictionaries/00_6number/tiramisu/multi.py | 29 -- tests/dictionaries/00_6port/tiramisu/multi.py | 23 - .../dictionaries/00_6regexp/tiramisu/multi.py | 29 -- .../dictionaries/00_6string/tiramisu/multi.py | 29 -- .../00_7choice_quote/tiramisu/multi.py | 19 - .../00_7help_quote/tiramisu/multi.py | 21 - .../00_7value_doublequote/tiramisu/multi.py | 19 - .../00_7value_doublequote2/tiramisu/multi.py | 19 - .../00_7value_doublequote3/tiramisu/multi.py | 19 - .../00_7value_quote/tiramisu/multi.py | 19 - .../tiramisu/multi.py | 21 - tests/dictionaries/00_8test/tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 21 - .../00_9choice_variables/tiramisu/multi.py | 23 - .../00_9default_calculation/tiramisu/multi.py | 21 - .../tiramisu/multi.py | 21 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 21 - .../tiramisu/multi.py | 21 - .../tiramisu/multi.py | 19 - .../tiramisu/multi.py | 21 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 21 - .../makedict/after.json | 10 + .../makedict/base.json | 4 + .../makedict/before.json | 10 + .../makedict/mandatory.json | 1 + .../tiramisu/base.py | 16 + .../tiramisu/no_namespace.py} | 10 +- .../00_9default_integer/tiramisu/multi.py | 21 - .../dictionaries/00_9extra/tiramisu/multi.py | 25 - .../00_9extra_calculation/tiramisu/multi.py | 31 -- .../00_9extra_ouside/makedict/after.json | 10 + .../00_9extra_ouside/makedict/base.json | 4 + .../00_9extra_ouside/makedict/before.json | 10 + .../00_9extra_ouside/makedict/mandatory.json | 1 + .../00_9extra_ouside/tiramisu/base.py | 17 + .../01_6boolean_multi/tiramisu/multi.py | 33 -- .../01_6custom_multi/tiramisu/multi.py | 21 - .../01_6float_multi/tiramisu/multi.py | 33 -- .../01_6number_multi/tiramisu/multi.py | 33 -- .../01_6string_empty/tiramisu/multi.py | 19 - .../01_6string_multi/makedict/after.json | 2 +- .../01_6string_multi/makedict/base.json | 2 +- .../01_6string_multi/makedict/before.json | 2 +- .../01_6string_multi/tiramisu/base.py | 2 +- .../01_6string_multi/tiramisu/multi.py | 33 -- .../01_6string_multi/tiramisu/no_namespace.py | 2 +- .../tiramisu/multi.py | 19 - .../tiramisu/multi.py | 19 - .../01_7value_multi_quote/tiramisu/multi.py | 19 - .../tiramisu/multi.py | 21 - .../tiramisu/multi.py | 21 - .../04_0type_param/tiramisu/multi.py | 19 - .../04_1auto_save/tiramisu/multi.py | 19 - .../tiramisu/multi.py | 21 - .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 19 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 31 -- .../tiramisu/multi.py | 31 -- .../tiramisu/multi.py | 21 - .../tiramisu/multi.py | 21 - .../tiramisu/multi.py | 21 - .../tiramisu/multi.py | 21 - .../04_5hidden_calculation/tiramisu/multi.py | 31 -- .../04_5hidden_calculation2/tiramisu/multi.py | 35 -- .../tiramisu/multi.py | 35 -- .../04_5validators/tiramisu/multi.py | 21 - .../04_5validators_differ/tiramisu/multi.py | 23 - .../04_5validators_multi/tiramisu/multi.py | 21 - .../04_5validators_multi2/tiramisu/multi.py | 21 - .../05_0multi_not_uniq/tiramisu/multi.py | 19 - .../05_0multi_uniq/tiramisu/multi.py | 19 - .../12_1auto_save_expert/tiramisu/multi.py | 19 - .../tiramisu/multi.py | 19 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 21 - .../16_5exists_nonexists/tiramisu/multi.py | 21 - .../16_5exists_redefine/tiramisu/multi.py | 19 - .../tiramisu/multi.py | 21 - .../16_5redefine_choice/tiramisu/multi.py | 19 - .../16_5redefine_default/tiramisu/multi.py | 19 - .../tiramisu/multi.py | 19 - .../16_5redefine_family/tiramisu/multi.py | 21 - .../16_5redefine_help/tiramisu/multi.py | 21 - .../16_5redefine_hidden/tiramisu/multi.py | 19 - .../16_5redefine_multi/tiramisu/multi.py | 19 - .../tiramisu/multi.py | 21 - .../16_5test_redefine/tiramisu/multi.py | 23 - .../16_6choice_redefine/tiramisu/multi.py | 19 - .../16_6exists_family/makedict/after.json | 1 + .../16_6exists_family/makedict/base.json | 1 + .../16_6exists_family/makedict/before.json | 1 + .../16_6exists_family/makedict/mandatory.json | 1 + .../tiramisu/base.py} | 5 +- .../tiramisu/no_namespace.py} | 8 +- .../tiramisu/multi.py | 25 - .../16exists_exists/tiramisu/multi.py | 19 - .../17_5redefine_leadership/tiramisu/base.py | 2 +- .../17_5redefine_leadership/tiramisu/multi.py | 23 - .../tiramisu/no_namespace.py | 2 +- .../20_0family_append/tiramisu/multi.py | 23 - .../20_0family_underscore/tiramisu/multi.py | 43 -- .../20_0multi_family/tiramisu/multi.py | 23 - .../20_0multi_family_basic/tiramisu/multi.py | 23 - .../20_0multi_family_expert/tiramisu/multi.py | 23 - .../20_0multi_family_order/tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 25 - .../20_1empty_subfamily/tiramisu/multi.py | 15 - .../tiramisu/multi.py | 27 -- .../20_9family_absolute/makedict/after.json | 29 ++ .../20_9family_absolute/makedict/base.json | 14 + .../20_9family_absolute/makedict/before.json | 29 ++ .../makedict/mandatory.json | 1 + .../tiramisu/no_namespace.py | 18 + .../20_9family_absolute/tmp/no_namespace.py | 18 + .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 33 -- .../tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 21 - .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 23 - .../40_0leadership/tiramisu/multi.py | 25 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 31 -- .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 25 - .../40_8calculation_boolean/tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 23 - .../40_8calculation_integer/tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 25 - .../41_0choice_leader/tiramisu/multi.py | 23 - .../44_0leadership_hidden/tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 31 -- .../tiramisu/multi.py | 27 -- .../makedict/after.json | 2 +- .../makedict/before.json | 2 +- .../tiramisu/multi.py | 25 - .../60_0family_dynamic/tiramisu/multi.py | 23 - .../60_0family_dynamic_1_0/tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../60_0family_dynamic_1_1/tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 21 - .../60_0family_dynamic_test/tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../60_0family_empty/tiramisu/multi.py | 15 - .../60_0family_hidden/tiramisu/multi.py | 21 - .../60_0family_mode/tiramisu/multi.py | 21 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 21 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 31 -- .../tiramisu/multi.py | 31 -- .../tiramisu/multi.py | 31 -- .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 27 -- .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 25 - .../tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 35 -- .../tiramisu/multi.py | 35 -- .../tiramisu/multi.py | 35 -- .../tiramisu/multi.py | 33 -- .../60_9extra_dynamic/tiramisu/multi.py | 25 - .../60_9extra_dynamic_extra/tiramisu/multi.py | 29 -- .../tiramisu/multi.py | 23 - .../tiramisu/multi.py | 25 - tests/test_upgrade.py | 132 ----- 243 files changed, 290 insertions(+), 5580 deletions(-) delete mode 100644 tests/dictionaries/00_0version_underscore/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_1empty_variable/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_2default_calculated/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_2default_calculated_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_2default_calculated_variable_transitive/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_4load_subfolder/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_5load_notype/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6boolean/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6boolean_no_mandatory/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6choice/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6choice_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6choice_variable/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6custom/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6domainname/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6domainname_params/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6float/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6number/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6port/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6regexp/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_6string/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_7choice_quote/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_7help_quote/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_7value_doublequote/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_7value_doublequote2/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_7value_doublequote3/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_7value_quote/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_8calculation_information/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_8test/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9choice_variable_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9choice_variables/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9default_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9default_calculation_information/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9default_calculation_information_other_variable/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9default_calculation_multi_optional/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9default_calculation_multi_optional2/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9default_calculation_optional/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9default_calculation_optional_exists/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9default_calculation_param_optional/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9default_information_other_variable/tiramisu/multi.py create mode 100644 tests/dictionaries/00_9default_information_other_variable2/makedict/after.json create mode 100644 tests/dictionaries/00_9default_information_other_variable2/makedict/base.json create mode 100644 tests/dictionaries/00_9default_information_other_variable2/makedict/before.json create mode 100644 tests/dictionaries/00_9default_information_other_variable2/makedict/mandatory.json create mode 100644 tests/dictionaries/00_9default_information_other_variable2/tiramisu/base.py rename tests/dictionaries/{40_0leadership_empty/tiramisu/multi.py => 00_9default_information_other_variable2/tiramisu/no_namespace.py} (50%) delete mode 100644 tests/dictionaries/00_9default_integer/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9extra/tiramisu/multi.py delete mode 100644 tests/dictionaries/00_9extra_calculation/tiramisu/multi.py create mode 100644 tests/dictionaries/00_9extra_ouside/makedict/after.json create mode 100644 tests/dictionaries/00_9extra_ouside/makedict/base.json create mode 100644 tests/dictionaries/00_9extra_ouside/makedict/before.json create mode 100644 tests/dictionaries/00_9extra_ouside/makedict/mandatory.json create mode 100644 tests/dictionaries/00_9extra_ouside/tiramisu/base.py delete mode 100644 tests/dictionaries/01_6boolean_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/01_6custom_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/01_6float_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/01_6number_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/01_6string_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/01_6string_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/01_7value_multi_doublequote/tiramisu/multi.py delete mode 100644 tests/dictionaries/01_7value_multi_doublequote2/tiramisu/multi.py delete mode 100644 tests/dictionaries/01_7value_multi_quote/tiramisu/multi.py delete mode 100644 tests/dictionaries/01_8calculation_information_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/01_9choice_variable_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_0type_param/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_1auto_save/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_1auto_save_and_calculated/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_1auto_save_and_calculated_hidden/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_1auto_save_and_hidden/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_1default_calculation_hidden/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_1default_calculation_hidden_2/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5disabled_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5disabled_calculation_default/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5disabled_calculation_optional/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5disabled_calculation_variable/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5disabled_calculation_variable2/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5disabled_calculation_variable3/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5disabled_calculation_variable4/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5hidden_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5hidden_calculation2/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5hidden_calculation_default_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5validators/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5validators_differ/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5validators_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/04_5validators_multi2/tiramisu/multi.py delete mode 100644 tests/dictionaries/05_0multi_not_uniq/tiramisu/multi.py delete mode 100644 tests/dictionaries/05_0multi_uniq/tiramisu/multi.py delete mode 100644 tests/dictionaries/12_1auto_save_expert/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_0redefine_description/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_2family_redefine_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_2family_redefine_disabled/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_5exists_nonexists/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_5exists_redefine/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_5redefine_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_5redefine_choice/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_5redefine_default/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_5redefine_default_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_5redefine_family/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_5redefine_help/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_5redefine_hidden/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_5redefine_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_5redefine_remove_disable_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_5test_redefine/tiramisu/multi.py delete mode 100644 tests/dictionaries/16_6choice_redefine/tiramisu/multi.py create mode 100644 tests/dictionaries/16_6exists_family/makedict/after.json create mode 100644 tests/dictionaries/16_6exists_family/makedict/base.json create mode 100644 tests/dictionaries/16_6exists_family/makedict/before.json create mode 100644 tests/dictionaries/16_6exists_family/makedict/mandatory.json rename tests/dictionaries/{00_0empty/tiramisu/multi.py => 16_6exists_family/tiramisu/base.py} (65%) rename tests/dictionaries/{20_0empty_family/tiramisu/multi.py => 16_6exists_family/tiramisu/no_namespace.py} (56%) delete mode 100644 tests/dictionaries/16_6exists_redefine_family/tiramisu/multi.py delete mode 100644 tests/dictionaries/16exists_exists/tiramisu/multi.py delete mode 100644 tests/dictionaries/17_5redefine_leadership/tiramisu/multi.py delete mode 100644 tests/dictionaries/20_0family_append/tiramisu/multi.py delete mode 100644 tests/dictionaries/20_0family_underscore/tiramisu/multi.py delete mode 100644 tests/dictionaries/20_0multi_family/tiramisu/multi.py delete mode 100644 tests/dictionaries/20_0multi_family_basic/tiramisu/multi.py delete mode 100644 tests/dictionaries/20_0multi_family_expert/tiramisu/multi.py delete mode 100644 tests/dictionaries/20_0multi_family_order/tiramisu/multi.py delete mode 100644 tests/dictionaries/20_0validators_differ_redefine/tiramisu/multi.py delete mode 100644 tests/dictionaries/20_1empty_subfamily/tiramisu/multi.py delete mode 100644 tests/dictionaries/20_9default_information_parent/tiramisu/multi.py create mode 100644 tests/dictionaries/20_9family_absolute/makedict/after.json create mode 100644 tests/dictionaries/20_9family_absolute/makedict/base.json create mode 100644 tests/dictionaries/20_9family_absolute/makedict/before.json create mode 100644 tests/dictionaries/20_9family_absolute/makedict/mandatory.json create mode 100644 tests/dictionaries/20_9family_absolute/tiramisu/no_namespace.py create mode 100644 tests/dictionaries/20_9family_absolute/tmp/no_namespace.py delete mode 100644 tests/dictionaries/24_0family_hidden_condition/tiramisu/multi.py delete mode 100644 tests/dictionaries/24_0family_hidden_condition_boolean/tiramisu/multi.py delete mode 100644 tests/dictionaries/24_0family_hidden_condition_sub_family/tiramisu/multi.py delete mode 100644 tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/multi.py delete mode 100644 tests/dictionaries/24_0family_hidden_condition_with_variable/tiramisu/multi.py delete mode 100644 tests/dictionaries/24_0family_hidden_param_condition_sub_family/tiramisu/multi.py delete mode 100644 tests/dictionaries/24_0family_mandatory_condition/tiramisu/multi.py delete mode 100644 tests/dictionaries/24_0family_mandatory_condition_variable/tiramisu/multi.py delete mode 100644 tests/dictionaries/24_7validators_variable_optional/tiramisu/multi.py delete mode 100644 tests/dictionaries/24_family_disabled_var_hidden/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_0leadership/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_0leadership_diff_name/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_0leadership_follower_default_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_0leadership_follower_default_submulti/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_0leadership_follower_default_submulti_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_0leadership_follower_default_value/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_0leadership_leader_not_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_1leadership_append_follower/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_2leadership_calculation_index/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_2leadership_calculation_param_index/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_2leadership_leader_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_6leadership_follower_multi/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_8calculation_boolean/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_8calculation_boolean_return_none/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_8calculation_integer/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_8calculation_multi_variable/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_8calculation_multi_variable_parent/tiramisu/multi.py delete mode 100644 tests/dictionaries/40_8calculation_multi_variable_parent2/tiramisu/multi.py delete mode 100644 tests/dictionaries/41_0choice_leader/tiramisu/multi.py delete mode 100644 tests/dictionaries/44_0leadership_hidden/tiramisu/multi.py delete mode 100644 tests/dictionaries/44_0leadership_leader_hidden/tiramisu/multi.py delete mode 100644 tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/multi.py delete mode 100644 tests/dictionaries/44_4disabled_calcultion_follower/tiramisu/multi.py delete mode 100644 tests/dictionaries/44_4leadership_mandatory/tiramisu/multi.py delete mode 100644 tests/dictionaries/44_4leadership_mandatory_follower/tiramisu/multi.py delete mode 100644 tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/multi.py delete mode 100644 tests/dictionaries/44_9calculated_default_leadership_leader/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_1_0/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_1_0_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_1_0_type/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_1_0_type_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_1_1/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_1_1_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_jinja_number/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_jinja_number_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_no_description/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_no_description_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_static/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_test/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_dynamic_variable_suffix_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_hidden/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_0family_mode/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_1family_dynamic_jinja/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_2family_dynamic_outside_calc_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_calc2/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_calc2_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_calc_suffix/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_calc_suffix2_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_calc_suffix_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_calc_suffix_param_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_calc_variable_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_unknown_suffix/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_unknown_suffix_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside2/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside2_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside_jinja/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside_jinja_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_5family_dynamic_variable_outside_suffix_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_6family_dynamic_inside/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_6family_dynamic_inside_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_6family_dynamic_leadership/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_6family_dynamic_leadership_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_6family_dynamic_sub_dynamic/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_6family_dynamic_sub_dynamic_1_0/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_6family_dynamic_sub_dynamic_empty/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_6family_dynamic_sub_dynamic_empty2/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_9extra_dynamic/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_9extra_dynamic_extra/tiramisu/multi.py delete mode 100644 tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/multi.py delete mode 100644 tests/dictionaries/68_0family_leadership_mode/tiramisu/multi.py delete mode 100644 tests/test_upgrade.py diff --git a/src/rougail/__init__.py b/src/rougail/__init__.py index 6b9b6c550..4d16f9d84 100644 --- a/src/rougail/__init__.py +++ b/src/rougail/__init__.py @@ -30,7 +30,6 @@ from warnings import warn from .convert import RougailConvert from .config import RougailConfig -from .update import RougailUpgrade from .utils import normalize_family from .object_model import CONVERT_OPTION from .user_datas import UserDatas @@ -69,18 +68,10 @@ class Rougail(UserDatas): self.converted = RougailConvert(self.rougailconfig) self.config = None - def add_path_prefix( - self, - path_prefix: str, - ) -> None: - """Add a prefix""" - self.converted.load_config() - self.converted.parse_directories(path_prefix) - def run(self): """Get Tiramisu Config""" if not self.config: - tiram_obj = self.converted.save(self.rougailconfig["tiramisu_cache"]) + tiram_obj = self.converted.save() optiondescription = {} custom_types = { custom.__name__: custom @@ -103,4 +94,4 @@ class Rougail(UserDatas): return self.run() -__all__ = ("Rougail", "RougailConfig", "RougailUpgrade") +__all__ = ("Rougail", "RougailConfig") diff --git a/src/rougail/annotator/variable.py b/src/rougail/annotator/variable.py index 0568b17d1..1349aeb7a 100644 --- a/src/rougail/annotator/variable.py +++ b/src/rougail/annotator/variable.py @@ -62,12 +62,6 @@ class Annotator(Walk): # pylint: disable=R0903 if not objectspace.paths: return self.objectspace = objectspace - if self.objectspace.main_namespace: - self.forbidden_name = [self.objectspace.main_namespace] - for extra in self.objectspace.extra_dictionaries: - self.forbidden_name.append(extra) - else: - self.forbidden_name = [] # default type inference from a default value with :term:`basic types` self.basic_types = { str: "string", @@ -139,7 +133,6 @@ class Annotator(Walk): # pylint: disable=R0903 calculated_variable_path = variable.default.variable calculated_variable, identifier = self.objectspace.paths.get_with_dynamic( calculated_variable_path, - variable.default.path_prefix, variable.path, variable.version, variable.namespace, diff --git a/src/rougail/convert.py b/src/rougail/convert.py index 629341b1f..2093d54e8 100644 --- a/src/rougail/convert.py +++ b/src/rougail/convert.py @@ -27,9 +27,7 @@ along with this program. If not, see . """ import logging -from itertools import chain from pathlib import Path -from re import compile, findall from typing import ( Any, Dict, @@ -42,8 +40,6 @@ from typing import ( get_type_hints, ) -from pydantic import ValidationError -from ruamel.yaml import YAML from ruamel.yaml.comments import CommentedMap from pydantic import ValidationError @@ -68,7 +64,8 @@ from .object_model import ( VariableCalculation, ) from .tiramisureflector import TiramisuReflector -from .utils import get_realpath, normalize_family, load_modules +from .utils import load_modules +from .path import Paths from .error import DictConsistencyError property_types = Union[Literal[True], Calculation] @@ -100,218 +97,6 @@ class Property: return path in self._properties -class Paths: - regexp_relative = compile(r"^_*\.(.*)$") - - def __init__( - self, - default_namespace: str, - ) -> None: - self._data: Dict[str, Union[Variable, Family]] = {} - self._dynamics: Dict[str:str] = {} - if default_namespace is not None: - default_namespace = normalize_family(default_namespace) - self.default_namespace = default_namespace - self.path_prefix = None - - def has_value(self) -> bool: - return self._data != {} - - def add( - self, - path: str, - data: Any, - is_dynamic: bool, - dynamic: str, - *, - force: bool = False, - ) -> None: - self._data[path] = data - if not force and is_dynamic: - self._dynamics[path] = dynamic - - def get_full_path( - self, - path: str, - current_path: str, - ): - relative, subpath = path.split(".", 1) - relative_len = len(relative) - path_len = current_path.count(".") - if path_len + 1 == relative_len: - return subpath - parent_path = current_path.rsplit(".", relative_len)[0] - return parent_path + "." + subpath - - def get_with_dynamic( - self, - path: str, - identifier_path: str, - current_path: str, - version: str, - namespace: str, - xmlfiles: List[str], - ) -> Any: - identifier = None - if version != "1.0" and self.regexp_relative.search(path): - path = self.get_full_path( - path, - current_path, - ) - else: - path = get_realpath(path, identifier_path) - dynamic = None - # version 1.0 - if version == "1.0": - if not path in self._data and "{{ suffix }}" not in path: - new_path = None - current_path = None - identifiers = [] - for name in path.split("."): - parent_path = current_path - if current_path: - current_path += "." + name - else: - current_path = name - if current_path in self._data: - if new_path: - new_path += "." + name - else: - new_path = name - continue - for dynamic_path in self._dynamics: - if "." in dynamic_path: - parent_dynamic, name_dynamic = dynamic_path.rsplit(".", 1) - else: - parent_dynamic = None - name_dynamic = dynamic_path - if ( - parent_dynamic == parent_path - and name_dynamic.endswith("{{ identifier }}") - and name == name_dynamic.replace("{{ identifier }}", "") - ): - new_path += "." + name_dynamic - break - regexp = "^" + name_dynamic.replace("{{ identifier }}", "(.*)") - finded = findall(regexp, name) - if len(finded) != 1 or not finded[0]: - continue - if finded[0] == "{{ identifier }}": - identifiers.append(None) - else: - identifiers.append(finded[0]) - if new_path is None: - new_path = name_dynamic - else: - new_path += "." + name_dynamic - parent_path = dynamic_path - break - else: - if new_path: - new_path += "." + name - else: - new_path = name - path = new_path - else: - identifiers = None - if "{{ suffix }}" in path: - path = path.replace("{{ suffix }}", "{{ identifier }}") - elif not path in self._data: - current_path = None - parent_path = None - new_path = current_path - identifiers = [] - for name in path.split("."): - if current_path: - current_path += "." + name - else: - current_path = name - # parent_path, name_path = path.rsplit('.', 1) - if current_path in self._data: - if new_path: - new_path += "." + name - else: - new_path = name - parent_path = current_path - continue - for dynamic_path in self._dynamics: - if "." in dynamic_path: - parent_dynamic, name_dynamic = dynamic_path.rsplit(".", 1) - else: - parent_dynamic = None - name_dynamic = dynamic_path - if ( - "{{ identifier }}" not in name_dynamic - or parent_path != parent_dynamic - ): - continue - regexp = "^" + name_dynamic.replace("{{ identifier }}", "(.*)") - finded = findall(regexp, name) - if len(finded) != 1 or not finded[0]: - continue - if finded[0] == "{{ identifier }}": - identifiers.append(None) - else: - identifiers.append(finded[0]) - if new_path is None: - new_path = name_dynamic - else: - new_path += "." + name_dynamic - parent_path = dynamic_path - break - else: - if new_path: - new_path += "." + name - else: - new_path = name - if "{{ identifier }}" in name: - identifiers.append(None) - parent_path = current_path - path = new_path - else: - identifiers = None - if path not in self._data: - return None, None - option = self._data[path] - option_namespace = option.namespace - if ( - self.default_namespace not in [namespace, option_namespace] - and namespace != option_namespace - ): - msg = _( - 'A variable or a family located in the "{0}" namespace shall not be used in the "{1}" namespace' - ).format(option_namespace, namespace) - raise DictConsistencyError(msg, 38, xmlfiles) - return option, identifiers - - def __getitem__( - self, - path: str, - ) -> Union[Family, Variable]: - if not path in self._data: - raise AttributeError(f"cannot find variable or family {path}") - return self._data[path] - - def __contains__( - self, - path: str, - ) -> bool: - return path in self._data - - def __delitem__( - self, - path: str, - ) -> None: - logging.info("remove empty family %s", path) - del self._data[path] - - def is_dynamic(self, path: str) -> bool: - return path in self._dynamics - - def get(self): - return self._data.values() - - information_types = Dict[str, Union[str, int, float, bool]] @@ -342,7 +127,7 @@ class ParserVariable: def __init__(self, rougailconfig): self.rougailconfig = rougailconfig self.load_config() - self.paths = Paths(self.main_namespace) + self.paths = Paths(None) self.families = [] self.variables = [] self.parents = {".": []} @@ -350,6 +135,7 @@ class ParserVariable: self.reflector_names = {} self.leaders = [] self.followers = [] + self.dynamics = [] self.multis = {} self.default_multi = {} self.jinja = {} @@ -362,20 +148,11 @@ class ParserVariable: self.properties = Property() # self.choices = Appendable() self.has_dyn_option = False - self.path_prefix = None self.is_init = False super().__init__() def load_config(self) -> None: rougailconfig = self.rougailconfig - self.sort_dictionaries_all = rougailconfig["sort_dictionaries_all"] - try: - self.main_dictionaries = rougailconfig["main_dictionaries"] - except: - self.main_dictionaries = [] - self.main_namespace = rougailconfig["main_namespace"] - if self.main_namespace: - self.extra_dictionaries = rougailconfig["extra_dictionaries"] self.suffix = rougailconfig["suffix"] self.default_dictionary_format_version = rougailconfig[ "default_dictionary_format_version" @@ -394,34 +171,39 @@ class ParserVariable: self.add_extra_options = rougailconfig[ "structural_commandline.add_extra_options" ] + self.structurals = rougailconfig["step.structural"] self.user_datas = rougailconfig["step.user_data"] self.output = rougailconfig["step.output"] - self.plugins = rougailconfig["plugins"] + self.tiramisu_cache = rougailconfig["tiramisu_cache"] + self.load_unexist_redefine = rougailconfig["load_unexist_redefine"] - def _init(self): + def init(self): if self.is_init: return variable = Variable family = Family - if self.plugins: - root = Path(__file__).parent - for plugin in self.plugins: - module_path = root / plugin / "object_model.py" - if not module_path.is_file(): - continue - module = load_modules( - f"rougail.{plugin}.object_model", str(module_path) + root = Path(__file__).parent + self.walker = None + for structural_name in self.structurals: + structural = f"structural_{structural_name}" + module_path = root / structural / "__init__.py" + if not module_path.is_file(): + continue + module = load_modules(f"rougail.{structural}", str(module_path)) + if "Variable" in module.__all__: + variable = type( + variable.__name__ + "_" + structural, + (variable, module.Variable), + {}, ) - if "Variable" in module.__all__: - variable = type( - variable.__name__ + "_" + plugin, - (variable, module.Variable), - {}, - ) - if "Family" in module.__all__: - family = type( - family.__name__ + "_" + plugin, (family, module.Family), {} - ) + if "Family" in module.__all__: + family = type( + family.__name__ + "_" + structural, (family, module.Family), {} + ) + if "Walker" in module.__all__: + if self.walker: + raise Exception("multiple walker defined!") + self.walker = module.Walker self.variable = variable self.family = family self.dynamic = type(Dynamic.__name__, (Dynamic, family), {}) @@ -591,7 +373,7 @@ class ParserVariable: return family_obj = {} subfamily_obj = {} - if version != '1.0': + if version != "1.0": exists = obj.pop("exists", None) else: exists = None @@ -608,7 +390,9 @@ class ParserVariable: if family_obj: if exists in [None, True] and not obj.pop("redefine", False): raise DictConsistencyError( - _('The family "{0}" already exists and it is not redefined').format(path), + _( + 'The family "{0}" already exists and it is not redefined' + ).format(path), 32, [filename], ) @@ -622,7 +406,7 @@ class ParserVariable: version, typ="family", ) - if exists in [None, True]: + if self.load_unexist_redefine or exists in [None, True]: self.paths.add( path, self.paths[path].model_copy(update=obj), @@ -636,10 +420,13 @@ class ParserVariable: family_is_dynamic = True parent_dynamic = path else: - if exists is None and "redefine" in obj and obj["redefine"]: + redefine = family_obj.pop("redefine", None) + if not self.load_unexist_redefine and exists is None and redefine: raise Exception( f'cannot redefine the inexisting family "{path}" in {filename}' ) + if exists is True: + return extra_attrs = set(family_obj) - self.family_attrs if extra_attrs: raise Exception(f"extra attrs ... {extra_attrs}") @@ -858,8 +645,9 @@ class ParserVariable: version, ) self.parse_params(path, obj) + exists = obj.pop("exists", None) if path in self.paths: - if "exists" in obj and not obj.pop("exists"): + if not self.load_unexist_redefine and exists is False: return if not obj.pop("redefine", False): msg = f'Variable "{path}" already exists' @@ -873,12 +661,13 @@ class ParserVariable: ) self.paths[path].xmlfiles.append(filename) else: - if "exists" in obj and obj.pop("exists"): + if not self.load_unexist_redefine and exists is True: # this variable must exist # but it's not the case # so do nothing return - if "redefine" in obj and obj["redefine"]: + redefine = obj.pop("redefine", False) + if not self.load_unexist_redefine and redefine: msg = f'cannot redefine the inexisting variable "{path}"' raise DictConsistencyError(msg, 46, [filename]) obj["path"] = path @@ -1001,7 +790,6 @@ class ParserVariable: variable["namespace"] = self.namespace variable["version"] = version - variable["path_prefix"] = self.path_prefix variable["xmlfiles"] = filename variable_type = self.get_family_or_variable_type(variable) obj = { @@ -1078,6 +866,9 @@ class ParserVariable: return value["type"] in CALCULATION_TYPES # auto set type typ = set(CALCULATION_TYPES) & set(value) + # XXX variable is also set to information + if typ == {"variable", "information"}: + typ = {"information"} if len(typ) == 1: value["type"] = list(typ)[0] return True @@ -1102,7 +893,6 @@ class ParserVariable: typ = calculation_object.pop("type") calculation_object["attribute_name"] = attribute - calculation_object["path_prefix"] = self.path_prefix calculation_object["path"] = path calculation_object["inside_list"] = inside_list calculation_object["version"] = version @@ -1117,6 +907,9 @@ class ParserVariable: if isinstance(val, dict) and "type" not in val: # auto set type param_typ = set(CALCULATION_TYPES) & set(val) + # XXX variable is also set to information + if param_typ == {"variable", "information"}: + param_typ = {"information"} if len(param_typ) == 1: val["type"] = list(param_typ)[0] if not isinstance(val, dict) or "type" not in val: @@ -1172,7 +965,7 @@ class RougailConvert(ParserVariable): def __init__(self, rougailconfig) -> None: self.annotator = False - self.yaml = YAML() + self.has_namespace = False super().__init__(rougailconfig) def search_calculation( @@ -1202,81 +995,20 @@ class RougailConvert(ParserVariable): inside_list.append(key) return inside_list, outside_list - def parse_directories( - self, - path_prefix: Optional[str] = None, + def create_namespace( + self, namespace_description: str, namespace_path: Optional[str] = None ) -> None: - """Parse directories content""" - self._init() - if path_prefix: - n_path_prefix = normalize_family(path_prefix) - if n_path_prefix in self.parents: - raise Exception("pfffff") - root_parent = n_path_prefix - self.path_prefix = n_path_prefix - self.namespace = None - self.add_family( - n_path_prefix, - n_path_prefix, - {"description": path_prefix}, - "", - False, - None, - "", - ) - else: - root_parent = "." - if self.main_namespace: - directory_dict = chain( - ( - ( - self.main_namespace, - self.main_dictionaries, - ), - ), - self.extra_dictionaries.items(), - ) - for namespace, extra_dirs in directory_dict: - if namespace is None: - self.namespace = namespace - else: - self.namespace = normalize_family(namespace) - if root_parent == ".": - namespace_path = self.namespace - else: - namespace_path = f"{root_parent}.{self.namespace}" - if namespace_path in self.parents: - raise Exception("pfff") - for idx, filename in enumerate(self.get_sorted_filename(extra_dirs)): - if not idx: - self.parse_family( - "", - self.namespace, - namespace_path, - { - "description": namespace, - }, - "", - ) - self.parse_variable_file( - filename, - namespace_path, - ) - else: - self.namespace = None - if root_parent == ".": - namespace_path = "" - else: - namespace_path = f"{root_parent}" - if namespace_path in self.parents: - raise Exception("pfff") - for filename in self.get_sorted_filename(self.main_dictionaries): - self.parse_variable_file( - filename, - namespace_path, - ) - if path_prefix: - self.path_prefix = None + if namespace_path is None: + namespace_path = self.namespace + self.parse_family( + "", + self.namespace, + namespace_path, + { + "description": namespace_description, + }, + "", + ) def get_comment( self, @@ -1291,27 +1023,6 @@ class RougailConvert(ParserVariable): comment = comment.value[1:].strip() return comment - def parse_variable_file( - self, - filename: str, - path: str, - ) -> None: - """Parse file""" - with open(filename, encoding="utf8") as file_fh: - objects = self.yaml.load(file_fh) - version = self.validate_file_version( - objects, - filename, - ) - if objects is None: - return - self.parse_root_file( - filename, - path, - version, - objects, - ) - def parse_root_file( self, filename: str, @@ -1330,38 +1041,6 @@ class RougailConvert(ParserVariable): comment, ) - def get_sorted_filename( - self, - directories: Union[str, List[str]], - ) -> Iterator[str]: - """Sort filename""" - if not isinstance(directories, list): - directories = [directories] - if self.sort_dictionaries_all: - filenames = {} - for directory_name in directories: - directory = Path(directory_name) - if not directory.is_dir(): - continue - if not self.sort_dictionaries_all: - filenames = {} - for file_path in directory.iterdir(): - if file_path.suffix not in [".yml", ".yaml"]: - continue - if file_path.name in filenames: - raise DictConsistencyError( - _("duplicate dictionary file name {0}").format(file_path.name), - 78, - [filenames[file_path.name][1]], - ) - filenames[file_path.name] = str(file_path) - if not self.sort_dictionaries_all: - for filename in sorted(filenames): - yield filenames[filename] - if self.sort_dictionaries_all: - for filename in sorted(filenames): - yield filenames[filename] - def validate_file_version( self, obj: dict, @@ -1394,6 +1073,7 @@ class RougailConvert(ParserVariable): ): """Apply annotation""" if not self.paths.has_value(): + self.init() self.parse_directories() if self.annotator: raise DictConsistencyError( @@ -1402,6 +1082,13 @@ class RougailConvert(ParserVariable): SpaceAnnotator(self) self.annotator = True + def parse_directories(self) -> None: + if not self.walker: + msg = _("cannot find walker in structural {0}!").format(self.structurals) + raise DictConsistencyError(msg, 51, None) + self.init() + self.walker(self) + def reflect(self) -> None: """Apply TiramisuReflector""" functions_files = [ @@ -1414,13 +1101,13 @@ class RougailConvert(ParserVariable): def save( self, - filename: str, ): """Return tiramisu object declaration as a string""" - self._init() + self.init() self.annotate() self.reflect() output = self.reflector.get_text() + "\n" + filename = self.tiramisu_cache if filename: with open(filename, "w", encoding="utf-8") as tiramisu: tiramisu.write(output) diff --git a/src/rougail/utils.py b/src/rougail/utils.py index ba242c3cc..a77f44875 100644 --- a/src/rougail/utils.py +++ b/src/rougail/utils.py @@ -78,13 +78,10 @@ def load_modules(name, module) -> List[str]: return eosfunc -def get_realpath( - path: str, - path_prefix: str, -) -> str: - if path_prefix: - return f"{path_prefix}.{path}" - return path +# def get_realpath( +# path: str, +# ) -> str: +# return path def get_jinja_variable_to_param( @@ -93,7 +90,6 @@ def get_jinja_variable_to_param( objectspace, xmlfiles, functions, - path_prefix, version, namespace, ): @@ -125,7 +121,6 @@ def get_jinja_variable_to_param( for variable_path in variables: variable, identifier = objectspace.paths.get_with_dynamic( variable_path, - path_prefix, current_path, version, namespace, @@ -152,7 +147,6 @@ def get_jinja_variable_to_param( vpath = vpath.rsplit(".", 1)[0] variable, identifier = objectspace.paths.get_with_dynamic( vpath, - path_prefix, current_path, version, namespace, diff --git a/tests/dictionaries/00_0version_underscore/tiramisu/multi.py b/tests/dictionaries/00_0version_underscore/tiramisu/multi.py deleted file mode 100644 index b0deb2f96..000000000 --- a/tests/dictionaries/00_0version_underscore/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_1empty_variable/tiramisu/multi.py deleted file mode 100644 index 8081474ee..000000000 --- a/tests/dictionaries/00_1empty_variable/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_2default_calculated/tiramisu/multi.py deleted file mode 100644 index 2278ea7c5..000000000 --- a/tests/dictionaries/00_2default_calculated/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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'] = "{{ _.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(['../rougail-tests/structures/00_2default_calculated/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), '_.var1': ParamOption(option_3, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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(['../rougail-tests/structures/00_2default_calculated/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), '_.var1': ParamOption(option_7, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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/multi.py b/tests/dictionaries/00_2default_calculated_multi/tiramisu/multi.py deleted file mode 100644 index b0eb07f56..000000000 --- a/tests/dictionaries/00_2default_calculated_multi/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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 val in _.var1 %}\n{{ val }}\n{% endfor %}\n" -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(['../rougail-tests/structures/00_2default_calculated_multi/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), '_.var1': ParamOption(option_3, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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(['../rougail-tests/structures/00_2default_calculated_multi/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), '_.var1': ParamOption(option_7, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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/multi.py b/tests/dictionaries/00_2default_calculated_variable_transitive/tiramisu/multi.py deleted file mode 100644 index b5426eab2..000000000 --- a/tests/dictionaries/00_2default_calculated_variable_transitive/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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)), kwargs={'__internal_multi': ParamValue(True)})), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'domainname'}) -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)), kwargs={'__internal_multi': ParamValue(True)})), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'domainname'}) -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/multi.py b/tests/dictionaries/00_4load_subfolder/tiramisu/multi.py deleted file mode 100644 index 4ea35d407..000000000 --- a/tests/dictionaries/00_4load_subfolder/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_5load_notype/tiramisu/multi.py deleted file mode 100644 index ddb56e8c4..000000000 --- a/tests/dictionaries/00_5load_notype/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_6boolean/tiramisu/multi.py deleted file mode 100644 index e3f64f1ca..000000000 --- a/tests/dictionaries/00_6boolean/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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="the first variable", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_4 = BoolOption(name="var2", doc="the second variable", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_5 = BoolOption(name="var3", doc="the third variable", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -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", 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'}) -option_13 = BoolOption(name="var3", doc="the third variable", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -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", 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/multi.py b/tests/dictionaries/00_6boolean_no_mandatory/tiramisu/multi.py deleted file mode 100644 index 19ce4eb4b..000000000 --- a/tests/dictionaries/00_6boolean_no_mandatory/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_6choice/tiramisu/multi.py deleted file mode 100644 index 0120be4dc..000000000 --- a/tests/dictionaries/00_6choice/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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="var1", doc="the first variable", values=("a", "b", "c"), properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) -option_4 = ChoiceOption(name="var2", doc="the second variable", values=("a", "b", "c"), properties=frozenset({"basic", "mandatory"}), informations={'type': 'choice'}) -option_5 = ChoiceOption(name="var3", doc="the third variable", values=("a", "b", "c", None), properties=frozenset({"standard"}), informations={'type': 'choice'}) -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", 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'}) -option_13 = ChoiceOption(name="var3", doc="the third variable", values=("a", "b", "c", None), properties=frozenset({"standard"}), informations={'type': 'choice'}) -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", 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/multi.py b/tests/dictionaries/00_6choice_calculation/tiramisu/multi.py deleted file mode 100644 index 2a7288664..000000000 --- a/tests/dictionaries/00_6choice_calculation/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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(['../rougail-tests/structures/00_6choice_calculation/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", 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(['../rougail-tests/structures/00_6choice_calculation/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", 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/multi.py b/tests/dictionaries/00_6choice_variable/tiramisu/multi.py deleted file mode 100644 index 04b8e2493..000000000 --- a/tests/dictionaries/00_6choice_variable/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_6custom/tiramisu/multi.py deleted file mode 100644 index 1eb35731b..000000000 --- a/tests/dictionaries/00_6custom/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_6domainname/tiramisu/multi.py deleted file mode 100644 index 371a7c225..000000000 --- a/tests/dictionaries/00_6domainname/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_6domainname_params/tiramisu/multi.py deleted file mode 100644 index 60ae192cb..000000000 --- a/tests/dictionaries/00_6domainname_params/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_6float/tiramisu/multi.py deleted file mode 100644 index 903aeaaf4..000000000 --- a/tests/dictionaries/00_6float/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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 = FloatOption(name="var1", doc="the first variable", default=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -option_4 = FloatOption(name="var2", doc="the second variable", default=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -option_5 = FloatOption(name="var3", doc="the third variable", default=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -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", 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'}) -option_13 = FloatOption(name="var3", doc="the third variable", default=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -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", 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/multi.py b/tests/dictionaries/00_6number/tiramisu/multi.py deleted file mode 100644 index 4875cf792..000000000 --- a/tests/dictionaries/00_6number/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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="var1", doc="the first variable", default=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -option_4 = IntOption(name="var2", doc="the second variable", default=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -option_5 = IntOption(name="var3", doc="the third variable", default=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -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", 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'}) -option_13 = IntOption(name="var3", doc="the third variable", default=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -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", 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/multi.py b/tests/dictionaries/00_6port/tiramisu/multi.py deleted file mode 100644 index e6c225420..000000000 --- a/tests/dictionaries/00_6port/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_6regexp/tiramisu/multi.py deleted file mode 100644 index 7926b7819..000000000 --- a/tests/dictionaries/00_6regexp/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/test.py') -try: - groups.namespace -except: - groups.addgroup('namespace') -ALLOWED_LEADER_PROPERTIES.add("basic") -ALLOWED_LEADER_PROPERTIES.add("standard") -ALLOWED_LEADER_PROPERTIES.add("advanced") -class Regexp_option_3(RegexpOption): - __slots__ = tuple() - _type = 'value' -Regexp_option_3._regexp = re_compile(r"^#(?:[0-9a-f]{3}){1,2}$") - -class Regexp_option_6(RegexpOption): - __slots__ = tuple() - _type = 'value' -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", 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", 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/multi.py b/tests/dictionaries/00_6string/tiramisu/multi.py deleted file mode 100644 index 881e59c43..000000000 --- a/tests/dictionaries/00_6string/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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'}) -option_5 = StrOption(name="var3", doc="the third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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", 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'}) -option_13 = StrOption(name="var3", doc="the third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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", 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/multi.py b/tests/dictionaries/00_7choice_quote/tiramisu/multi.py deleted file mode 100644 index 1f1f05c1b..000000000 --- a/tests/dictionaries/00_7choice_quote/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_7help_quote/tiramisu/multi.py deleted file mode 100644 index 08ffc8fc4..000000000 --- a/tests/dictionaries/00_7help_quote/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_7value_doublequote/tiramisu/multi.py deleted file mode 100644 index 7880b1ee6..000000000 --- a/tests/dictionaries/00_7value_doublequote/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_7value_doublequote2/tiramisu/multi.py deleted file mode 100644 index 5e8ee7a19..000000000 --- a/tests/dictionaries/00_7value_doublequote2/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_7value_doublequote3/tiramisu/multi.py deleted file mode 100644 index 5096db778..000000000 --- a/tests/dictionaries/00_7value_doublequote3/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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_quote/tiramisu/multi.py b/tests/dictionaries/00_7value_quote/tiramisu/multi.py deleted file mode 100644 index a70dc933b..000000000 --- a/tests/dictionaries/00_7value_quote/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_8calculation_information/tiramisu/multi.py deleted file mode 100644 index 80eac632b..000000000 --- a/tests/dictionaries/00_8calculation_information/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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(['../rougail-tests/structures/00_8calculation_information/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", 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(['../rougail-tests/structures/00_8calculation_information/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", 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/tiramisu/multi.py b/tests/dictionaries/00_8test/tiramisu/multi.py deleted file mode 100644 index 29a5b668b..000000000 --- a/tests/dictionaries/00_8test/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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({"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,)}) -option_8 = StrOption(name="var6", doc="the sixth variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': ('test1', 'test2')}) -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', 'test': ('test',)}) -option_12 = StrOption(name="var2", doc="the second variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('test',)}) -option_13 = StrOption(name="var3", doc="the third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': ('test1', 'test2')}) -option_14 = StrOption(name="var4", doc="the forth variable", properties=frozenset({"standard"}), informations={'type': 'string', 'test': (None, 'test1', 'test2')}) -option_15 = BoolOption(name="var5", doc="the fifth variable", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean', 'test': (False,)}) -option_16 = StrOption(name="var6", doc="the sixth variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': ('test1', 'test2')}) -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_9choice_variable_multi/tiramisu/multi.py b/tests/dictionaries/00_9choice_variable_multi/tiramisu/multi.py deleted file mode 100644 index f65fbee8b..000000000 --- a/tests/dictionaries/00_9choice_variable_multi/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_9choice_variables/tiramisu/multi.py deleted file mode 100644 index add1fe510..000000000 --- a/tests/dictionaries/00_9choice_variables/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_9default_calculation/tiramisu/multi.py deleted file mode 100644 index fcba20880..000000000 --- a/tests/dictionaries/00_9default_calculation/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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(['../rougail-tests/structures/00_9default_calculation/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", 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(['../rougail-tests/structures/00_9default_calculation/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", 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/multi.py b/tests/dictionaries/00_9default_calculation_information/tiramisu/multi.py deleted file mode 100644 index b3a357b9d..000000000 --- a/tests/dictionaries/00_9default_calculation_information/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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(['../rougail-tests/structures/00_9default_calculation_information/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", 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(['../rougail-tests/structures/00_9default_calculation_information/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", 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/multi.py b/tests/dictionaries/00_9default_calculation_information_other_variable/tiramisu/multi.py deleted file mode 100644 index d85d3cd1b..000000000 --- a/tests/dictionaries/00_9default_calculation_information_other_variable/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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'] = "{{ 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(['../rougail-tests/structures/00_9default_calculation_information_other_variable/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", 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(['../rougail-tests/structures/00_9default_calculation_information_other_variable/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", 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/multi.py b/tests/dictionaries/00_9default_calculation_multi_optional/tiramisu/multi.py deleted file mode 100644 index 1cb72a8b5..000000000 --- a/tests/dictionaries/00_9default_calculation_multi_optional/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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)), kwargs={'__internal_multi': ParamValue(True)}))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_3)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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)), kwargs={'__internal_multi': ParamValue(True)}))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_7)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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/multi.py b/tests/dictionaries/00_9default_calculation_multi_optional2/tiramisu/multi.py deleted file mode 100644 index aef127e94..000000000 --- a/tests/dictionaries/00_9default_calculation_multi_optional2/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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)), kwargs={'__internal_multi': ParamValue(True)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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)), kwargs={'__internal_multi': ParamValue(True)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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/multi.py b/tests/dictionaries/00_9default_calculation_optional/tiramisu/multi.py deleted file mode 100644 index ba18f0c6d..000000000 --- a/tests/dictionaries/00_9default_calculation_optional/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/00_9default_calculation_optional_exists/tiramisu/multi.py deleted file mode 100644 index bc8138766..000000000 --- a/tests/dictionaries/00_9default_calculation_optional_exists/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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/multi.py b/tests/dictionaries/00_9default_calculation_param_optional/tiramisu/multi.py deleted file mode 100644 index 4f7d494f5..000000000 --- a/tests/dictionaries/00_9default_calculation_param_optional/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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.var1'] = "{% if var2 is defined %} {{ var2 }} {% elif var3 is defined %} {{ var3 }} {% elif var4 is defined %} {{ var4 }} {% else %} {{ _.var2 }} {% endif %} " -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(['../rougail-tests/structures/00_9default_calculation_param_optional/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var1"), 'var2': ParamOption(option_4), '_.var2': ParamOption(option_4, notraisepropertyerror=True)})), properties=frozenset({"standard"}), informations={'type': 'string'}) -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(['../rougail-tests/structures/00_9default_calculation_param_optional/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var1"), 'var2': ParamOption(option_8), '_.var2': ParamOption(option_8, notraisepropertyerror=True)})), properties=frozenset({"standard"}), informations={'type': 'string'}) -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/multi.py b/tests/dictionaries/00_9default_information_other_variable/tiramisu/multi.py deleted file mode 100644 index 45c3b9e99..000000000 --- a/tests/dictionaries/00_9default_information_other_variable/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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_information_other_variable2/makedict/after.json b/tests/dictionaries/00_9default_information_other_variable2/makedict/after.json new file mode 100644 index 000000000..7ea9435a0 --- /dev/null +++ b/tests/dictionaries/00_9default_information_other_variable2/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.var1": { + "owner": "default", + "value": null + }, + "rougail.var2": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/00_9default_information_other_variable2/makedict/base.json b/tests/dictionaries/00_9default_information_other_variable2/makedict/base.json new file mode 100644 index 000000000..559aec2a4 --- /dev/null +++ b/tests/dictionaries/00_9default_information_other_variable2/makedict/base.json @@ -0,0 +1,4 @@ +{ + "rougail.var1": null, + "rougail.var2": null +} diff --git a/tests/dictionaries/00_9default_information_other_variable2/makedict/before.json b/tests/dictionaries/00_9default_information_other_variable2/makedict/before.json new file mode 100644 index 000000000..7ea9435a0 --- /dev/null +++ b/tests/dictionaries/00_9default_information_other_variable2/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.var1": { + "owner": "default", + "value": null + }, + "rougail.var2": { + "owner": "default", + "value": null + } +} diff --git a/tests/dictionaries/00_9default_information_other_variable2/makedict/mandatory.json b/tests/dictionaries/00_9default_information_other_variable2/makedict/mandatory.json new file mode 100644 index 000000000..8c67ac5f8 --- /dev/null +++ b/tests/dictionaries/00_9default_information_other_variable2/makedict/mandatory.json @@ -0,0 +1 @@ +["rougail.var1", "rougail.var2"] \ No newline at end of file diff --git a/tests/dictionaries/00_9default_information_other_variable2/tiramisu/base.py b/tests/dictionaries/00_9default_information_other_variable2/tiramisu/base.py new file mode 100644 index 000000000..2a4e95fdf --- /dev/null +++ b/tests/dictionaries/00_9default_information_other_variable2/tiramisu/base.py @@ -0,0 +1,16 @@ +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('../rougail-tests/funcs/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", 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/40_0leadership_empty/tiramisu/multi.py b/tests/dictionaries/00_9default_information_other_variable2/tiramisu/no_namespace.py similarity index 50% rename from tests/dictionaries/40_0leadership_empty/tiramisu/multi.py rename to tests/dictionaries/00_9default_information_other_variable2/tiramisu/no_namespace.py index 614668d43..362332a1f 100644 --- a/tests/dictionaries/40_0leadership_empty/tiramisu/multi.py +++ b/tests/dictionaries/00_9default_information_other_variable2/tiramisu/no_namespace.py @@ -3,13 +3,9 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('../rougail-tests/funcs/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="1", doc="1", children=[], properties=frozenset({"advanced"})) -optiondescription_4 = OptionDescription(name="2", doc="2", children=[], properties=frozenset({"advanced"})) -option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) +option_1 = StrOption(name="var1", doc="a first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) +option_2 = StrOption(name="var2", doc="a second variable", default=Calculation(func['calc_value'], Params((ParamInformation("test_information", None, option=option_1)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_2]) diff --git a/tests/dictionaries/00_9default_integer/tiramisu/multi.py b/tests/dictionaries/00_9default_integer/tiramisu/multi.py deleted file mode 100644 index e3b503a56..000000000 --- a/tests/dictionaries/00_9default_integer/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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(['../rougail-tests/structures/00_9default_integer/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", 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(['../rougail-tests/structures/00_9default_integer/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", 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/multi.py b/tests/dictionaries/00_9extra/tiramisu/multi.py deleted file mode 100644 index d77e4456c..000000000 --- a/tests/dictionaries/00_9extra/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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", 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(['../rougail-tests/structures/00_9extra/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", 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", 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(['../rougail-tests/structures/00_9extra/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", 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/multi.py b/tests/dictionaries/00_9extra_calculation/tiramisu/multi.py deleted file mode 100644 index a6d025137..000000000 --- a/tests/dictionaries/00_9extra_calculation/tiramisu/multi.py +++ /dev/null @@ -1,31 +0,0 @@ -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('../rougail-tests/funcs/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.variable2'] = "{{ rougail.variable }}\n" -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", 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(['../rougail-tests/structures/00_9extra_calculation/extra/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.extra.variable2"), 'rougail.variable': ParamOption(option_3, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/00_9extra_calculation/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", 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", 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(['../rougail-tests/structures/00_9extra_calculation/extra/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.extra.variable2"), 'rougail.variable': ParamOption(option_10, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/00_9extra_calculation/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", 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/00_9extra_ouside/makedict/after.json b/tests/dictionaries/00_9extra_ouside/makedict/after.json new file mode 100644 index 000000000..0c77477a8 --- /dev/null +++ b/tests/dictionaries/00_9extra_ouside/makedict/after.json @@ -0,0 +1,10 @@ +{ + "rougail.variable": { + "owner": "default", + "value": "value in extra" + }, + "extra.variable": { + "owner": "default", + "value": "value in extra" + } +} diff --git a/tests/dictionaries/00_9extra_ouside/makedict/base.json b/tests/dictionaries/00_9extra_ouside/makedict/base.json new file mode 100644 index 000000000..6b52588d1 --- /dev/null +++ b/tests/dictionaries/00_9extra_ouside/makedict/base.json @@ -0,0 +1,4 @@ +{ + "rougail.variable": "value in extra", + "extra.variable": "value in extra" +} diff --git a/tests/dictionaries/00_9extra_ouside/makedict/before.json b/tests/dictionaries/00_9extra_ouside/makedict/before.json new file mode 100644 index 000000000..0c77477a8 --- /dev/null +++ b/tests/dictionaries/00_9extra_ouside/makedict/before.json @@ -0,0 +1,10 @@ +{ + "rougail.variable": { + "owner": "default", + "value": "value in extra" + }, + "extra.variable": { + "owner": "default", + "value": "value in extra" + } +} diff --git a/tests/dictionaries/00_9extra_ouside/makedict/mandatory.json b/tests/dictionaries/00_9extra_ouside/makedict/mandatory.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/tests/dictionaries/00_9extra_ouside/makedict/mandatory.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/dictionaries/00_9extra_ouside/tiramisu/base.py b/tests/dictionaries/00_9extra_ouside/tiramisu/base.py new file mode 100644 index 000000000..0749d58fc --- /dev/null +++ b/tests/dictionaries/00_9extra_ouside/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('../rougail-tests/funcs/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", default="value in extra", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_2 = StrOption(name="variable", doc="a variable", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2], 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/01_6boolean_multi/tiramisu/multi.py b/tests/dictionaries/01_6boolean_multi/tiramisu/multi.py deleted file mode 100644 index ec63570a7..000000000 --- a/tests/dictionaries/01_6boolean_multi/tiramisu/multi.py +++ /dev/null @@ -1,33 +0,0 @@ -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('../rougail-tests/funcs/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="the first variable", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_4 = BoolOption(name="var2", doc="the second variable", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_5 = BoolOption(name="var3", doc="the third variable", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_6 = BoolOption(name="var4", doc="the forth variable", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_7 = BoolOption(name="var5", doc="the fifth variable", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -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", 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'}) -option_15 = BoolOption(name="var3", doc="the third variable", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_16 = BoolOption(name="var4", doc="the forth variable", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -option_17 = BoolOption(name="var5", doc="the fifth variable", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -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", 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/multi.py b/tests/dictionaries/01_6custom_multi/tiramisu/multi.py deleted file mode 100644 index 0ce6d94b3..000000000 --- a/tests/dictionaries/01_6custom_multi/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/01_6float_multi/tiramisu/multi.py deleted file mode 100644 index a9153d65a..000000000 --- a/tests/dictionaries/01_6float_multi/tiramisu/multi.py +++ /dev/null @@ -1,33 +0,0 @@ -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('../rougail-tests/funcs/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 = FloatOption(name="var1", doc="the first variable", multi=True, default=[0.0], default_multi=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -option_4 = FloatOption(name="var2", doc="the second variable", multi=True, default=[0.0], default_multi=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -option_5 = FloatOption(name="var3", doc="the third variable", multi=True, default=[0.0], default_multi=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -option_6 = FloatOption(name="var4", doc="the forth variable", multi=True, default=[10.1], default_multi=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -option_7 = FloatOption(name="var5", doc="the fifth variable", multi=True, default=[10.1], default_multi=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -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", 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'}) -option_15 = FloatOption(name="var3", doc="the third variable", multi=True, default=[0.0], default_multi=0.0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -option_16 = FloatOption(name="var4", doc="the forth variable", multi=True, default=[10.1], default_multi=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -option_17 = FloatOption(name="var5", doc="the fifth variable", multi=True, default=[10.1], default_multi=10.1, properties=frozenset({"mandatory", "standard"}), informations={'type': 'float'}) -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", 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/multi.py b/tests/dictionaries/01_6number_multi/tiramisu/multi.py deleted file mode 100644 index c183eaad0..000000000 --- a/tests/dictionaries/01_6number_multi/tiramisu/multi.py +++ /dev/null @@ -1,33 +0,0 @@ -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('../rougail-tests/funcs/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="var1", doc="the first variable", multi=True, default=[0], default_multi=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -option_4 = IntOption(name="var2", doc="the second variable", multi=True, default=[0], default_multi=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -option_5 = IntOption(name="var3", doc="the third variable", multi=True, default=[0], default_multi=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -option_6 = IntOption(name="var4", doc="the forth variable", multi=True, default=[10], default_multi=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -option_7 = IntOption(name="var5", doc="the fifth variable", multi=True, default=[10], default_multi=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -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", 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'}) -option_15 = IntOption(name="var3", doc="the third variable", multi=True, default=[0], default_multi=0, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -option_16 = IntOption(name="var4", doc="the forth variable", multi=True, default=[10], default_multi=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -option_17 = IntOption(name="var5", doc="the fifth variable", multi=True, default=[10], default_multi=10, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -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", 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/multi.py b/tests/dictionaries/01_6string_empty/tiramisu/multi.py deleted file mode 100644 index a4b722ac4..000000000 --- a/tests/dictionaries/01_6string_empty/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/makedict/after.json b/tests/dictionaries/01_6string_multi/makedict/after.json index ba31a3958..3e9982ddb 100644 --- a/tests/dictionaries/01_6string_multi/makedict/after.json +++ b/tests/dictionaries/01_6string_multi/makedict/after.json @@ -9,7 +9,7 @@ }, "rougail.var3": { "owner": "default", - "value": null + "value": [] }, "rougail.var4": { "owner": "default", diff --git a/tests/dictionaries/01_6string_multi/makedict/base.json b/tests/dictionaries/01_6string_multi/makedict/base.json index 39897a9ce..1e893e05f 100644 --- a/tests/dictionaries/01_6string_multi/makedict/base.json +++ b/tests/dictionaries/01_6string_multi/makedict/base.json @@ -1,7 +1,7 @@ { "rougail.var1": [], "rougail.var2": [], - "rougail.var3": null, + "rougail.var3": [], "rougail.var4": [ "value" ], diff --git a/tests/dictionaries/01_6string_multi/makedict/before.json b/tests/dictionaries/01_6string_multi/makedict/before.json index ba31a3958..3e9982ddb 100644 --- a/tests/dictionaries/01_6string_multi/makedict/before.json +++ b/tests/dictionaries/01_6string_multi/makedict/before.json @@ -9,7 +9,7 @@ }, "rougail.var3": { "owner": "default", - "value": null + "value": [] }, "rougail.var4": { "owner": "default", diff --git a/tests/dictionaries/01_6string_multi/tiramisu/base.py b/tests/dictionaries/01_6string_multi/tiramisu/base.py index 04d2639cf..71c8805be 100644 --- a/tests/dictionaries/01_6string_multi/tiramisu/base.py +++ b/tests/dictionaries/01_6string_multi/tiramisu/base.py @@ -12,7 +12,7 @@ ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="var1", doc="the first variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_3 = StrOption(name="var2", doc="the second variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -option_4 = StrOption(name="var3", doc="the third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) +option_4 = StrOption(name="var3", doc="the third variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_5 = StrOption(name="var4", doc="the forth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="var5", doc="the fifth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_7 = StrOption(name="var6", doc="the sixth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) diff --git a/tests/dictionaries/01_6string_multi/tiramisu/multi.py b/tests/dictionaries/01_6string_multi/tiramisu/multi.py deleted file mode 100644 index 1f376530e..000000000 --- a/tests/dictionaries/01_6string_multi/tiramisu/multi.py +++ /dev/null @@ -1,33 +0,0 @@ -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('../rougail-tests/funcs/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", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -option_4 = StrOption(name="var2", doc="the second variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -option_5 = StrOption(name="var3", doc="the third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -option_6 = StrOption(name="var4", doc="the forth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_7 = StrOption(name="var5", doc="the fifth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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", 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'}) -option_15 = StrOption(name="var3", doc="the third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -option_16 = StrOption(name="var4", doc="the forth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_17 = StrOption(name="var5", doc="the fifth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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", 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_6string_multi/tiramisu/no_namespace.py b/tests/dictionaries/01_6string_multi/tiramisu/no_namespace.py index fd4a4b3ad..5296c2505 100644 --- a/tests/dictionaries/01_6string_multi/tiramisu/no_namespace.py +++ b/tests/dictionaries/01_6string_multi/tiramisu/no_namespace.py @@ -8,7 +8,7 @@ ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_1 = StrOption(name="var1", doc="the first variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_2 = StrOption(name="var2", doc="the second variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -option_3 = StrOption(name="var3", doc="the third variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) +option_3 = StrOption(name="var3", doc="the third variable", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) option_4 = StrOption(name="var4", doc="the forth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_5 = StrOption(name="var5", doc="the fifth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) option_6 = StrOption(name="var6", doc="the sixth variable", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) diff --git a/tests/dictionaries/01_7value_multi_doublequote/tiramisu/multi.py b/tests/dictionaries/01_7value_multi_doublequote/tiramisu/multi.py deleted file mode 100644 index 6a4b4e704..000000000 --- a/tests/dictionaries/01_7value_multi_doublequote/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/01_7value_multi_doublequote2/tiramisu/multi.py deleted file mode 100644 index b8fdd5164..000000000 --- a/tests/dictionaries/01_7value_multi_doublequote2/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/01_7value_multi_quote/tiramisu/multi.py deleted file mode 100644 index 8579c8848..000000000 --- a/tests/dictionaries/01_7value_multi_quote/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/01_8calculation_information_multi/tiramisu/multi.py deleted file mode 100644 index c82c3600f..000000000 --- a/tests/dictionaries/01_8calculation_information_multi/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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'] = "{% for info in test_information %}\n{{ info }}\n{% endfor %}\n" -dict_env['default_2.rougail.variable'] = "{% for info in test_information %}\n{{ info }}\n{% endfor %}\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(['../rougail-tests/structures/01_8calculation_information_multi/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.variable"), 'test_information': ParamInformation("test_information_list", [])})), 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", 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(['../rougail-tests/structures/01_8calculation_information_multi/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.variable"), 'test_information': ParamInformation("test_information_list", [])})), 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/01_9choice_variable_multi/tiramisu/multi.py b/tests/dictionaries/01_9choice_variable_multi/tiramisu/multi.py deleted file mode 100644 index e5dd9da77..000000000 --- a/tests/dictionaries/01_9choice_variable_multi/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/04_0type_param/tiramisu/multi.py deleted file mode 100644 index e0e3d05a7..000000000 --- a/tests/dictionaries/04_0type_param/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", default=10, min_number=0, max_number=100, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -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 = IntOption(name="int", doc="A limited number", default=10, min_number=0, max_number=100, properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -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_1auto_save/tiramisu/multi.py b/tests/dictionaries/04_1auto_save/tiramisu/multi.py deleted file mode 100644 index 62ff3f6da..000000000 --- a/tests/dictionaries/04_1auto_save/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/04_1auto_save_and_calculated/tiramisu/multi.py deleted file mode 100644 index 4cf8af4fa..000000000 --- a/tests/dictionaries/04_1auto_save_and_calculated/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/04_1auto_save_and_calculated_hidden/tiramisu/multi.py deleted file mode 100644 index 2f2bd8c1d..000000000 --- a/tests/dictionaries/04_1auto_save_and_calculated_hidden/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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'] = "yes" -dict_env['hidden_1.rougail.var2'] = "{% if _.var1 == \"yes\" %}\n_.var1 is yes\n{% endif %}\n" -dict_env['frozen_1.rougail.var2'] = "{% if _.var1 == \"yes\" %}\n_.var1 is yes\n{% endif %}\n" -dict_env['default_2.rougail.var2'] = "yes" -dict_env['hidden_2.rougail.var2'] = "{% if _.var1 == \"yes\" %}\n_.var1 is yes\n{% endif %}\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(['../rougail-tests/structures/04_1auto_save_and_calculated_hidden/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(['../rougail-tests/structures/04_1auto_save_and_calculated_hidden/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var1': ParamOption(option_3, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_1auto_save_and_calculated_hidden/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var1': ParamOption(option_3, notraisepropertyerror=True)}), 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], 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(['../rougail-tests/structures/04_1auto_save_and_calculated_hidden/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(['../rougail-tests/structures/04_1auto_save_and_calculated_hidden/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var1': ParamOption(option_7, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_1auto_save_and_calculated_hidden/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var1': ParamOption(option_7, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -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/multi.py b/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/multi.py deleted file mode 100644 index 60be4e27a..000000000 --- a/tests/dictionaries/04_1auto_save_and_hidden/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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"}), 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"}), 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_1default_calculation_hidden/tiramisu/multi.py b/tests/dictionaries/04_1default_calculation_hidden/tiramisu/multi.py deleted file mode 100644 index c8632e358..000000000 --- a/tests/dictionaries/04_1default_calculation_hidden/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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.var3'] = "{% if _.var1 == 'value' or _.var2 == 'blah' %}\nvalue\n{% endif %}\n" -dict_env['default_2.rougail.var3'] = "{% if _.var1 == 'value' or _.var2 == 'blah' %}\nvalue\n{% endif %}\n" -option_3 = StrOption(name="var1", doc="a first variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_3)), kwargs={'when': ParamValue("value"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -option_5 = StrOption(name="var3", doc="a third variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['../rougail-tests/structures/04_1default_calculation_hidden/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var3"), '_.var2': ParamOption(option_4, notraisepropertyerror=True), '_.var1': ParamOption(option_3, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_9 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_8)), kwargs={'when': ParamValue("value"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -option_10 = StrOption(name="var3", doc="a third variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['../rougail-tests/structures/04_1default_calculation_hidden/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var3"), '_.var2': ParamOption(option_9, notraisepropertyerror=True), '_.var1': ParamOption(option_8, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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_1default_calculation_hidden_2/tiramisu/multi.py b/tests/dictionaries/04_1default_calculation_hidden_2/tiramisu/multi.py deleted file mode 100644 index b2e1626c7..000000000 --- a/tests/dictionaries/04_1default_calculation_hidden_2/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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.var3'] = "{% if _.var2 is propertyerror %}\nvalue\n{% endif %}\n" -dict_env['default_2.rougail.var3'] = "{% if _.var2 is propertyerror %}\nvalue\n{% endif %}\n" -option_3 = StrOption(name="var1", doc="a first variable", default="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_3)), kwargs={'when': ParamValue("value"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -option_5 = StrOption(name="var3", doc="a third variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['../rougail-tests/structures/04_1default_calculation_hidden_2/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var3"), '_.var2': ParamOption(option_4, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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="value", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_9 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((ParamValue("disabled"), ParamOption(option_8)), kwargs={'when': ParamValue("value"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'type': 'string'}) -option_10 = StrOption(name="var3", doc="a third variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['../rougail-tests/structures/04_1default_calculation_hidden_2/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var3"), '_.var2': ParamOption(option_9, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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/tiramisu/multi.py b/tests/dictionaries/04_5disabled_calculation/tiramisu/multi.py deleted file mode 100644 index 0ab746ef3..000000000 --- a/tests/dictionaries/04_5disabled_calculation/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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.variable1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['disabled_1.rougail.variable2'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['disabled_2.rougail.variable1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['disabled_2.rougail.variable2'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -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(['../rougail-tests/structures/04_5disabled_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.variable1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5disabled_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.variable2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3, notraisepropertyerror=True)}), 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({"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(['../rougail-tests/structures/04_5disabled_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.variable1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5disabled_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.variable2"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8, notraisepropertyerror=True)}), 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({"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/multi.py b/tests/dictionaries/04_5disabled_calculation_default/tiramisu/multi.py deleted file mode 100644 index d61882841..000000000 --- a/tests/dictionaries/04_5disabled_calculation_default/tiramisu/multi.py +++ /dev/null @@ -1,31 +0,0 @@ -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('../rougail-tests/funcs/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.var1'] = "{{ _.condition }}\n" -dict_env['disabled_1.rougail.var1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['default_1.rougail.var2'] = "{{ rougail.condition }}\n" -dict_env['disabled_1.rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['default_2.rougail.var1'] = "{{ _.condition }}\n" -dict_env['disabled_2.rougail.var1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['default_2.rougail.var2'] = "{{ rougail.condition }}\n" -dict_env['disabled_2.rougail.var2'] = "{% if rougail.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="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(['../rougail-tests/structures/04_5disabled_calculation_default/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var1"), '_.condition': ParamOption(option_3, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/04_5disabled_calculation_default/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5disabled_calculation_default/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'rougail.condition': ParamOption(option_3, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/04_5disabled_calculation_default/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, notraisepropertyerror=True)}), 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", 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(['../rougail-tests/structures/04_5disabled_calculation_default/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var1"), '_.condition': ParamOption(option_8, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/04_5disabled_calculation_default/rougail/00-base.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5disabled_calculation_default/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'rougail.condition': ParamOption(option_8, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/04_5disabled_calculation_default/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, notraisepropertyerror=True)}), 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/multi.py b/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/multi.py deleted file mode 100644 index c3dc2a108..000000000 --- a/tests/dictionaries/04_5disabled_calculation_optional/tiramisu/multi.py +++ /dev/null @@ -1,31 +0,0 @@ -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('../rougail-tests/funcs/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['hidden_1.rougail.var1'] = "{% if unknown is not defined %}\nunknown is undefined\n{% elif unknown == \"no\" %}\nunknown is no\n{% endif %}\n" -dict_env['frozen_1.rougail.var1'] = "{% if unknown is not defined %}\nunknown is undefined\n{% elif unknown == \"no\" %}\nunknown is no\n{% endif %}\n" -dict_env['hidden_1.rougail.var2'] = "{% if condition is not defined %}\ncondition is undefined\n{% elif condition == \"no\" %}\ncondition is no\n{% endif %}\n" -dict_env['frozen_1.rougail.var2'] = "{% if condition is not defined %}\ncondition is undefined\n{% elif condition == \"no\" %}\ncondition is no\n{% endif %}\n" -dict_env['hidden_2.rougail.var1'] = "{% if unknown is not defined %}\nunknown is undefined\n{% elif unknown == \"no\" %}\nunknown is no\n{% endif %}\n" -dict_env['frozen_2.rougail.var1'] = "{% if unknown is not defined %}\nunknown is undefined\n{% elif unknown == \"no\" %}\nunknown is no\n{% endif %}\n" -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({"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(['../rougail-tests/structures/04_5disabled_calculation_optional/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(['../rougail-tests/structures/04_5disabled_calculation_optional/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(['../rougail-tests/structures/04_5disabled_calculation_optional/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(['../rougail-tests/structures/04_5disabled_calculation_optional/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({"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(['../rougail-tests/structures/04_5disabled_calculation_optional/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(['../rougail-tests/structures/04_5disabled_calculation_optional/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(['../rougail-tests/structures/04_5disabled_calculation_optional/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(['../rougail-tests/structures/04_5disabled_calculation_optional/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_variable/tiramisu/multi.py b/tests/dictionaries/04_5disabled_calculation_variable/tiramisu/multi.py deleted file mode 100644 index 625472e52..000000000 --- a/tests/dictionaries/04_5disabled_calculation_variable/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/04_5disabled_calculation_variable2/tiramisu/multi.py deleted file mode 100644 index 7e231de81..000000000 --- a/tests/dictionaries/04_5disabled_calculation_variable2/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/04_5disabled_calculation_variable3/tiramisu/multi.py deleted file mode 100644 index f52d7f4af..000000000 --- a/tests/dictionaries/04_5disabled_calculation_variable3/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/04_5disabled_calculation_variable4/tiramisu/multi.py deleted file mode 100644 index a53d8a492..000000000 --- a/tests/dictionaries/04_5disabled_calculation_variable4/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/04_5hidden_calculation/tiramisu/multi.py deleted file mode 100644 index 1ce3f8c0b..000000000 --- a/tests/dictionaries/04_5hidden_calculation/tiramisu/multi.py +++ /dev/null @@ -1,31 +0,0 @@ -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('../rougail-tests/funcs/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['hidden_1.rougail.var1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_1.rougail.var1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['hidden_1.rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_1.rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['hidden_2.rougail.var1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_2.rougail.var1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['hidden_2.rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_2.rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -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(['../rougail-tests/structures/04_5hidden_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation/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, notraisepropertyerror=True)}), 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="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(['../rougail-tests/structures/04_5hidden_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation/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, notraisepropertyerror=True)}), 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_5hidden_calculation2/tiramisu/multi.py b/tests/dictionaries/04_5hidden_calculation2/tiramisu/multi.py deleted file mode 100644 index c6fed0fa7..000000000 --- a/tests/dictionaries/04_5hidden_calculation2/tiramisu/multi.py +++ /dev/null @@ -1,35 +0,0 @@ -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('../rougail-tests/funcs/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.var1'] = "{{ _.condition }}\n" -dict_env['hidden_1.rougail.var1'] = "{% if _.condition != \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_1.rougail.var1'] = "{% if _.condition != \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['default_1.rougail.var2'] = "{{ rougail.condition }}\n" -dict_env['hidden_1.rougail.var2'] = "{% if rougail.condition != \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_1.rougail.var2'] = "{% if rougail.condition != \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['default_2.rougail.var1'] = "{{ _.condition }}\n" -dict_env['hidden_2.rougail.var1'] = "{% if _.condition != \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_2.rougail.var1'] = "{% if _.condition != \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['default_2.rougail.var2'] = "{{ rougail.condition }}\n" -dict_env['hidden_2.rougail.var2'] = "{% if rougail.condition != \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_2.rougail.var2'] = "{% if rougail.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="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(['../rougail-tests/structures/04_5hidden_calculation2/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var1"), '_.condition': ParamOption(option_3, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/04_5hidden_calculation2/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation2/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation2/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'rougail.condition': ParamOption(option_3, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/04_5hidden_calculation2/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation2/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, notraisepropertyerror=True)}), 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", 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(['../rougail-tests/structures/04_5hidden_calculation2/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var1"), '_.condition': ParamOption(option_8, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/04_5hidden_calculation2/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation2/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation2/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'rougail.condition': ParamOption(option_8, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/04_5hidden_calculation2/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation2/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, notraisepropertyerror=True)}), 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_5hidden_calculation_default_calculation/tiramisu/multi.py b/tests/dictionaries/04_5hidden_calculation_default_calculation/tiramisu/multi.py deleted file mode 100644 index 909ce57cb..000000000 --- a/tests/dictionaries/04_5hidden_calculation_default_calculation/tiramisu/multi.py +++ /dev/null @@ -1,35 +0,0 @@ -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('../rougail-tests/funcs/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.var1'] = "{{ _.condition }}\n" -dict_env['hidden_1.rougail.var1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_1.rougail.var1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['default_1.rougail.var2'] = "{{ rougail.condition }}\n" -dict_env['hidden_1.rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_1.rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['default_2.rougail.var1'] = "{{ _.condition }}\n" -dict_env['hidden_2.rougail.var1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_2.rougail.var1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['default_2.rougail.var2'] = "{{ rougail.condition }}\n" -dict_env['hidden_2.rougail.var2'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_2.rougail.var2'] = "{% if rougail.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="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(['../rougail-tests/structures/04_5hidden_calculation_default_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var1"), '_.condition': ParamOption(option_3, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/04_5hidden_calculation_default_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation_default_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation_default_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'rougail.condition': ParamOption(option_3, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/04_5hidden_calculation_default_calculation/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation_default_calculation/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, notraisepropertyerror=True)}), 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", 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(['../rougail-tests/structures/04_5hidden_calculation_default_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var1"), '_.condition': ParamOption(option_8, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/04_5hidden_calculation_default_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation_default_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.var1"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_8, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation_default_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'rougail.condition': ParamOption(option_8, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/04_5hidden_calculation_default_calculation/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/04_5hidden_calculation_default_calculation/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, notraisepropertyerror=True)}), 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_5validators/tiramisu/multi.py b/tests/dictionaries/04_5validators/tiramisu/multi.py deleted file mode 100644 index f939ef707..000000000 --- a/tests/dictionaries/04_5validators/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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(['../rougail-tests/structures/04_5validators/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", 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(['../rougail-tests/structures/04_5validators/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", 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/multi.py b/tests/dictionaries/04_5validators_differ/tiramisu/multi.py deleted file mode 100644 index 3500c28a3..000000000 --- a/tests/dictionaries/04_5validators_differ/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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 == _.var2 %}\nvar1 must be different than var2\n{% endif %}\n" -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(['../rougail-tests/structures/04_5validators_differ/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("1.rougail.var1"), '_.var2': ParamOption(option_4, notraisepropertyerror=True), '_.var1': ParamSelfOption(whole=False)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('another_value',)}) -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(['../rougail-tests/structures/04_5validators_differ/rougail/00-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("2.rougail.var1"), '_.var2': ParamOption(option_8, notraisepropertyerror=True), '_.var1': ParamSelfOption(whole=False)}))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string', 'test': ('another_value',)}) -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/multi.py b/tests/dictionaries/04_5validators_multi/tiramisu/multi.py deleted file mode 100644 index 604a1f395..000000000 --- a/tests/dictionaries/04_5validators_multi/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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(['../rougail-tests/structures/04_5validators_multi/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", 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(['../rougail-tests/structures/04_5validators_multi/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", 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/multi.py b/tests/dictionaries/04_5validators_multi2/tiramisu/multi.py deleted file mode 100644 index 9e907b8fb..000000000 --- a/tests/dictionaries/04_5validators_multi2/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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(['../rougail-tests/structures/04_5validators_multi2/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", 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(['../rougail-tests/structures/04_5validators_multi2/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", 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_not_uniq/tiramisu/multi.py b/tests/dictionaries/05_0multi_not_uniq/tiramisu/multi.py deleted file mode 100644 index ab874647b..000000000 --- a/tests/dictionaries/05_0multi_not_uniq/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/05_0multi_uniq/tiramisu/multi.py deleted file mode 100644 index e83e7f0b7..000000000 --- a/tests/dictionaries/05_0multi_uniq/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/12_1auto_save_expert/tiramisu/multi.py deleted file mode 100644 index cf9fc902f..000000000 --- a/tests/dictionaries/12_1auto_save_expert/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/16_0redefine_description/tiramisu/multi.py deleted file mode 100644 index 98eaba57b..000000000 --- a/tests/dictionaries/16_0redefine_description/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/16_2family_redefine_calculation/tiramisu/multi.py deleted file mode 100644 index 179347ad8..000000000 --- a/tests/dictionaries/16_2family_redefine_calculation/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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.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(['../rougail-tests/structures/16_2family_redefine_calculation/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", 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(['../rougail-tests/structures/16_2family_redefine_calculation/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", 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/multi.py b/tests/dictionaries/16_2family_redefine_disabled/tiramisu/multi.py deleted file mode 100644 index 2756385bf..000000000 --- a/tests/dictionaries/16_2family_redefine_disabled/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/16_5exists_nonexists/tiramisu/multi.py deleted file mode 100644 index 4864d0f27..000000000 --- a/tests/dictionaries/16_5exists_nonexists/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/16_5exists_redefine/tiramisu/multi.py deleted file mode 100644 index 335548671..000000000 --- a/tests/dictionaries/16_5exists_redefine/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", "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", "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_calculation/tiramisu/multi.py b/tests/dictionaries/16_5redefine_calculation/tiramisu/multi.py deleted file mode 100644 index 3ca69ef69..000000000 --- a/tests/dictionaries/16_5redefine_calculation/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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(['../rougail-tests/structures/16_5redefine_calculation/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", 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(['../rougail-tests/structures/16_5redefine_calculation/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", 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/multi.py b/tests/dictionaries/16_5redefine_choice/tiramisu/multi.py deleted file mode 100644 index e704c5408..000000000 --- a/tests/dictionaries/16_5redefine_choice/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/16_5redefine_default/tiramisu/multi.py deleted file mode 100644 index 4b28a7f3d..000000000 --- a/tests/dictionaries/16_5redefine_default/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/16_5redefine_default_calculation/tiramisu/multi.py deleted file mode 100644 index d87a998a5..000000000 --- a/tests/dictionaries/16_5redefine_default_calculation/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/16_5redefine_family/tiramisu/multi.py deleted file mode 100644 index 84d419f3c..000000000 --- a/tests/dictionaries/16_5redefine_family/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/16_5redefine_help/tiramisu/multi.py deleted file mode 100644 index b9883be8f..000000000 --- a/tests/dictionaries/16_5redefine_help/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/16_5redefine_hidden/tiramisu/multi.py deleted file mode 100644 index c98881b75..000000000 --- a/tests/dictionaries/16_5redefine_hidden/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", "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", "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_multi/tiramisu/multi.py b/tests/dictionaries/16_5redefine_multi/tiramisu/multi.py deleted file mode 100644 index 81ddff522..000000000 --- a/tests/dictionaries/16_5redefine_multi/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/16_5redefine_remove_disable_calculation/tiramisu/multi.py deleted file mode 100644 index cdd69ce43..000000000 --- a/tests/dictionaries/16_5redefine_remove_disable_calculation/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/16_5test_redefine/tiramisu/multi.py deleted file mode 100644 index 3b7821b04..000000000 --- a/tests/dictionaries/16_5test_redefine/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/16_6choice_redefine/tiramisu/multi.py deleted file mode 100644 index 345cda46c..000000000 --- a/tests/dictionaries/16_6choice_redefine/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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_6exists_family/makedict/after.json b/tests/dictionaries/16_6exists_family/makedict/after.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/dictionaries/16_6exists_family/makedict/after.json @@ -0,0 +1 @@ +{} diff --git a/tests/dictionaries/16_6exists_family/makedict/base.json b/tests/dictionaries/16_6exists_family/makedict/base.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/dictionaries/16_6exists_family/makedict/base.json @@ -0,0 +1 @@ +{} diff --git a/tests/dictionaries/16_6exists_family/makedict/before.json b/tests/dictionaries/16_6exists_family/makedict/before.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/dictionaries/16_6exists_family/makedict/before.json @@ -0,0 +1 @@ +{} diff --git a/tests/dictionaries/16_6exists_family/makedict/mandatory.json b/tests/dictionaries/16_6exists_family/makedict/mandatory.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/tests/dictionaries/16_6exists_family/makedict/mandatory.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/dictionaries/00_0empty/tiramisu/multi.py b/tests/dictionaries/16_6exists_family/tiramisu/base.py similarity index 65% rename from tests/dictionaries/00_0empty/tiramisu/multi.py rename to tests/dictionaries/16_6exists_family/tiramisu/base.py index c37d2b51d..d9e243d06 100644 --- a/tests/dictionaries/00_0empty/tiramisu/multi.py +++ b/tests/dictionaries/16_6exists_family/tiramisu/base.py @@ -10,6 +10,5 @@ except: ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -optiondescription_1 = OptionDescription(name="1", doc="1", children=[], properties=frozenset({"advanced"})) -optiondescription_2 = OptionDescription(name="2", doc="2", children=[], properties=frozenset({"advanced"})) -option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_2]) +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/16_6exists_family/tiramisu/no_namespace.py similarity index 56% rename from tests/dictionaries/20_0empty_family/tiramisu/multi.py rename to tests/dictionaries/16_6exists_family/tiramisu/no_namespace.py index 614668d43..e4e37cbdb 100644 --- a/tests/dictionaries/20_0empty_family/tiramisu/multi.py +++ b/tests/dictionaries/16_6exists_family/tiramisu/no_namespace.py @@ -3,13 +3,7 @@ from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from re import compile as re_compile from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('../rougail-tests/funcs/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="1", doc="1", children=[], properties=frozenset({"advanced"})) -optiondescription_4 = OptionDescription(name="2", doc="2", children=[], properties=frozenset({"advanced"})) -option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) +option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[]) diff --git a/tests/dictionaries/16_6exists_redefine_family/tiramisu/multi.py b/tests/dictionaries/16_6exists_redefine_family/tiramisu/multi.py deleted file mode 100644 index 92038bbd2..000000000 --- a/tests/dictionaries/16_6exists_redefine_family/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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="variable1", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_3 = OptionDescription(name="family1", doc="new description", children=[option_4], properties=frozenset({"basic"})) -option_6 = StrOption(name="variable2", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_5 = OptionDescription(name="family2", doc="a second family", children=[option_6], 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_10 = StrOption(name="variable1", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_9 = OptionDescription(name="family1", doc="new description", children=[option_10], properties=frozenset({"basic"})) -option_12 = StrOption(name="variable2", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_11 = OptionDescription(name="family2", doc="a second family", children=[option_12], properties=frozenset({"basic"})) -optiondescription_8 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_9, 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/16exists_exists/tiramisu/multi.py b/tests/dictionaries/16exists_exists/tiramisu/multi.py deleted file mode 100644 index b92810e1d..000000000 --- a/tests/dictionaries/16exists_exists/tiramisu/multi.py +++ /dev/null @@ -1,19 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/tiramisu/base.py b/tests/dictionaries/17_5redefine_leadership/tiramisu/base.py index 1b1a2906e..4665af25f 100644 --- a/tests/dictionaries/17_5redefine_leadership/tiramisu/base.py +++ b/tests/dictionaries/17_5redefine_leadership/tiramisu/base.py @@ -12,6 +12,6 @@ ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") 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_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/17_5redefine_leadership/tiramisu/multi.py b/tests/dictionaries/17_5redefine_leadership/tiramisu/multi.py deleted file mode 100644 index a6cc1abed..000000000 --- a/tests/dictionaries/17_5redefine_leadership/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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({"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 d17c7fd3c..6326cc6e1 100644 --- a/tests/dictionaries/17_5redefine_leadership/tiramisu/no_namespace.py +++ b/tests/dictionaries/17_5redefine_leadership/tiramisu/no_namespace.py @@ -8,5 +8,5 @@ ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") 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"})) +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/20_0family_append/tiramisu/multi.py b/tests/dictionaries/20_0family_append/tiramisu/multi.py deleted file mode 100644 index 4a4e87c7f..000000000 --- a/tests/dictionaries/20_0family_append/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/tiramisu/multi.py b/tests/dictionaries/20_0family_underscore/tiramisu/multi.py deleted file mode 100644 index 4e8f38e65..000000000 --- a/tests/dictionaries/20_0family_underscore/tiramisu/multi.py +++ /dev/null @@ -1,43 +0,0 @@ -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('../rougail-tests/funcs/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({"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({"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({"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_0multi_family/tiramisu/multi.py b/tests/dictionaries/20_0multi_family/tiramisu/multi.py deleted file mode 100644 index 741acfd5e..000000000 --- a/tests/dictionaries/20_0multi_family/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/20_0multi_family_basic/tiramisu/multi.py deleted file mode 100644 index fe0c56fab..000000000 --- a/tests/dictionaries/20_0multi_family_basic/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/20_0multi_family_expert/tiramisu/multi.py deleted file mode 100644 index 669c7aa49..000000000 --- a/tests/dictionaries/20_0multi_family_expert/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/20_0multi_family_order/tiramisu/multi.py deleted file mode 100644 index 76fe49896..000000000 --- a/tests/dictionaries/20_0multi_family_order/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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'}) -option_5 = StrOption(name="variable1", doc="a first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -option_7 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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", 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'}) -option_15 = StrOption(name="variable", doc="a variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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", 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/tiramisu/multi.py b/tests/dictionaries/20_0validators_differ_redefine/tiramisu/multi.py deleted file mode 100644 index 04dd47640..000000000 --- a/tests/dictionaries/20_0validators_differ_redefine/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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.var3'] = "{% if _.var3 == _.var2 %}\nvar3 must be different than var2\n{% endif %}\n" -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(['../rougail-tests/structures/20_0validators_differ_redefine/rougail/01-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("1.rougail.var3"), '_.var3': ParamSelfOption(whole=False), '_.var2': ParamOption(option_4, notraisepropertyerror=True)}))], 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(['../rougail-tests/structures/20_0validators_differ_redefine/rougail/01-base.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("2.rougail.var3"), '_.var3': ParamSelfOption(whole=False), '_.var2': ParamOption(option_9, notraisepropertyerror=True)}))], 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_1empty_subfamily/tiramisu/multi.py b/tests/dictionaries/20_1empty_subfamily/tiramisu/multi.py deleted file mode 100644 index a72e44538..000000000 --- a/tests/dictionaries/20_1empty_subfamily/tiramisu/multi.py +++ /dev/null @@ -1,15 +0,0 @@ -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('../rougail-tests/funcs/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="1", doc="1", children=[], properties=frozenset({"advanced"})) -optiondescription_5 = OptionDescription(name="2", doc="2", children=[], properties=frozenset({"advanced"})) -option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5]) diff --git a/tests/dictionaries/20_9default_information_parent/tiramisu/multi.py b/tests/dictionaries/20_9default_information_parent/tiramisu/multi.py deleted file mode 100644 index b079c941b..000000000 --- a/tests/dictionaries/20_9default_information_parent/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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="a first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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", 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", 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_9family_absolute/makedict/after.json b/tests/dictionaries/20_9family_absolute/makedict/after.json new file mode 100644 index 000000000..246e5a874 --- /dev/null +++ b/tests/dictionaries/20_9family_absolute/makedict/after.json @@ -0,0 +1,29 @@ +{ + "rougail.var1": { + "owner": "default", + "value": null + }, + "rougail.family.var2": { + "owner": "default", + "value": null + }, + "rougail.family.subfamily.variable": { + "owner": "default", + "value": [ + null, + null + ] + }, + "rougail.family2.var2": { + "owner": "default", + "value": null + }, + "rougail.family2.subfamily.variable": { + "owner": "default", + "value": [ + null, + null, + null + ] + } +} diff --git a/tests/dictionaries/20_9family_absolute/makedict/base.json b/tests/dictionaries/20_9family_absolute/makedict/base.json new file mode 100644 index 000000000..a9cbbfae2 --- /dev/null +++ b/tests/dictionaries/20_9family_absolute/makedict/base.json @@ -0,0 +1,14 @@ +{ + "rougail.var1": null, + "rougail.family.var2": null, + "rougail.family.subfamily.variable": [ + null, + null + ], + "rougail.family2.var2": null, + "rougail.family2.subfamily.variable": [ + null, + null, + null + ] +} diff --git a/tests/dictionaries/20_9family_absolute/makedict/before.json b/tests/dictionaries/20_9family_absolute/makedict/before.json new file mode 100644 index 000000000..246e5a874 --- /dev/null +++ b/tests/dictionaries/20_9family_absolute/makedict/before.json @@ -0,0 +1,29 @@ +{ + "rougail.var1": { + "owner": "default", + "value": null + }, + "rougail.family.var2": { + "owner": "default", + "value": null + }, + "rougail.family.subfamily.variable": { + "owner": "default", + "value": [ + null, + null + ] + }, + "rougail.family2.var2": { + "owner": "default", + "value": null + }, + "rougail.family2.subfamily.variable": { + "owner": "default", + "value": [ + null, + null, + null + ] + } +} diff --git a/tests/dictionaries/20_9family_absolute/makedict/mandatory.json b/tests/dictionaries/20_9family_absolute/makedict/mandatory.json new file mode 100644 index 000000000..5b2b867bf --- /dev/null +++ b/tests/dictionaries/20_9family_absolute/makedict/mandatory.json @@ -0,0 +1 @@ +["rougail.var1", "rougail.family.var2", "rougail.family.subfamily.variable", "rougail.family2.var2", "rougail.family2.subfamily.variable"] \ No newline at end of file diff --git a/tests/dictionaries/20_9family_absolute/tiramisu/no_namespace.py b/tests/dictionaries/20_9family_absolute/tiramisu/no_namespace.py new file mode 100644 index 000000000..88afed109 --- /dev/null +++ b/tests/dictionaries/20_9family_absolute/tiramisu/no_namespace.py @@ -0,0 +1,18 @@ +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('../rougail-tests/funcs/test.py') +ALLOWED_LEADER_PROPERTIES.add("basic") +ALLOWED_LEADER_PROPERTIES.add("standard") +ALLOWED_LEADER_PROPERTIES.add("advanced") +option_1 = StrOption(name="var1", doc="first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) +option_3 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) +option_5 = StrOption(name="variable", doc="third variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_1)), kwargs={'__internal_multi': ParamValue(False)})), Calculation(func['calc_value'], Params((ParamOption(option_3)), kwargs={'__internal_multi': ParamValue(False)}))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_1)), kwargs={'__internal_multi': ParamValue(False)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_4 = OptionDescription(name="subfamily", doc="a sub family", children=[option_5], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="family", doc="a family", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +option_7 = StrOption(name="var2", doc="var2", default=Calculation(func['calc_value'], Params((ParamOption(option_3)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_9 = StrOption(name="variable", doc="fourth variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_1)), kwargs={'__internal_multi': ParamValue(False)})), Calculation(func['calc_value'], Params((ParamOption(option_3)), kwargs={'__internal_multi': ParamValue(False)})), Calculation(func['calc_value'], Params((ParamOption(option_7)), kwargs={'__internal_multi': ParamValue(False)}))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_1)), kwargs={'__internal_multi': ParamValue(False)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_8 = OptionDescription(name="subfamily", doc="a sub family", children=[option_9], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="family2", doc="a family", children=[option_7, optiondescription_8], properties=frozenset({"standard"})) +option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, optiondescription_6]) diff --git a/tests/dictionaries/20_9family_absolute/tmp/no_namespace.py b/tests/dictionaries/20_9family_absolute/tmp/no_namespace.py new file mode 100644 index 000000000..9068b3323 --- /dev/null +++ b/tests/dictionaries/20_9family_absolute/tmp/no_namespace.py @@ -0,0 +1,18 @@ +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('../rougail-tests/funcs/test.py') +ALLOWED_LEADER_PROPERTIES.add("basic") +ALLOWED_LEADER_PROPERTIES.add("standard") +ALLOWED_LEADER_PROPERTIES.add("advanced") +option_1 = StrOption(name="var1", doc="first variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) +option_3 = StrOption(name="var2", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) +option_5 = StrOption(name="variable", doc="third variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_1)), kwargs={'__internal_multi': ParamValue(True)})), Calculation(func['calc_value'], Params((ParamOption(option_3)), kwargs={'__internal_multi': ParamValue(True)}))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_1)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_4 = OptionDescription(name="subfamily", doc="a sub family", children=[option_5], properties=frozenset({"standard"})) +optiondescription_2 = OptionDescription(name="family", doc="a family", children=[option_3, optiondescription_4], properties=frozenset({"basic"})) +option_7 = StrOption(name="var2", doc="var2", default=Calculation(func['calc_value'], Params((ParamOption(option_3)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +option_9 = StrOption(name="variable", doc="fourth variable", multi=True, default=[Calculation(func['calc_value'], Params((ParamOption(option_1)), kwargs={'__internal_multi': ParamValue(True)})), Calculation(func['calc_value'], Params((ParamOption(option_3)), kwargs={'__internal_multi': ParamValue(True)})), Calculation(func['calc_value'], Params((ParamOption(option_7)), kwargs={'__internal_multi': ParamValue(True)}))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_1)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) +optiondescription_8 = OptionDescription(name="subfamily", doc="a sub family", children=[option_9], properties=frozenset({"standard"})) +optiondescription_6 = OptionDescription(name="family2", doc="a family", children=[option_7, optiondescription_8], properties=frozenset({"standard"})) +option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, optiondescription_6]) diff --git a/tests/dictionaries/24_0family_hidden_condition/tiramisu/multi.py b/tests/dictionaries/24_0family_hidden_condition/tiramisu/multi.py deleted file mode 100644 index 9698bf815..000000000 --- a/tests/dictionaries/24_0family_hidden_condition/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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.family.var1'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['hidden_1.rougail.family'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_2.rougail.family.var1'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['hidden_2.rougail.family'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -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(['../rougail-tests/structures/24_0family_hidden_condition/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/24_0family_hidden_condition/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, notraisepropertyerror=True)}), 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({"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(['../rougail-tests/structures/24_0family_hidden_condition/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/24_0family_hidden_condition/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, notraisepropertyerror=True)}), 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({"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/tiramisu/multi.py b/tests/dictionaries/24_0family_hidden_condition_boolean/tiramisu/multi.py deleted file mode 100644 index 82563adc1..000000000 --- a/tests/dictionaries/24_0family_hidden_condition_boolean/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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.family.variable'] = "{% if not rougail.condition %}\ncondition is false\n{% endif %}\n" -dict_env['hidden_1.rougail.family'] = "{% if not rougail.condition %}\ncondition is false\n{% endif %}\n" -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({"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(['../rougail-tests/structures/24_0family_hidden_condition_boolean/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/24_0family_hidden_condition_boolean/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, notraisepropertyerror=True)}), 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({"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(['../rougail-tests/structures/24_0family_hidden_condition_boolean/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/24_0family_hidden_condition_boolean/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, notraisepropertyerror=True)}), 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/multi.py b/tests/dictionaries/24_0family_hidden_condition_sub_family/tiramisu/multi.py deleted file mode 100644 index a2f201f1a..000000000 --- a/tests/dictionaries/24_0family_hidden_condition_sub_family/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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.family.subfamily.var1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['hidden_1.rougail.family'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_2.rougail.family.subfamily.var1'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['hidden_2.rougail.family'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -option_3 = StrOption(name="condition", doc="the variable use has condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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(['../rougail-tests/structures/24_0family_hidden_condition_sub_family/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/24_0family_hidden_condition_sub_family/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3, notraisepropertyerror=True)}), 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({"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(['../rougail-tests/structures/24_0family_hidden_condition_sub_family/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/24_0family_hidden_condition_sub_family/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.family"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_9, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])})) -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/tiramisu/multi.py b/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/multi.py deleted file mode 100644 index 17ace5d0f..000000000 --- a/tests/dictionaries/24_0family_hidden_condition_variable_sub_family/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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({"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({"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_with_variable/tiramisu/multi.py b/tests/dictionaries/24_0family_hidden_condition_with_variable/tiramisu/multi.py deleted file mode 100644 index af461abc0..000000000 --- a/tests/dictionaries/24_0family_hidden_condition_with_variable/tiramisu/multi.py +++ /dev/null @@ -1,33 +0,0 @@ -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('../rougail-tests/funcs/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['hidden_1.rougail.family.variable'] = "{% if rougail.condition2 %}\ncondition2 is true\n{% endif %}\n" -dict_env['frozen_1.rougail.family.variable'] = "{% if not rougail.condition1 %}\ncondition1 is false\n{% endif %}\n" -dict_env['frozen_1.rougail.family.variable_0'] = "{% if rougail.condition2 %}\ncondition2 is true\n{% endif %}\n" -dict_env['hidden_1.rougail.family'] = "{% if not rougail.condition1 %}\ncondition1 is false\n{% endif %}\n" -dict_env['hidden_2.rougail.family.variable'] = "{% if rougail.condition2 %}\ncondition2 is true\n{% endif %}\n" -dict_env['frozen_2.rougail.family.variable'] = "{% if not rougail.condition1 %}\ncondition1 is false\n{% endif %}\n" -dict_env['frozen_2.rougail.family.variable_0'] = "{% if rougail.condition2 %}\ncondition2 is true\n{% endif %}\n" -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({"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(['../rougail-tests/structures/24_0family_hidden_condition_with_variable/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/24_0family_hidden_condition_with_variable/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/24_0family_hidden_condition_with_variable/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/24_0family_hidden_condition_with_variable/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, notraisepropertyerror=True)}), 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({"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(['../rougail-tests/structures/24_0family_hidden_condition_with_variable/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/24_0family_hidden_condition_with_variable/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/24_0family_hidden_condition_with_variable/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/24_0family_hidden_condition_with_variable/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, notraisepropertyerror=True)}), 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/multi.py b/tests/dictionaries/24_0family_hidden_param_condition_sub_family/tiramisu/multi.py deleted file mode 100644 index 1502da91e..000000000 --- a/tests/dictionaries/24_0family_hidden_param_condition_sub_family/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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.family.sub_family.var1'] = "{% if condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['hidden_1.rougail.family'] = "{% if condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['frozen_2.rougail.family.sub_family.var1'] = "{% if condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['hidden_2.rougail.family'] = "{% if condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -option_3 = StrOption(name="condition", doc="the variable use has condition", default="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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(['../rougail-tests/structures/24_0family_hidden_param_condition_sub_family/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(['../rougail-tests/structures/24_0family_hidden_param_condition_sub_family/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", 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(['../rougail-tests/structures/24_0family_hidden_param_condition_sub_family/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(['../rougail-tests/structures/24_0family_hidden_param_condition_sub_family/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", 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/multi.py b/tests/dictionaries/24_0family_mandatory_condition/tiramisu/multi.py deleted file mode 100644 index 60ee5105e..000000000 --- a/tests/dictionaries/24_0family_mandatory_condition/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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_1.rougail.var'] = "{% if _.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -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(['../rougail-tests/structures/24_0family_mandatory_condition/rougail/00-base.yml']), '__internal_attribute': ParamValue("mandatory"), '__internal_variable': ParamValue("1.rougail.var"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_3, notraisepropertyerror=True)}), 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], 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(['../rougail-tests/structures/24_0family_mandatory_condition/rougail/00-base.yml']), '__internal_attribute': ParamValue("mandatory"), '__internal_variable': ParamValue("2.rougail.var"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.condition': ParamOption(option_7, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'type': 'string'}) -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/multi.py b/tests/dictionaries/24_0family_mandatory_condition_variable/tiramisu/multi.py deleted file mode 100644 index e68aebe2a..000000000 --- a/tests/dictionaries/24_0family_mandatory_condition_variable/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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_7validators_variable_optional/tiramisu/multi.py b/tests/dictionaries/24_7validators_variable_optional/tiramisu/multi.py deleted file mode 100644 index 94f3c8067..000000000 --- a/tests/dictionaries/24_7validators_variable_optional/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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 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 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(['../rougail-tests/structures/24_7validators_variable_optional/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(['../rougail-tests/structures/24_7validators_variable_optional/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", 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(['../rougail-tests/structures/24_7validators_variable_optional/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(['../rougail-tests/structures/24_7validators_variable_optional/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", 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/multi.py b/tests/dictionaries/24_family_disabled_var_hidden/tiramisu/multi.py deleted file mode 100644 index dcee9b4d7..000000000 --- a/tests/dictionaries/24_family_disabled_var_hidden/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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/40_0leadership/tiramisu/multi.py b/tests/dictionaries/40_0leadership/tiramisu/multi.py deleted file mode 100644 index c3bdcfb81..000000000 --- a/tests/dictionaries/40_0leadership/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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({"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", 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", 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/multi.py b/tests/dictionaries/40_0leadership_diff_name/tiramisu/multi.py deleted file mode 100644 index 1f3debecd..000000000 --- a/tests/dictionaries/40_0leadership_diff_name/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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({"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", 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", 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_calculation/tiramisu/multi.py b/tests/dictionaries/40_0leadership_follower_default_calculation/tiramisu/multi.py deleted file mode 100644 index 40c7aed57..000000000 --- a/tests/dictionaries/40_0leadership_follower_default_calculation/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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.leader.follower2'] = "{{ _.follower1 }}\n" -dict_env['default_2.rougail.leader.follower2'] = "{{ _.follower1 }}\n" -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, 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(['../rougail-tests/structures/40_0leadership_follower_default_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.leader.follower2"), '_.follower1': ParamOption(option_5, notraisepropertyerror=True)})), 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", 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(['../rougail-tests/structures/40_0leadership_follower_default_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.leader.follower2"), '_.follower1': ParamOption(option_11, notraisepropertyerror=True)})), 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", 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/multi.py b/tests/dictionaries/40_0leadership_follower_default_submulti/tiramisu/multi.py deleted file mode 100644 index 6a6b1b4a6..000000000 --- a/tests/dictionaries/40_0leadership_follower_default_submulti/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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=["leader"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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", 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", 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/multi.py b/tests/dictionaries/40_0leadership_follower_default_submulti_calculation/tiramisu/multi.py deleted file mode 100644 index 2c7f037fa..000000000 --- a/tests/dictionaries/40_0leadership_follower_default_submulti_calculation/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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, default=["leader"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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)), kwargs={'__internal_multi': ParamValue(True)})), 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", 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)), kwargs={'__internal_multi': ParamValue(True)})), 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", 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/multi.py b/tests/dictionaries/40_0leadership_follower_default_value/tiramisu/multi.py deleted file mode 100644 index 3fdb987e8..000000000 --- a/tests/dictionaries/40_0leadership_follower_default_value/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/40_0leadership_leader_not_multi/tiramisu/multi.py deleted file mode 100644 index 88bcddaa9..000000000 --- a/tests/dictionaries/40_0leadership_leader_not_multi/tiramisu/multi.py +++ /dev/null @@ -1,31 +0,0 @@ -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('../rougail-tests/funcs/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="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) -option_7 = StrOption(name="leader", doc="leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -option_8 = StrOption(name="follower1", doc="follower1", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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", 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"})) -option_16 = StrOption(name="leader", doc="leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -option_17 = StrOption(name="follower1", doc="follower1", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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", 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/multi.py b/tests/dictionaries/40_1leadership_append_follower/tiramisu/multi.py deleted file mode 100644 index 472b93ee7..000000000 --- a/tests/dictionaries/40_1leadership_append_follower/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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({"basic", "mandatory"}), informations={'type': 'string'}) -option_5 = StrOption(name="follower1", doc="the follower1", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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", 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", 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/multi.py b/tests/dictionaries/40_2leadership_calculation_index/tiramisu/multi.py deleted file mode 100644 index c099381f2..000000000 --- a/tests/dictionaries/40_2leadership_calculation_index/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/40_2leadership_calculation_param_index/tiramisu/multi.py deleted file mode 100644 index 8a3c8b239..000000000 --- a/tests/dictionaries/40_2leadership_calculation_param_index/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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.leader.follower1'] = "{{ index }}" -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(['../rougail-tests/structures/40_2leadership_calculation_param_index/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", 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(['../rougail-tests/structures/40_2leadership_calculation_param_index/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", 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/tiramisu/multi.py b/tests/dictionaries/40_2leadership_leader_calculation/tiramisu/multi.py deleted file mode 100644 index b4897ebd2..000000000 --- a/tests/dictionaries/40_2leadership_leader_calculation/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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.leader.leader'] = "val1\nval2\n" -dict_env['default_2.rougail.leader.leader'] = "val1\nval2\n" -option_4 = StrOption(name="leader", doc="a leader", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.leader.leader"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(True), '__internal_files': ParamValue(['../rougail-tests/structures/40_2leadership_leader_calculation/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.leader.leader")})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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", 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(['../rougail-tests/structures/40_2leadership_leader_calculation/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", 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/multi.py b/tests/dictionaries/40_6leadership_follower_multi/tiramisu/multi.py deleted file mode 100644 index 8c160e926..000000000 --- a/tests/dictionaries/40_6leadership_follower_multi/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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({"basic", "mandatory"}), informations={'type': 'string'}) -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", 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", 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/multi.py b/tests/dictionaries/40_8calculation_boolean/tiramisu/multi.py deleted file mode 100644 index 83ab19b01..000000000 --- a/tests/dictionaries/40_8calculation_boolean/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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.multi1'] = "{% if _.bool %}\nTrue\nFalse\n{% else %}\nFalse\n{% endif %}\n" -dict_env['default_1.rougail.multi2'] = "{% if not _.bool %}\nTrue\nFalse\n{% else %}\nFalse\n{% endif %}\n" -dict_env['default_2.rougail.multi1'] = "{% if _.bool %}\nTrue\nFalse\n{% else %}\nFalse\n{% endif %}\n" -dict_env['default_2.rougail.multi2'] = "{% if not _.bool %}\nTrue\nFalse\n{% else %}\nFalse\n{% endif %}\n" -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(['../rougail-tests/structures/40_8calculation_boolean/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.multi1"), '_.bool': ParamOption(option_3, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/40_8calculation_boolean/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.multi2"), '_.bool': ParamOption(option_3, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -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(['../rougail-tests/structures/40_8calculation_boolean/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.multi1"), '_.bool': ParamOption(option_8, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/40_8calculation_boolean/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.multi2"), '_.bool': ParamOption(option_8, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -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/multi.py b/tests/dictionaries/40_8calculation_boolean_return_none/tiramisu/multi.py deleted file mode 100644 index 94022c06e..000000000 --- a/tests/dictionaries/40_8calculation_boolean_return_none/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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'] = "{% if rougail.var1 == 'no' %}\nfalse\n{% endif %}\n" -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(['../rougail-tests/structures/40_8calculation_boolean_return_none/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'rougail.var1': ParamOption(option_3, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -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(['../rougail-tests/structures/40_8calculation_boolean_return_none/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'rougail.var1': ParamOption(option_7, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -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/multi.py b/tests/dictionaries/40_8calculation_integer/tiramisu/multi.py deleted file mode 100644 index 41309c368..000000000 --- a/tests/dictionaries/40_8calculation_integer/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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.int1'] = "{% if rougail.bool %}1{% else %}2{% endif %}\n" -dict_env['default_1.rougail.int2'] = "{% if not rougail.bool %}3{% else %}4{% endif %}\n" -dict_env['default_2.rougail.int1'] = "{% if rougail.bool %}1{% else %}2{% endif %}\n" -dict_env['default_2.rougail.int2'] = "{% if not rougail.bool %}3{% else %}4{% endif %}\n" -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(['../rougail-tests/structures/40_8calculation_integer/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.int1"), 'rougail.bool': ParamOption(option_3, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/40_8calculation_integer/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.int2"), 'rougail.bool': ParamOption(option_3, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -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(['../rougail-tests/structures/40_8calculation_integer/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.int1"), 'rougail.bool': ParamOption(option_8, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/40_8calculation_integer/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.int2"), 'rougail.bool': ParamOption(option_8, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'number'}) -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/multi.py b/tests/dictionaries/40_8calculation_multi_variable/tiramisu/multi.py deleted file mode 100644 index daedb4f5e..000000000 --- a/tests/dictionaries/40_8calculation_multi_variable/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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)), kwargs={'__internal_multi': ParamValue(True)})), Calculation(func['calc_value'], Params((ParamOption(option_5)), kwargs={'__internal_multi': ParamValue(True)}))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_4)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), 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_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)), kwargs={'__internal_multi': ParamValue(True)})), Calculation(func['calc_value'], Params((ParamOption(option_10)), kwargs={'__internal_multi': ParamValue(True)}))], default_multi=Calculation(func['calc_value'], Params((ParamOption(option_9)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), 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/40_8calculation_multi_variable_parent/tiramisu/multi.py b/tests/dictionaries/40_8calculation_multi_variable_parent/tiramisu/multi.py deleted file mode 100644 index d81ff9b1e..000000000 --- a/tests/dictionaries/40_8calculation_multi_variable_parent/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/40_8calculation_multi_variable_parent2/tiramisu/multi.py deleted file mode 100644 index ede64da7b..000000000 --- a/tests/dictionaries/40_8calculation_multi_variable_parent2/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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="no", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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", 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", 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/multi.py b/tests/dictionaries/41_0choice_leader/tiramisu/multi.py deleted file mode 100644 index 4160ea7cb..000000000 --- a/tests/dictionaries/41_0choice_leader/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/tiramisu/multi.py b/tests/dictionaries/44_0leadership_hidden/tiramisu/multi.py deleted file mode 100644 index 6ff36f7e4..000000000 --- a/tests/dictionaries/44_0leadership_hidden/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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({"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/multi.py b/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/multi.py deleted file mode 100644 index 6ff36f7e4..000000000 --- a/tests/dictionaries/44_0leadership_leader_hidden/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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({"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_1leadership_append_hidden_follower/tiramisu/multi.py b/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/multi.py deleted file mode 100644 index 05ca3c194..000000000 --- a/tests/dictionaries/44_1leadership_append_hidden_follower/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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({"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_4disabled_calcultion_follower/tiramisu/multi.py b/tests/dictionaries/44_4disabled_calcultion_follower/tiramisu/multi.py deleted file mode 100644 index cd63752ac..000000000 --- a/tests/dictionaries/44_4disabled_calcultion_follower/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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 rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -dict_env['disabled_2.rougail.leader.follower'] = "{% if rougail.condition == \"yes\" %}\ncondition is yes\n{% endif %}\n" -option_3 = BoolOption(name="condition", doc="a condition", default=True, properties=frozenset({"mandatory", "standard"}), informations={'type': 'boolean'}) -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(['../rougail-tests/structures/44_4disabled_calcultion_follower/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, notraisepropertyerror=True)}), 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", 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(['../rougail-tests/structures/44_4disabled_calcultion_follower/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, notraisepropertyerror=True)}), 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", 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/multi.py b/tests/dictionaries/44_4leadership_mandatory/tiramisu/multi.py deleted file mode 100644 index 4c316419d..000000000 --- a/tests/dictionaries/44_4leadership_mandatory/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/multi.py b/tests/dictionaries/44_4leadership_mandatory_follower/tiramisu/multi.py deleted file mode 100644 index 9ad353277..000000000 --- a/tests/dictionaries/44_4leadership_mandatory_follower/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/tiramisu/multi.py b/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/multi.py deleted file mode 100644 index 319e22d6a..000000000 --- a/tests/dictionaries/44_5leadership_leader_hidden_calculation/tiramisu/multi.py +++ /dev/null @@ -1,31 +0,0 @@ -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('../rougail-tests/funcs/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.leader.leader'] = "{% if __.condition == \"no\" %}\ncondition is no\n{% endif %}\n" -dict_env['frozen_1.rougail.leader.follower'] = "{% if __.condition == \"no\" %}\ncondition is no\n{% endif %}\n" -dict_env['hidden_1.rougail.leader.leader'] = "{% if __.condition == \"no\" %}\ncondition is no\n{% endif %}\n" -dict_env['frozen_2.rougail.leader.leader'] = "{% if __.condition == \"no\" %}\ncondition is no\n{% endif %}\n" -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({"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(['../rougail-tests/structures/44_5leadership_leader_hidden_calculation/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/44_5leadership_leader_hidden_calculation/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/44_5leadership_leader_hidden_calculation/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, notraisepropertyerror=True)}), 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({"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({"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(['../rougail-tests/structures/44_5leadership_leader_hidden_calculation/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/44_5leadership_leader_hidden_calculation/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, notraisepropertyerror=True)}), 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(['../rougail-tests/structures/44_5leadership_leader_hidden_calculation/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, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])})) -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/multi.py b/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/multi.py deleted file mode 100644 index 3b753a267..000000000 --- a/tests/dictionaries/44_6leadership_follower_disabled_calculation/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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\" %}\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(['../rougail-tests/structures/44_6leadership_follower_disabled_calculation/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, notraisepropertyerror=True)}), 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", 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(['../rougail-tests/structures/44_6leadership_follower_disabled_calculation/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, notraisepropertyerror=True)}), 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", 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_9calculated_default_leadership_leader/makedict/after.json b/tests/dictionaries/44_9calculated_default_leadership_leader/makedict/after.json index a20cae471..51d3a58e2 100644 --- a/tests/dictionaries/44_9calculated_default_leadership_leader/makedict/after.json +++ b/tests/dictionaries/44_9calculated_default_leadership_leader/makedict/after.json @@ -12,7 +12,7 @@ "default" ], "value": [ - "cannot access to option \"a follower\" because has property \"disabled\" (the value of \"leader\" is \"a\")", + "ne peut acc\u00e9der \u00e0 l'option \"a follower\" \u00e0 cause de la propri\u00e9t\u00e9 \"disabled\" (the value of \"leader\" is \"a\")", "b" ] } diff --git a/tests/dictionaries/44_9calculated_default_leadership_leader/makedict/before.json b/tests/dictionaries/44_9calculated_default_leadership_leader/makedict/before.json index a20cae471..51d3a58e2 100644 --- a/tests/dictionaries/44_9calculated_default_leadership_leader/makedict/before.json +++ b/tests/dictionaries/44_9calculated_default_leadership_leader/makedict/before.json @@ -12,7 +12,7 @@ "default" ], "value": [ - "cannot access to option \"a follower\" because has property \"disabled\" (the value of \"leader\" is \"a\")", + "ne peut acc\u00e9der \u00e0 l'option \"a follower\" \u00e0 cause de la propri\u00e9t\u00e9 \"disabled\" (the value of \"leader\" is \"a\")", "b" ] } diff --git a/tests/dictionaries/44_9calculated_default_leadership_leader/tiramisu/multi.py b/tests/dictionaries/44_9calculated_default_leadership_leader/tiramisu/multi.py deleted file mode 100644 index b20927a71..000000000 --- a/tests/dictionaries/44_9calculated_default_leadership_leader/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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 _.leader == \"a\" %}\nthe value of \"leader\" is \"a\"\n{% endif %}\n" -dict_env['disabled_2.rougail.leader.follower'] = "{% if _.leader == \"a\" %}\nthe value of \"leader\" is \"a\"\n{% endif %}\n" -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(['../rougail-tests/structures/44_9calculated_default_leadership_leader/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, notraisepropertyerror=True)}), 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", 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(['../rougail-tests/structures/44_9calculated_default_leadership_leader/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, notraisepropertyerror=True)}), 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", 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/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic/tiramisu/multi.py deleted file mode 100644 index 34f484601..000000000 --- a/tests/dictionaries/60_0family_dynamic/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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{{ 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_1_0/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_1_0/tiramisu/multi.py deleted file mode 100644 index f619bf04e..000000000 --- a/tests/dictionaries/60_0family_dynamic_1_0/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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': '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="vardyn", doc="Dynamic variable", properties=frozenset({"standard"}), informations={'type': 'string'}) -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': '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_1_0_empty/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_1_0_empty/tiramisu/multi.py deleted file mode 100644 index 15f0b6619..000000000 --- a/tests/dictionaries/60_0family_dynamic_1_0_empty/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_5 = StrOption(name="vardyn", doc="Dynamic variable", properties=frozenset({"standard"}), informations={'type': 'string'}) -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': '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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_10 = StrOption(name="vardyn", doc="Dynamic variable", properties=frozenset({"standard"}), informations={'type': 'string'}) -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': '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_1_0_type/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_1_0_type/tiramisu/multi.py deleted file mode 100644 index 7150f473a..000000000 --- a/tests/dictionaries/60_0family_dynamic_1_0_type/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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': '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 dyn variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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': '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_0_type_empty/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_1_0_type_empty/tiramisu/multi.py deleted file mode 100644 index 77303ad1d..000000000 --- a/tests/dictionaries/60_0family_dynamic_1_0_type_empty/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_5 = StrOption(name="vardyn", doc="A dyn variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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': '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({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_10 = StrOption(name="vardyn", doc="A dyn variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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': '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/multi.py b/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/multi.py deleted file mode 100644 index 0ded7c3f6..000000000 --- a/tests/dictionaries/60_0family_dynamic_1_1/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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{{ 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_empty/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_1_1_empty/tiramisu/multi.py deleted file mode 100644 index 4027bfc51..000000000 --- a/tests/dictionaries/60_0family_dynamic_1_1_empty/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_5 = StrOption(name="vardyn", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_10 = StrOption(name="vardyn", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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_empty/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_empty/tiramisu/multi.py deleted file mode 100644 index 0750c070f..000000000 --- a/tests/dictionaries/60_0family_dynamic_empty/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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({"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{{ 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, properties=frozenset({"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{{ 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_jinja_number/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_jinja_number/tiramisu/multi.py deleted file mode 100644 index 2aa0f82cd..000000000 --- a/tests/dictionaries/60_0family_dynamic_jinja_number/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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'] = "{{ 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{{ 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(['../rougail-tests/structures/60_0family_dynamic_jinja_number/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'rougail.dyn1.var': ParamDynOption(option_5, ["1"], optional=True, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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{{ 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(['../rougail-tests/structures/60_0family_dynamic_jinja_number/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'rougail.dyn1.var': ParamDynOption(option_11, ["1"], optional=True, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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_jinja_number_empty/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_jinja_number_empty/tiramisu/multi.py deleted file mode 100644 index 56248da9c..000000000 --- a/tests/dictionaries/60_0family_dynamic_jinja_number_empty/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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'] = "{% if rougail.dyn1 is defined %}\n{{ rougail.dyn1.var }}\n{% endif %}\n" -dict_env['default_2.rougail.var2'] = "{% if rougail.dyn1 is defined %}\n{{ rougail.dyn1.var }}\n{% endif %}\n" -option_3 = IntOption(name="var", doc="a suffix variable", multi=True, properties=frozenset({"standard"}), informations={'type': 'number', 'test': (1, 2)}) -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{{ 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(['../rougail-tests/structures/60_0family_dynamic_jinja_number_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), 'rougail.dyn1.var': ParamDynOption(option_5, ["1"], optional=True, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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, properties=frozenset({"standard"}), informations={'type': 'number', 'test': (1, 2)}) -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{{ 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(['../rougail-tests/structures/60_0family_dynamic_jinja_number_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), 'rougail.dyn1.var': ParamDynOption(option_11, ["1"], optional=True, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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_no_description/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_no_description/tiramisu/multi.py deleted file mode 100644 index f94300adc..000000000 --- a/tests/dictionaries/60_0family_dynamic_no_description/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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="var", properties=frozenset({"basic", "mandatory"}), 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({"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="var", properties=frozenset({"basic", "mandatory"}), 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({"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_no_description_empty/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_no_description_empty/tiramisu/multi.py deleted file mode 100644 index bdaf67fa6..000000000 --- a/tests/dictionaries/60_0family_dynamic_no_description_empty/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_5 = StrOption(name="var", doc="var", properties=frozenset({"basic", "mandatory"}), 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({"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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_10 = StrOption(name="var", doc="var", properties=frozenset({"basic", "mandatory"}), 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({"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_static/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_static/tiramisu/multi.py deleted file mode 100644 index 80906f6f8..000000000 --- a/tests/dictionaries/60_0family_dynamic_static/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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{{ 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_test/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_test/tiramisu/multi.py deleted file mode 100644 index b8b9c2283..000000000 --- a/tests/dictionaries/60_0family_dynamic_test/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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', 'test': ('val1', 'val2')}) -option_5 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), 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({"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, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_10 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), 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({"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_variable_empty/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/multi.py deleted file mode 100644 index 2f354b96d..000000000 --- a/tests/dictionaries/60_0family_dynamic_variable_empty/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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{{ 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_suffix/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/multi.py deleted file mode 100644 index c2f47e9b2..000000000 --- a/tests/dictionaries/60_0family_dynamic_variable_suffix/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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 {{ 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 {{ 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_empty/tiramisu/multi.py b/tests/dictionaries/60_0family_dynamic_variable_suffix_empty/tiramisu/multi.py deleted file mode 100644 index 48082fca6..000000000 --- a/tests/dictionaries/60_0family_dynamic_variable_suffix_empty/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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', 'test': ('val1', 'val2')}) -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({"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', 'test': ('val1', 'val2')}) -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({"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_empty/tiramisu/multi.py b/tests/dictionaries/60_0family_empty/tiramisu/multi.py deleted file mode 100644 index 614668d43..000000000 --- a/tests/dictionaries/60_0family_empty/tiramisu/multi.py +++ /dev/null @@ -1,15 +0,0 @@ -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('../rougail-tests/funcs/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="1", doc="1", children=[], properties=frozenset({"advanced"})) -optiondescription_4 = OptionDescription(name="2", doc="2", children=[], properties=frozenset({"advanced"})) -option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) diff --git a/tests/dictionaries/60_0family_hidden/tiramisu/multi.py b/tests/dictionaries/60_0family_hidden/tiramisu/multi.py deleted file mode 100644 index d9c8597cb..000000000 --- a/tests/dictionaries/60_0family_hidden/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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({"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_mode/tiramisu/multi.py b/tests/dictionaries/60_0family_mode/tiramisu/multi.py deleted file mode 100644 index a48eac9a3..000000000 --- a/tests/dictionaries/60_0family_mode/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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", 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", 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/tiramisu/multi.py b/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/multi.py deleted file mode 100644 index ec929146b..000000000 --- a/tests/dictionaries/60_1family_dynamic_jinja/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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{{ 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(['../rougail-tests/structures/60_1family_dynamic_jinja/rougail/00-base.yml']), '__internal_attribute': ParamValue("dynamic"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}"), '_.var': ParamOption(option_3, notraisepropertyerror=True)})), 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{{ 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(['../rougail-tests/structures/60_1family_dynamic_jinja/rougail/00-base.yml']), '__internal_attribute': ParamValue("dynamic"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}"), '_.var': ParamOption(option_8, notraisepropertyerror=True)})), 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_2family_dynamic_jinja_fill_sub_group/tiramisu/multi.py b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/multi.py deleted file mode 100644 index 67b61acc1..000000000 --- a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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="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{{ 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(['../rougail-tests/structures/60_2family_dynamic_jinja_fill_sub_group/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_6, ["val1"], optional=True, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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{{ 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(['../rougail-tests/structures/60_2family_dynamic_jinja_fill_sub_group/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_13, ["val1"], optional=True, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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_2/tiramisu/multi.py b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/multi.py deleted file mode 100644 index b19af126a..000000000 --- a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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 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{{ 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(['../rougail-tests/structures/60_2family_dynamic_jinja_fill_sub_group_2/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_6, ["val1"], optional=True, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "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 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{{ 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(['../rougail-tests/structures/60_2family_dynamic_jinja_fill_sub_group_2/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_13, ["val1"], optional=True, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "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_2family_dynamic_jinja_fill_sub_group_2_empty/tiramisu/multi.py b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2_empty/tiramisu/multi.py deleted file mode 100644 index 5a80e98dc..000000000 --- a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_2_empty/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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'] = "{% if _.dynval1 is defined %}\n{{ _.dynval1.family.var }}\n{% endif %}\n" -dict_env['default_2.rougail.var2'] = "{% if _.dynval1 is defined %}\n{{ _.dynval1.family.var }}\n{% endif %}\n" -option_3 = StrOption(name="var", doc="a identifier variable", multi=True, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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{{ 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(['../rougail-tests/structures/60_2family_dynamic_jinja_fill_sub_group_2_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_6, ["val1"], optional=True, notraisepropertyerror=True)})), 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 identifier variable", multi=True, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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{{ 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(['../rougail-tests/structures/60_2family_dynamic_jinja_fill_sub_group_2_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_13, ["val1"], optional=True, notraisepropertyerror=True)})), 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_2family_dynamic_jinja_fill_sub_group_empty/tiramisu/multi.py b/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_empty/tiramisu/multi.py deleted file mode 100644 index a099f4976..000000000 --- a/tests/dictionaries/60_2family_dynamic_jinja_fill_sub_group_empty/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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'] = "{% if _.dynval1 is defined %}\n{{ _.dynval1.family.var }}\n{% endif %}\n" -dict_env['default_2.rougail.var2'] = "{% if _.dynval1 is defined %}\n{{ _.dynval1.family.var }}\n{% endif %}\n" -option_3 = StrOption(name="var1", doc="a suffix variable", multi=True, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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{{ 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(['../rougail-tests/structures/60_2family_dynamic_jinja_fill_sub_group_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_6, ["val1"], optional=True, notraisepropertyerror=True)})), 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({"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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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{{ 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(['../rougail-tests/structures/60_2family_dynamic_jinja_fill_sub_group_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.var2"), '_.dynval1.family.var': ParamDynOption(option_13, ["val1"], optional=True, notraisepropertyerror=True)})), 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({"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_outside_calc/tiramisu/multi.py b/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/multi.py deleted file mode 100644 index 00a20605d..000000000 --- a/tests/dictionaries/60_2family_dynamic_outside_calc/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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.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{{ 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(['../rougail-tests/structures/60_2family_dynamic_outside_calc/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.newvar"), '_.dynval1.var': ParamDynOption(option_5, ["val1"], optional=True, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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{{ 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(['../rougail-tests/structures/60_2family_dynamic_outside_calc/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.newvar"), '_.dynval1.var': ParamDynOption(option_11, ["val1"], optional=True, notraisepropertyerror=True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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_empty/tiramisu/multi.py b/tests/dictionaries/60_2family_dynamic_outside_calc_empty/tiramisu/multi.py deleted file mode 100644 index 2a43f6154..000000000 --- a/tests/dictionaries/60_2family_dynamic_outside_calc_empty/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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.newvar'] = "{% if _.dynval1 is defined %}\n{{ _.dynval1.var }}\n{% endif %}\n" -dict_env['default_2.rougail.newvar'] = "{% if _.dynval1 is defined %}\n{{ _.dynval1.var }}\n{% endif %}\n" -option_3 = StrOption(name="var1", doc="a suffx variable", multi=True, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_5 = StrOption(name="var", doc="a dynamic variable", default="val", 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.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(['../rougail-tests/structures/60_2family_dynamic_outside_calc_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.newvar"), '_.dynval1.var': ParamDynOption(option_5, ["val1"], optional=True, notraisepropertyerror=True)})), properties=frozenset({"standard"}), informations={'type': 'string'}) -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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_11 = StrOption(name="var", doc="a dynamic variable", default="val", 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.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(['../rougail-tests/structures/60_2family_dynamic_outside_calc_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.newvar"), '_.dynval1.var': ParamDynOption(option_11, ["val1"], optional=True, notraisepropertyerror=True)})), properties=frozenset({"standard"}), informations={'type': 'string'}) -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_calc2/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc2/tiramisu/multi.py deleted file mode 100644 index 822cca35f..000000000 --- a/tests/dictionaries/60_5family_dynamic_calc2/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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{{ identifier }}.vardyn'] = "{% if _.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" -dict_env['hidden_1.rougail.dyn{{ identifier }}'] = "{% if _.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" -dict_env['frozen_2.rougail.dyn{{ identifier }}.vardyn'] = "{% if _.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" -dict_env['hidden_2.rougail.dyn{{ identifier }}'] = "{% if _.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{{ identifier }}.vardyn"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['../rougail-tests/structures/60_5family_dynamic_calc2/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}.vardyn"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var2': ParamOption(option_4, notraisepropertyerror=True)}), 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)))), 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(['../rougail-tests/structures/60_5family_dynamic_calc2/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var2': ParamOption(option_4, notraisepropertyerror=True)}), 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{{ identifier }}.vardyn"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['../rougail-tests/structures/60_5family_dynamic_calc2/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}.vardyn"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var2': ParamOption(option_10, notraisepropertyerror=True)}), 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)))), 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(['../rougail-tests/structures/60_5family_dynamic_calc2/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var2': ParamOption(option_10, notraisepropertyerror=True)}), 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_calc2_empty/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc2_empty/tiramisu/multi.py deleted file mode 100644 index dcbd3be0e..000000000 --- a/tests/dictionaries/60_5family_dynamic_calc2_empty/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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{{ identifier }}.vardyn'] = "{% if _.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" -dict_env['hidden_1.rougail.dyn{{ identifier }}'] = "{% if _.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" -dict_env['frozen_2.rougail.dyn{{ identifier }}.vardyn'] = "{% if _.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" -dict_env['hidden_2.rougail.dyn{{ identifier }}'] = "{% if _.var2 == \"no\" %}\nvar2 is no\n{% endif %}\n" -option_3 = StrOption(name="var", doc="A suffix variable", multi=True, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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{{ identifier }}.vardyn"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['../rougail-tests/structures/60_5family_dynamic_calc2_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}.vardyn"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var2': ParamOption(option_4, notraisepropertyerror=True)}), 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)))), 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(['../rougail-tests/structures/60_5family_dynamic_calc2_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var2': ParamOption(option_4, notraisepropertyerror=True)}), 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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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{{ identifier }}.vardyn"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['../rougail-tests/structures/60_5family_dynamic_calc2_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}.vardyn"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var2': ParamOption(option_10, notraisepropertyerror=True)}), 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)))), 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(['../rougail-tests/structures/60_5family_dynamic_calc2_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.var2': ParamOption(option_10, notraisepropertyerror=True)}), 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/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_suffix/tiramisu/multi.py deleted file mode 100644 index 762078d7f..000000000 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), 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", 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{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_9)))), 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", 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/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/multi.py deleted file mode 100644 index 3ac228f01..000000000 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix2/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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((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((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_empty/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_suffix2_empty/tiramisu/multi.py deleted file mode 100644 index 59bb9f6af..000000000 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix2_empty/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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_suffix_disabled/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/tiramisu/multi.py deleted file mode 100644 index 65399c73f..000000000 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix_disabled/tiramisu/multi.py +++ /dev/null @@ -1,21 +0,0 @@ -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('../rougail-tests/funcs/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"), 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"), 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_empty/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_suffix_empty/tiramisu/multi.py deleted file mode 100644 index a357f9fb3..000000000 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix_empty/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_5 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), 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"], optional=True)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_11 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -optiondescription_10 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_9)))), 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"], optional=True)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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_suffix_param/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/multi.py deleted file mode 100644 index b8ec956b5..000000000 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix_param/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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(['../rougail-tests/structures/60_5family_dynamic_calc_suffix_param/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 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(['../rougail-tests/structures/60_5family_dynamic_calc_suffix_param/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_empty/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_suffix_param_empty/tiramisu/multi.py deleted file mode 100644 index 23069b4fb..000000000 --- a/tests/dictionaries/60_5family_dynamic_calc_suffix_param_empty/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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(['../rougail-tests/structures/60_5family_dynamic_calc_suffix_param_empty/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 identifier variable", multi=True, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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(['../rougail-tests/structures/60_5family_dynamic_calc_suffix_param_empty/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_variable/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/multi.py deleted file mode 100644 index a5141f67e..000000000 --- a/tests/dictionaries/60_5family_dynamic_calc_variable/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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", 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{{ 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", 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_empty/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_calc_variable_empty/tiramisu/multi.py deleted file mode 100644 index 828576819..000000000 --- a/tests/dictionaries/60_5family_dynamic_calc_variable_empty/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_5 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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"], optional=True)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_11 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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"], optional=True)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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_hidden_suffix/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/multi.py deleted file mode 100644 index ec6d1af5f..000000000 --- a/tests/dictionaries/60_5family_dynamic_hidden_suffix/tiramisu/multi.py +++ /dev/null @@ -1,31 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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(['../rougail-tests/structures/60_5family_dynamic_hidden_suffix/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(['../rougail-tests/structures/60_5family_dynamic_hidden_suffix/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(['../rougail-tests/structures/60_5family_dynamic_hidden_suffix/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(['../rougail-tests/structures/60_5family_dynamic_hidden_suffix/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(['../rougail-tests/structures/60_5family_dynamic_hidden_suffix/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(['../rougail-tests/structures/60_5family_dynamic_hidden_suffix/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_unknown_suffix/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_unknown_suffix/tiramisu/multi.py deleted file mode 100644 index 00c4196d4..000000000 --- a/tests/dictionaries/60_5family_dynamic_unknown_suffix/tiramisu/multi.py +++ /dev/null @@ -1,31 +0,0 @@ -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('../rougail-tests/funcs/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.{{ 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.{{ identifier }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['../rougail-tests/structures/60_5family_dynamic_unknown_suffix/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, notraisepropertyerror=True)}), 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', '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.{{ identifier }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['../rougail-tests/structures/60_5family_dynamic_unknown_suffix/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, notraisepropertyerror=True)}), 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_unknown_suffix_empty/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_unknown_suffix_empty/tiramisu/multi.py deleted file mode 100644 index 8a4dda90d..000000000 --- a/tests/dictionaries/60_5family_dynamic_unknown_suffix_empty/tiramisu/multi.py +++ /dev/null @@ -1,31 +0,0 @@ -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('../rougail-tests/funcs/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.{{ 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, properties=frozenset({"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.{{ identifier }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['../rougail-tests/structures/60_5family_dynamic_unknown_suffix_empty/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, notraisepropertyerror=True)}), 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, properties=frozenset({"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.{{ identifier }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['../rougail-tests/structures/60_5family_dynamic_unknown_suffix_empty/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, notraisepropertyerror=True)}), 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/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside/tiramisu/multi.py deleted file mode 100644 index df37dae41..000000000 --- a/tests/dictionaries/60_5family_dynamic_variable_outside/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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((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)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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((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)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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_outside2/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside2/tiramisu/multi.py deleted file mode 100644 index 69d422897..000000000 --- a/tests/dictionaries/60_5family_dynamic_variable_outside2/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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_6 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"standard"}), informations={'type': 'string'}) -option_3 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_6)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_5 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_4)))), children=[option_6], properties=frozenset({"standard"}), 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({"standard"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) -option_12 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"standard"}), informations={'type': 'string'}) -option_9 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_12)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_10 = StrOption(name="var", doc="a suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -optiondescription_11 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_10)))), children=[option_12], properties=frozenset({"standard"}), 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({"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_outside2_empty/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside2_empty/tiramisu/multi.py deleted file mode 100644 index 0c39e1c76..000000000 --- a/tests/dictionaries/60_5family_dynamic_variable_outside2_empty/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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_6 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"standard"}), informations={'type': 'string'}) -option_3 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_6)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_4 = StrOption(name="var", doc="a suffix variable", multi=True, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -optiondescription_5 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_4)))), children=[option_6], properties=frozenset({"standard"}), 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({"standard"})) -optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) -option_12 = StrOption(name="var", doc="a variable inside a dynamic family", default=Calculation(func['calc_value'], Params((ParamIdentifier()))), properties=frozenset({"standard"}), informations={'type': 'string'}) -option_9 = StrOption(name="var2", doc="a variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_12)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -option_10 = StrOption(name="var", doc="a suffix variable", multi=True, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -optiondescription_11 = ConvertDynOptionDescription(name="my_dyn_family_{{ identifier }}", doc="a dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_10)))), children=[option_12], properties=frozenset({"standard"}), 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({"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_empty/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside_empty/tiramisu/multi.py deleted file mode 100644 index 5173c81cd..000000000 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_empty/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'}) -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/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/tiramisu/multi.py deleted file mode 100644 index fd62d03d7..000000000 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_jinja/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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((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(['../rougail-tests/structures/60_5family_dynamic_variable_outside_jinja/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", 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((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(['../rougail-tests/structures/60_5family_dynamic_variable_outside_jinja/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", 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_empty/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside_jinja_empty/tiramisu/multi.py deleted file mode 100644 index fccbdfa47..000000000 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_jinja_empty/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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(['../rougail-tests/structures/60_5family_dynamic_variable_outside_jinja_empty/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", 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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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(['../rougail-tests/structures/60_5family_dynamic_variable_outside_jinja_empty/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", 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/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/tiramisu/multi.py deleted file mode 100644 index 784feb20d..000000000 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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((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': 'rougail.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])), kwargs={'__internal_multi': ParamValue(True)})), 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((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': 'rougail.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])), kwargs={'__internal_multi': ParamValue(True)})), 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_sub_suffix_empty/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix_empty/tiramisu/multi.py deleted file mode 100644 index d673fdb1b..000000000 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_sub_suffix_empty/tiramisu/multi.py +++ /dev/null @@ -1,27 +0,0 @@ -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('../rougail-tests/funcs/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({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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': 'rougail.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], optional=True)), kwargs={'__internal_multi': ParamValue(True)})), 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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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': 'rougail.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], optional=True)), kwargs={'__internal_multi': ParamValue(True)})), 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/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/multi.py deleted file mode 100644 index 017822563..000000000 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_suffix/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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((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", 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((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", 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_empty/tiramisu/multi.py b/tests/dictionaries/60_5family_dynamic_variable_outside_suffix_empty/tiramisu/multi.py deleted file mode 100644 index c26fe9b8f..000000000 --- a/tests/dictionaries/60_5family_dynamic_variable_outside_suffix_empty/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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="asuffix variable", multi=True, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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"], optional=True)))), properties=frozenset({"standard"}), informations={'type': 'string'}) -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="asuffix variable", multi=True, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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"], optional=True)))), properties=frozenset({"standard"}), informations={'type': 'string'}) -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_6family_dynamic_inside/tiramisu/multi.py b/tests/dictionaries/60_6family_dynamic_inside/tiramisu/multi.py deleted file mode 100644 index b25722748..000000000 --- a/tests/dictionaries/60_6family_dynamic_inside/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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((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="{{ 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((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="{{ 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_inside_empty/tiramisu/multi.py b/tests/dictionaries/60_6family_dynamic_inside_empty/tiramisu/multi.py deleted file mode 100644 index c7a9bb4f7..000000000 --- a/tests/dictionaries/60_6family_dynamic_inside_empty/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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="{{ 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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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="{{ 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/tiramisu/multi.py b/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/multi.py deleted file mode 100644 index 16e723898..000000000 --- a/tests/dictionaries/60_6family_dynamic_leadership/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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{{ 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{{ 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_empty/tiramisu/multi.py b/tests/dictionaries/60_6family_dynamic_leadership_empty/tiramisu/multi.py deleted file mode 100644 index 503ba4b08..000000000 --- a/tests/dictionaries/60_6family_dynamic_leadership_empty/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -option_6 = StrOption(name="leader", doc="a leader", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'}) -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{{ 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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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{{ 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_sub_dynamic/tiramisu/multi.py b/tests/dictionaries/60_6family_dynamic_sub_dynamic/tiramisu/multi.py deleted file mode 100644 index a17d78cf6..000000000 --- a/tests/dictionaries/60_6family_dynamic_sub_dynamic/tiramisu/multi.py +++ /dev/null @@ -1,35 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}.var"), '__.var': ParamOption(option_3, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic/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': 'rougail.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 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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}.var"), '__.var': ParamOption(option_12, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic/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': 'rougail.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_6family_dynamic_sub_dynamic_1_0/tiramisu/multi.py b/tests/dictionaries/60_6family_dynamic_sub_dynamic_1_0/tiramisu/multi.py deleted file mode 100644 index 5e83b5d39..000000000 --- a/tests/dictionaries/60_6family_dynamic_sub_dynamic_1_0/tiramisu/multi.py +++ /dev/null @@ -1,35 +0,0 @@ -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('../rougail-tests/funcs/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{{ identifier }}.var'] = "{% for val in rougail.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 rougail.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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic_1_0/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}.var"), 'rougail.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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic_1_0/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, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_7, option_8, option_9], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.dyn{{ identifier }}.var'}) -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, optiondescription_6], properties=frozenset({"standard"}), informations={'dynamic_variable': '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 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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic_1_0/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}.var"), 'rougail.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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic_1_0/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, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_16, option_17, option_18], properties=frozenset({"standard"}), informations={'dynamic_variable': 'rougail.dyn{{ identifier }}.var'}) -optiondescription_13 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_12, notraisepropertyerror=True)), kwargs={'allow_none': ParamValue(True)})), children=[option_14, optiondescription_15], properties=frozenset({"standard"}), informations={'dynamic_variable': '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_6family_dynamic_sub_dynamic_empty/tiramisu/multi.py b/tests/dictionaries/60_6family_dynamic_sub_dynamic_empty/tiramisu/multi.py deleted file mode 100644 index dc7d0f921..000000000 --- a/tests/dictionaries/60_6family_dynamic_sub_dynamic_empty/tiramisu/multi.py +++ /dev/null @@ -1,35 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("1.rougail.dyn{{ identifier }}.var"), '__.var': ParamOption(option_3, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic_empty/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': 'rougail.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 identifier variable", multi=True, properties=frozenset({"standard"}), informations={'type': 'string', 'test': ('val1', 'val2')}) -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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic_empty/rougail/00-base.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("2.rougail.dyn{{ identifier }}.var"), '__.var': ParamOption(option_12, notraisepropertyerror=True)})), 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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic_empty/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': 'rougail.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_6family_dynamic_sub_dynamic_empty2/tiramisu/multi.py b/tests/dictionaries/60_6family_dynamic_sub_dynamic_empty2/tiramisu/multi.py deleted file mode 100644 index 1c260f27b..000000000 --- a/tests/dictionaries/60_6family_dynamic_sub_dynamic_empty2/tiramisu/multi.py +++ /dev/null @@ -1,33 +0,0 @@ -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('../rougail-tests/funcs/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{{ identifier }}.dyn_{{ identifier }}.var_identifiers'] = "{{ s1 }}-{{ s2 }}\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({"standard"}), informations={'type': 'string'}) -option_5 = StrOption(name="var", doc="A dynamic variable", multi=True, properties=frozenset({"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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic_empty2/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': 'rougail.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 identifier variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"standard"}), informations={'type': 'string'}) -option_14 = StrOption(name="var", doc="A dynamic variable", multi=True, properties=frozenset({"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(['../rougail-tests/structures/60_6family_dynamic_sub_dynamic_empty2/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': 'rougail.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/tiramisu/multi.py b/tests/dictionaries/60_9extra_dynamic/tiramisu/multi.py deleted file mode 100644 index d76e13308..000000000 --- a/tests/dictionaries/60_9extra_dynamic/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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", 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_{{ identifier }}", doc="dyn_{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_6], properties=frozenset({"basic"}), informations={'dynamic_variable': 'rougail.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", 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_{{ identifier }}", doc="dyn_{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_9)))), children=[option_12], properties=frozenset({"basic"}), informations={'dynamic_variable': 'rougail.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/tiramisu/multi.py b/tests/dictionaries/60_9extra_dynamic_extra/tiramisu/multi.py deleted file mode 100644 index c0ba7848b..000000000 --- a/tests/dictionaries/60_9extra_dynamic_extra/tiramisu/multi.py +++ /dev/null @@ -1,29 +0,0 @@ -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('../rougail-tests/funcs/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", 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_{{ 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", 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_{{ 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/tiramisu/multi.py b/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/multi.py deleted file mode 100644 index 803cea325..000000000 --- a/tests/dictionaries/60_9family_dynamic_calc_both/tiramisu/multi.py +++ /dev/null @@ -1,23 +0,0 @@ -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('../rougail-tests/funcs/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{{ 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{{ 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/68_0family_leadership_mode/tiramisu/multi.py b/tests/dictionaries/68_0family_leadership_mode/tiramisu/multi.py deleted file mode 100644 index a316e1e8a..000000000 --- a/tests/dictionaries/68_0family_leadership_mode/tiramisu/multi.py +++ /dev/null @@ -1,25 +0,0 @@ -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('../rougail-tests/funcs/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"}), informations={'type': 'string'}) -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", 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", 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/test_upgrade.py b/tests/test_upgrade.py deleted file mode 100644 index f37d363c0..000000000 --- a/tests/test_upgrade.py +++ /dev/null @@ -1,132 +0,0 @@ -from shutil import rmtree #, copyfile, copytree -from os import getcwd, makedirs -from os.path import isfile, join, isdir -from pytest import fixture, raises -from os import listdir -from json import load - -from rougail import RougailUpgrade, RougailConfig -from rougail.error import DictConsistencyError - -#================================================ -class Variable: - description: str -#================================================ -#================================================ - - -dico_dirs = 'tests/dictionaries_old' -dest_dir = 'tmp' - - -test_ok = set() - -for test in listdir(dico_dirs): - if isdir(join(dico_dirs, test)): - test_ok.add(test) - -excludes = set([]) -test_ok -= excludes -#test_ok = ['10load_disabled_if_in_fill'] - -ORI_DIR = getcwd() - -debug = False -#debug = True - -test_ok = list(test_ok) -test_ok.sort() -if isdir(dest_dir): - rmtree(dest_dir) -makedirs(dest_dir) -#copyfile(join(dico_dirs, '__init__.py'), join(dest_dir, '__init__.py')) -#RougailConfig['variable_namespace'] = 'configuration' - - -@fixture(scope="module", params=test_ok) -def test_dir(request): - return request.param - - -def launch_test(test_dir, ext): - result_dest_dir = join(dico_dirs, test_dir.rsplit('/', 1)[1], 'result') - new_dest_dir = join(dico_dirs, test_dir.rsplit('/', 1)[1], dest_dir) - #FIXME - if isdir(new_dest_dir): - rmtree(new_dest_dir) - makedirs(join(new_dest_dir, 'rougail')) - rougailconfig = RougailConfig.copy() - rougailconfig['upgrade'] = True - # rougailconfig_dest = RougailConfig.copy() - # rougailconfig_dest['functions_files'] = [join(dico_dirs, '../eosfunc/test.py')] - rougailconfig['main_dictionaries'] = [join(test_dir, 'xml')] - upgrade_dir = join(new_dest_dir, 'rougail') - rougailconfig["upgrade_options.main_dictionaries"] = [upgrade_dir] - # rougailconfig_dest['main_dictionaries'] = [join(new_dest_dir, 'rougail')] - extra_dictionaries = {} - if isdir(join(test_dir, ext, 'extra_dirs')): - extras = listdir(join(test_dir, ext, 'extra_dirs')) - extras.sort() - for extra in extras: - subfolder = join(test_dir, ext, 'extra_dirs', extra) - if isdir(subfolder): - extra_dictionaries[extra] = [subfolder] - makedirs(join(new_dest_dir, 'extra')) - if extra_dictionaries: - rougailconfig['extra_dictionaries'] = extra_dictionaries - rougailconfig["upgrade_options.extra_dictionary"] = join(new_dest_dir, 'extra') - # rougailconfig_dest['extra_dictionaries'] = extra_dictionaries - upgrade = RougailUpgrade(rougailconfig=rougailconfig) -# upgrade.load_dictionaries(join(new_dest_dir, 'rougail'), -# extra_dstfolder=new_dest_dir, -# services_dstfolder=join(new_dest_dir, 'services'), -# ) - upgrade.run() - ori_lists = set() - find_files(result_dest_dir, - [], - ori_lists, - ) - new_lists = set() - find_files(new_dest_dir, - [], - new_lists, - ) - assert ori_lists == new_lists - for file in ori_lists: - ori_filename = join(result_dest_dir, file) - src_filename = join(new_dest_dir, file) - with open(ori_filename) as fh: - ori_file = fh.read() - with open(src_filename) as fh: - src_file = fh.read() - assert ori_file == src_file, f'file {ori_filename} and {src_filename} are differents' - # - rmtree(new_dest_dir) - - -def find_files(dirname: str, - root: list, - files: set, - ) -> None: - for filename in listdir(dirname): - if filename.startswith('.'): - continue - abs_dirname = join(dirname, filename) - root_file = root + [filename] - if isdir(join(dirname, filename)): - find_files(abs_dirname, - root_file, - files, - ) - else: - files.add(join(*root_file)) - - -def test_dictionary(test_dir): - assert getcwd() == ORI_DIR - test_dir = join(dico_dirs, test_dir) -# FIXME for ext in ['xml', 'yml']: -# launch_test(test_dir, ext) - launch_test(test_dir, 'xml') - assert getcwd() == ORI_DIR