6.1.1.2.1.1.1.2.1.3. pycropml.transpiler.antlr_py.bioma.run2 module

pycropml.transpiler.antlr_py.bioma.run2.create_package(output)[source]
pycropml.transpiler.antlr_py.bioma.run2.inst_dclass(meth)[source]
pycropml.transpiler.antlr_py.bioma.run2.redefine_params(m: Node, var_: Tuple, member_category, inputs, outputs) List[Node][source]

It allows to change all parameters which are instance of domain class with the explicit attributes required

Parameters:
  • m (Node) – Auxiliary function ASG

  • var (Tuple) – Metadata from strategy classes and varinfo files: (inputs, parameters, outputs)

  • member_category (_type_) – _description_

  • inputs (List[str]) – Parameter names of the auxiliary function. It can be an instance of domain class

Returns:

New parameters nodes

Return type:

List[Node]

pycropml.transpiler.antlr_py.bioma.run2.run_bioma(component, output)[source]

Transform a BioMA component in Crop2ML

Parameters:
  • component (_type_) – bioma component path

  • output (_type_) – Crop2ML package path

pycropml.transpiler.antlr_py.bioma.run2.translate(total_tree, varinfo, algo, not_declared, res_inout={}, member_category={}, instance_dclass={})[source]

Transform specific nodes based on class of subnodes of node. It also allows to extract some usefull information. At finish the modified node contains only the constructs of CyML and converted in CyML after applying translate_simple function.

Parameters:
  • total_tree (Node) – ASG of all the component

  • varinfo (Node) – ASG of the Var info files

Returns:

transform algo

Return type:

ASG

pycropml.transpiler.antlr_py.bioma.run2.translate_(f, pa)[source]