salo.salo

Module Contents

Classes

Session

Sessions

Event

Attributes

SALO_PATH

fake

salo.salo.SALO_PATH
salo.salo.fake
class salo.salo.Session(model: Dict, cadence: salo.cadence.Cadence, defaults: Dict, saved_values: Optional[Dict] = None)[source]
spawn(self, model: Dict, options: Dict) None[source]

Iterate over event objects in recipe, generate Event objects, and spawn additional child Event objects.

__repr__(self)[source]

Return repr(self).

generate(self, with_stencils: bool = False) Generator[source]

Iterate over Event objects for this Session

__len__(self)[source]
class salo.salo.Sessions(config: str, outputs: Optional[List] = None, output_config: Optional[str] = None)[source]
load_config(self, config: pathlib.Path) Dict[source]

Load Salo configuration file for recipe or output

create_session(self, model: Dict) None[source]

Create a new Session object for this collection of Sessions

generate(self, with_stencils: bool = False) Generator[source]

Iterate over Event objects for each Session object

save(self) None[source]

Pass all Sessions to outputs for saving/post-processing

__repr__(self)[source]

Return repr(self).

__len__(self)[source]
class salo.salo.Event(model: Dict, session: Session, options: Dict, exclude_none: bool = True)[source]
run(self) None[source]

Create log event

update_cadence(self) None[source]

Update the cadence and timestamp for this Event

update_saved_values(self, event: Union[salo.stencils.SaloStencilModel, salo.events.SaloEventModel]) None[source]

Ensure saved_values are updated if defined in the recipe

get_saved_value(self, key: str, index: Optional[int] = None, is_random: bool = False) Any[source]

Set the value of an attribute for the event if a saved_value exists and is defined

set_options(self) None[source]

Set Event options

save_value(self, key: str, value: str) None[source]

Update Session object with values if a saved_value is defined

_load_model(self, model_path: str) pydantic.main.ModelMetaclass[source]

Import model object defined in recipe