dbs_classes.dbs_benefit.DbsBenefit
self, database) dbs_classes.dbs_benefit.DbsBenefit(
Methods
Name | Description |
---|---|
delete | Delete an already existing benefit in the database. |
edit | Edits an already existing benefit in the database. |
save | Save a benefit object in the database. |
delete
=False) dbs_classes.dbs_benefit.DbsBenefit.delete(name, toml_only
Delete an already existing benefit in the database.
Parameters
Name | Type | Description | Default |
---|---|---|---|
name | str | name of the benefit | required |
toml_only | bool | whether to only delete the toml file or the entire folder. If the folder is empty after deleting the toml, it will always be deleted. By default False | False |
Raises
Name | Type | Description |
---|---|---|
ValueError | Raise error if benefit has already model output |
edit
dbs_classes.dbs_benefit.DbsBenefit.edit(object_model)
Edits an already existing benefit in the database.
Parameters
Name | Type | Description | Default |
---|---|---|---|
benefit | Benefit | benefit to be edited in the database | required |
Raises
Name | Type | Description |
---|---|---|
ValueError | Raise error if name is already in use. |
save
=False) dbs_classes.dbs_benefit.DbsBenefit.save(object_model, overwrite
Save a benefit object in the database.
Parameters
Name | Type | Description | Default |
---|---|---|---|
object_model | Benefit | object of Benefit type | required |
overwrite | bool | whether to overwrite existing benefit with same name, by default False | False |
Raises
Name | Type | Description |
---|---|---|
ValueError | Raise error if name is already in use. Names of benefits assessments should be unique. |