sunpeek.common.config_parser.make_and_store_plant#

sunpeek.common.config_parser.make_and_store_plant(conf, session)#

Create a Plant from a configuration dictionary and persist it to the database.

Parameters:
  • conf (dict) – Configuration dictionary containing plant specification.

  • session (sqlalchemy.orm.Session) – Database session for persistence (required).

Returns:

The created and persisted Plant instance.

Return type:

cmp.Plant

Raises:

DuplicateNameError – If a plant with the same name already exists in the database.