meshflow.utility.templating.render_class_template

meshflow.utility.templating.render_class_template(class_info, class_case, class_grus, default_header_path=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/mesh-workflow/checkouts/stable/src/meshflow/templates/default_CLASS_header.json'), default_params_path=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/mesh-workflow/checkouts/stable/src/meshflow/templates/default_CLASS_parameters.json'), default_case_path=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/mesh-workflow/checkouts/stable/src/meshflow/templates/default_CLASS_case.json'), default_lines_path=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/mesh-workflow/checkouts/stable/src/meshflow/templates/default_CLASS_lines.json'), default_types_path=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/mesh-workflow/checkouts/stable/src/meshflow/templates/default_CLASS_types.json'), template_class_jinja_path='MESH_parameters_CLASS.ini.jinja')

Render a CLASS configuration file using Jinja2 templates.

Parameters:
  • class_info (dict) – Dictionary containing metadata and info for the CLASS file header.

  • class_case (dict) – Dictionary containing case-specific settings for the CLASS file.

  • class_grus (Sequence[dict]) – Sequence of dictionaries, each representing GRU parameters.

  • default_header_path (PathLike, optional) – Path to the default CLASS header JSON file.

  • default_params_path (PathLike, optional) – Path to the default CLASS parameters JSON file.

  • default_case_path (PathLike, optional) – Path to the default CLASS case JSON file.

  • default_lines_path (PathLike, optional) – Path to the default CLASS lines JSON file.

  • default_types_path (PathLike, optional) – Path to the default CLASS types JSON file.

  • template_class_jinja_path (PathLike, optional) – Path to the Jinja2 template for the CLASS file.

Returns:

Rendered CLASS configuration file as a string.

Return type:

str

Raises: