crunchflow.input.InputFile

class crunchflow.input.InputFile

The main class for creating and saving CrunchFlow input files.

set_block(block_name, parameters)

Set the parameters of a block in an InputFile instance.

Parameters:
block_namestr

The name of the block to set.

parametersdict

A dictionary of parameters to set for the block.

__str__()

Return a string representation of the CrunchFlow input file.

save(filename, path='.', update_pestcontrol=False)

Write this CrunchFlow run to an input file.

Parameters:
filenamestr

The name of the output file to save.

pathstr, optional

The path to the output file. Default is the current directory.

update_pestcontrolbool, optional

Whether to update PestControl.ant with the name of the CrunchFlow input file. Default is False.

Returns:
None

The CrunchFlow input file is saved to disk.

classmethod load(filename, path='.', warnings=True)

Read a CrunchFlow input file and create a Run instance.

Parameters:
filenamestr

The name of the input file to read.

pathstr, optional

The path to the input file. Default is the current directory.

warningsbool, optional

Whether to print warnings for unrecognized blocks or attributes. Default is True.

Returns:
InputFile

A Run instance with the data read from the input file.