A saved collection of settings that can be used to generate stats from a TRS file (for the Reliability App).
More...
A saved collection of settings that can be used to generate stats from a TRS file (for the Reliability App).
Definition at line 10 of file check.py.
def data_structs.check.Check.__init__ |
( |
|
self, |
|
|
|
name, |
|
|
|
input_filename, |
|
|
|
wav_filename, |
|
|
|
num_segs, |
|
|
|
default_context_padding, |
|
|
|
tests, |
|
|
|
test_index, |
|
|
|
completed = None , |
|
|
|
created = None , |
|
|
|
db_id = None , |
|
|
|
filters = [] , |
|
|
|
pick_randomly = False , |
|
|
|
last_run = None |
|
) |
| |
Constructor.
- Parameters
-
self | |
name | (string) user-defined name for this check (string) absolute path to the trs/csv file that this check will be run on (string) absolute path to the wav file that this check will use (int) integer representing the upper limit on the number of segs that can be picked (takes precidence over previous param when limit is exceeded). WIll be set to 0 if no limit is to be enforced. |
default_context_padding | (int) number of seconds to pad sound clip, on each side, when context is being used |
completed | (string=None) timestamp string representing the date/time of this check's first run. In general, code should not set this. It's set from db_select(). Will be None if this check has not yet been run. |
db_id | (int=None) Primary key value of this check in the Checks database table. In general, code should not set this. It's set from db_select(), and upon db_insert(). Will be None if object is not yet in the DB. |
filters | (list=[]) List of SegFilter objects to filter the segments from the trs file before picking the clips to test on. |
pick_randomly | (boolean=False) Set to True if user elected to randomly pick segments, False if they want continuous segments to be used. |
last_run | (string=None) String timestamp representing the last time this check was run. Set to None if it has never been run before. |
Definition at line 36 of file check.py.
def data_structs.check.Check._update_timestamp |
( |
|
self, |
|
|
|
attr_name, |
|
|
|
db |
|
) |
| |
|
private |
Updates a timestamp column in the DB, and in this object instance.
If the instance is not in the database, an exception is raised.
- Parameters
-
self | |
attr_name | (string) name of the instance attribute we will be updating - this name must match the name of the column in the DB checks table. |
db | (BLLDatabase) a database instance |
Definition at line 146 of file check.py.
def data_structs.check.Check.db_delete |
( |
|
self, |
|
|
|
db |
|
) |
| |
See superclass description.
- Returns
- (int) the number of rows that were soft deleted.
Definition at line 88 of file check.py.
def data_structs.check.Check.db_insert |
( |
|
self, |
|
|
|
db |
|
) |
| |
See superclass description.
Definition at line 55 of file check.py.
def data_structs.check.Check.db_select |
( |
|
db, |
|
|
|
ids = [] |
|
) |
| |
|
static |
See superclass description.
- Returns
- (list) list of Check objects
Definition at line 108 of file check.py.
def data_structs.check.Check.db_update_test_index |
( |
|
self, |
|
|
|
db |
|
) |
| |
Updates the test_index property/database column value.
This allows us to restore a saved check to the position where the user left off. If the instance is not in the database, an exception is raised.
- Parameters
-
self | |
db | (BLLDatabase) the DB handle object to use for the update operation |
Definition at line 173 of file check.py.
def data_structs.check.Check.mark_as_completed |
( |
|
self, |
|
|
|
db |
|
) |
| |
Sets the 'completed' attribute (a timestamp in string form) of this Check to the current date/time.
- Parameters
-
self | |
db | (BLLDatabase) the DB handle object to use for the update operation |
Definition at line 161 of file check.py.
def data_structs.check.Check.mark_last_run |
( |
|
self, |
|
|
|
db |
|
) |
| |
Updates the "last run" attribute/database column value.
- Parameters
-
self | |
db | (BLLDatabase) the DB handle object to use for the update operation |
Definition at line 167 of file check.py.
data_structs.check.Check.completed |
data_structs.check.Check.created |
data_structs.check.Check.db_id |
data_structs.check.Check.default_context_padding |
data_structs.check.Check.filters |
data_structs.check.Check.input_filename |
data_structs.check.Check.last_run |
data_structs.check.Check.name |
data_structs.check.Check.num_segs |
data_structs.check.Check.pick_randomly |
data_structs.check.Check.test_index |
data_structs.check.Check.tests |
data_structs.check.Check.wav_filename |
The documentation for this class was generated from the following file:
- C:/Users/Wayne/Documents/baby-lab/bll_app/data_structs/check.py