7.1.2.27. pycropml.render_python module

Add License, Header.

Use pkglts

Problems: - name of a model unit?

class pycropml.render_python.Model2Package(models, dir=None, pkg_name=None)[source]

Bases: object

TODO

DATATYPE = {'BOOLEAN': <class 'bool'>, 'CHARLIST': <class 'list'>, 'DATE': <class 'str'>, 'DATELIST': <class 'list'>, 'DOUBLE': <class 'float'>, 'DOUBLEARRAY': <built-in function array>, 'DOUBLELIST': <class 'list'>, 'FLOAT': <class 'float'>, 'INT': <class 'int'>, 'INTLIST': <class 'list'>, 'STRING': <class 'str'>, 'STRINGLIST': <class 'list'>}
generate_algorithm(model_unit)[source]
generate_component(model_unit)[source]

Todo

generate_factory(model)[source]

Create a Node Factory from CropML model unit.

generate_func_test(model_unit)[source]
generate_function_doc(model_unit)[source]
generate_function_signature(model_unit)[source]
generate_package()[source]

Generate a Python package equivalent to the xml definition.

Args: - models : a list of model - dir: the directory where the code is generated.

Returns: - None or status

generate_test(model_unit)[source]
generate_wralea()[source]

Generate wralea factories from the meta-information of the the model units.

num = 0
run()[source]

TODO.

write_tests()[source]

TODO: Manage several models rather than just one.

pycropml.render_python.generate_doc(model)[source]
pycropml.render_python.openalea_interface(inout)[source]
pycropml.render_python.signature(model)[source]