pyfmu.builder.generate

This module contains functionality to the creation of Python FMU projects

Module Contents

pyfmu.builder.generate._create_config(config_path: str, class_name: str, relative_script_path: str)
pyfmu.builder.generate.read_configuration(config_path: str) → object
class pyfmu.builder.generate.PyfmuProject(root: Path, main_class: str = None, main_script: str = None, main_script_path: Path = None, project_configuration: dict = None, project_configuration_path: Path = None, resources_dir: Path = None)

Object representing an pyfmu project.

static from_existing(p: Path)

Instantiates an object representation based on an existing project

Arguments:

p {Path} – path to the root of the project

pyfmu.builder.generate._create_dirs(project_path: str, exist_ok: bool = True)
pyfmu.builder.generate._generate_fmu_template(template_path: str, main_class_name: str, script_output_path: str) → None
pyfmu.builder.generate._write_templateScript_to_project(project: PyfmuProject)
pyfmu.builder.generate._write_projectConfig_to_project(project: PyfmuProject)
pyfmu.builder.generate.create_project(project_path: str, main_class_name: str, overwrite=True) → PyfmuProject

Creates a new PyFMU project at the specified path.

project_pathstr

output path of the project

main_class_namestr

name of the slave script

overwritebool, optional

if true overwrite any existing files at the specified output path, by default True

PyfmuProject

An object representing the exported project. This may be used to access the paths of the various project artifacts.