fgen.data_models.module_requirement#

Data model of module requirements

ModuleRequirement#

class ModuleRequirement(provides, fortran_module, python_module)[source]#

Bases: object

Data model of a module requirement

These specifications are used to define the requirements of a module, i.e. the other modules it depends on.

We don’t currently validate these at generation-time. If they are wrong, the module will fail to compile or, in the case of an incorrect python_module, will raise an ImportError at run-time.

fortran_module: str#

Name of the required fortran module

This should point to the fortran module that contains the definition of the required derived type.

provides: str#

Name of the derived type defined in the required module

python_module: str#

Name of the python module that exposes the Python wrapper of the derived type

This module should declare a class that has a name equal to the value of provides.