rougail/tests/dictionaries/02fill_multi_calc_val/tiramisu/base.py

21 lines
1.0 KiB
Python
Raw Normal View History

from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
class func:
pass
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
_spec = _spec_from_loader(_loader.name, _loader)
_func = _module_from_spec(_spec)
_loader.exec_module(_func)
for function in dir(_func):
if function.startswith('_'):
continue
setattr(func, function, getattr(_func, function))
2021-03-19 10:05:50 +01:00
try:
from tiramisu3 import *
except:
from tiramisu import *
option_2 = StrOption(name="var1", doc="var1", default="no", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="var2", doc="var2", multi=True, default=Calculation(func.calc_value, Params((ParamOption(option_2)), kwargs={'multi': ParamValue(True)})), properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])