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

This class contains information for a single block that has been reviewed by the user (for the Reliability2 App). More...

Inheritance diagram for data_structs.test2.Test2:

Public Member Functions

def __init__
 Constructor. More...
 
def get_start_time_offset
 Retrieves a value (in seconds) indicating how far we are from the start of the entire wav file. More...
 
def db_insert
 See superclass description. More...
 
def db_delete
 See superclass description. More...
 
- 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_check2
 Static method to (query the DB and) construct a list of Test2 instances corresponding to a particular Check2 object. More...
 
- 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

 check2_id
 
 wav_filename
 
 child_code
 
 spreadsheet_timestamp
 
 child_vocs
 
 transcription
 
 ui_save_data
 
 db_id
 
- Public Attributes inherited from data_structs.base_objects.DBObject
 db_id
 

Static Private Member Functions

def _build_from_db_rows
 Static method to construct a list of Test2 objects from a list of database rows (from the test2 table). More...
 

Detailed Description

This class contains information for a single block that has been reviewed by the user (for the Reliability2 App).

Each Check2 represents an entire testing run, and contains a list of Test2 objects that represent the individual blocks.

Definition at line 10 of file test2.py.

Constructor & Destructor Documentation

def data_structs.test2.Test2.__init__ (   self,
  check2_id,
  wav_filename,
  child_code,
  spreadsheet_timestamp,
  child_vocs = 0,
  transcription = '',
  ui_save_data = None,
  db_id = None 
)

Constructor.

Parameters
self
check2_id(int) the DB id of the parent check2 object for this test2
wav_filename(string) path to the wav file from which a sound clip for this test2 will be played
child_code(string) this is a string built from several columns in the input spreadsheet (see parsers.reliability2_parser's get_child_code() method. It looks like this: 'C002_20090831'
spreadsheet_timestamp(string) built from spreadsheet column, in the format "dd mm yyyy <elapsed seconds as a float>" (this, together with child_code, uniquely identifies a row)
child_vocs(int=0) the number of child vocalizations - this is grabbed from a user-adjustable spin button control in the UI
transcription(string) the user-entered transcription text
ui_save_data(dictionary=None) a dictionary of data with keys corresponding to the names of UI controls. This is pickled and stored here so that we can restore the UI state when a saved Check2 is loaded back up. See the Reliability2 UI classes for how this dictionary is populated.
db_id(int) the primary key value of the row corresponding to this instance from the checks2 db table. This should be set to None if the instance is not in the database.

Definition at line 31 of file test2.py.

Member Function Documentation

def data_structs.test2.Test2._build_from_db_rows (   rows)
staticprivate

Static method to construct a list of Test2 objects from a list of database rows (from the test2 table).

Parameters
rows(list) a list of lists, one sublist per row.
Returns
(list) a list of Test2 instances

Definition at line 81 of file test2.py.

def data_structs.test2.Test2.db_delete (   self,
  db 
)

See superclass description.

Definition at line 68 of file test2.py.

def data_structs.test2.Test2.db_insert (   self,
  db 
)

See superclass description.

Definition at line 52 of file test2.py.

def data_structs.test2.Test2.db_select (   db,
  ids = [] 
)
static

See superclass description.

Definition at line 102 of file test2.py.

def data_structs.test2.Test2.db_select_by_check2 (   db,
  check2_id 
)
static

Static method to (query the DB and) construct a list of Test2 instances corresponding to a particular Check2 object.

Parameters
db(BLLDatabase) a database object to query
check2_id(int) primary key value of the check2 whose test2's we're looking for
Returns
(list) list of Test2 instances, ordered by db_id

Definition at line 116 of file test2.py.

def data_structs.test2.Test2.get_start_time_offset (   self)

Retrieves a value (in seconds) indicating how far we are from the start of the entire wav file.

Parameters
self
Returns
(float) offset value in seconds

Definition at line 47 of file test2.py.

Member Data Documentation

data_structs.test2.Test2.check2_id

Definition at line 35 of file test2.py.

data_structs.test2.Test2.child_code

Definition at line 37 of file test2.py.

data_structs.test2.Test2.child_vocs

Definition at line 39 of file test2.py.

data_structs.test2.Test2.db_id

Definition at line 42 of file test2.py.

data_structs.test2.Test2.spreadsheet_timestamp

Definition at line 38 of file test2.py.

data_structs.test2.Test2.transcription

Definition at line 40 of file test2.py.

data_structs.test2.Test2.ui_save_data

Definition at line 41 of file test2.py.

data_structs.test2.Test2.wav_filename

Definition at line 36 of file test2.py.


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