Baby Language Lab Scripts
A collection of data processing tools.
 All Classes Namespaces Files Functions Variables Pages
data_structs.test.Test Class Reference

This class represents an instance of a single step in a Check (Reliability Application). More...

Inheritance diagram for data_structs.test.Test:

Public Member Functions

def __init__
 Constructor. More...
 
def db_insert
 See superclass description. More...
 
def db_delete
 See superclass description. More...
 
def db_update_user_inputs
 
- Public Member Functions inherited from data_structs.base_objects.DBObject
def __init__
 Constructor. More...
 
def db_insert
 Performs operations needed to insert this object into the database. More...
 
def db_delete
 Performs operations needed to delete this object from the database. More...
 
- Public Member Functions inherited from data_structs.base_objects.BLLObject
def __str__
 Builds a nicely formatted string containing all attributes of this object (except those in omit_attr_names), for debugging purposes. More...
 

Static Public Member Functions

def db_select
 See superclass description. More...
 
def db_select_by_check
 
- Static Public Member Functions inherited from data_structs.base_objects.DBObject
def db_select
 Selects objects of this type from the database. More...
 

Public Attributes

 check_id
 
 category_input
 
 syllables_w_context
 
 syllables_wo_context
 
 seg
 
 is_uncertain
 
 context_padding
 
 db_id
 
- Public Attributes inherited from data_structs.base_objects.DBObject
 db_id
 

Static Private Member Functions

def _build_from_db_rows
 

Detailed Description

This class represents an instance of a single step in a Check (Reliability Application).

When a check is run, a Check object is created, and a number of Tests are performed (the exact number is specified by the user.). Each test consists of playing a sound clip (either with or without context), and recording the user's response (the user attempts to identify the type of segment being played).

Definition at line 8 of file test.py.

Constructor & Destructor Documentation

def data_structs.test.Test.__init__ (   self,
  check_id,
  category_input,
  syllables_w_context,
  syllables_wo_context,
  segment,
  is_uncertain,
  context_padding,
  db_id = None 
)

Constructor.

Parameters
self
category_input(int) this is the user's response that they've selected from the dropdown. It corresponds to one of the options from DBConstants.COMBO_OPTIONS[DBConstants.COMBO_GROUPS.RELIABILITY_CATEGORIES]
segment(Segment) the segment being played
check(Check) pointer to the instance of the check this test is being performed for
with_context(boolean) True if sound clip is being padded on both sides, False otherwise
db_id(int) primary key from the tests DB table. Should be None if this test is not yet in the DB.
adjusted_padding(int)The user can adjust this value on the fly for each test that is presented with context. If you pass None, this will be inferred from the with_context and/or check (context_padding attribute) parameters. Regardless of what you pass here, if with_context==False, then the DB will contain a zero for this attribute.
syllables(int=0)number of syllables in sound clip (entered by user)
adjusted_start(float) the user-specified absolute start time (in seconds)
adjusted_end(float) the user-specified absolute end time (in seconds)

Definition at line 20 of file test.py.

Member Function Documentation

def data_structs.test.Test._build_from_db_rows (   db,
  rows 
)
staticprivate

Definition at line 65 of file test.py.

def data_structs.test.Test.db_delete (   self,
  db 
)

See superclass description.

Definition at line 49 of file test.py.

def data_structs.test.Test.db_insert (   self,
  db 
)

See superclass description.

This Test's corresponding Check object must already have been inserted into the database before this method is called. If not, an excpetion will be raised.

Definition at line 31 of file test.py.

def data_structs.test.Test.db_select (   db,
  ids = [] 
)
static

See superclass description.

Definition at line 87 of file test.py.

def data_structs.test.Test.db_select_by_check (   db,
  check_id 
)
static

Definition at line 99 of file test.py.

def data_structs.test.Test.db_update_user_inputs (   self,
  db 
)

Definition at line 58 of file test.py.

Member Data Documentation

data_structs.test.Test.category_input

Definition at line 22 of file test.py.

data_structs.test.Test.check_id

Definition at line 21 of file test.py.

data_structs.test.Test.context_padding

Definition at line 27 of file test.py.

data_structs.test.Test.db_id

Definition at line 28 of file test.py.

data_structs.test.Test.is_uncertain

Definition at line 26 of file test.py.

data_structs.test.Test.seg

Definition at line 25 of file test.py.

data_structs.test.Test.syllables_w_context

Definition at line 23 of file test.py.

data_structs.test.Test.syllables_wo_context

Definition at line 24 of file test.py.


The documentation for this class was generated from the following file: