lbt_recipes.settings module

Class to handle settings for running recipes locally.

class lbt_recipes.settings.RecipeSettings(folder=None, workers=None, reload_old=False, report_out=False, debug_folder=None)[source]

Bases: object

Parameters specifying how to run recipes locally.

Parameters:
  • folder – Path to a project folder in which the recipe will be executed. If None, the default project folder for the Recipe will be used. (Default: None).

  • workers – An integer to set the number of CPUs used in the execution of the recipe. This number should not exceed the number of CPUs on the machine running the simulation and should be lower if other tasks are running while the simulation is running. If set to None, it should automatically default to one less than the number of CPUs currently available on the machine. (Default: None).

  • reload_old – A boolean to indicate whether existing results for a given project and simulation ID should be reloaded if they are found instead of re-running the entire recipe from the beginning. If False, any existing results will be overwritten by the new simulation. (Default: False).

  • report_out – A boolean to indicate whether the recipe progress should be displayed in the cmd window (False) or printed (True). Printing can be useful for debugging and capturing what’s happening in the process but recipe reports can often be very long and so it can slow Grasshopper slightly. (Default: False).

  • debug_folder – An optional path to a debug folder. If debug folder is provided all the steps of the simulation will be executed inside the debug folder which can be used for further inspection.

Properties:
  • folder

  • workers

  • reload_old

  • report_out

  • debug_folder

ToString()[source]

Overwrite .NET ToString.

duplicate()[source]

Get a copy of this object.

classmethod from_string(settings_string)[source]

Create an RecipeSettings object from a RecipeSettings string.

property debug_folder

Get or set the path to a folder in which the simulation steps are executed.

property folder

Get or set the path to a project folder in which the recipe will be executed.

property reload_old

Get or set a boolean for whether existing results should be reloaded.

property report_out

Get or set a boolean for whether to print the recipe progress.

property workers

Get or set a integer the number of CPUs used in the execution of the recipe.

If set to None, this should be equal to one less than the number of processors currently available on the machine.