Baby Language Lab Scripts
A collection of data processing tools.
 All Classes Namespaces Files Functions Variables Pages
parsers.reliability_exporter.ReliabilityExporter Class Reference

The class writes details about a particular check run (from the Reliability App) to a CSV file. More...

Inheritance diagram for parsers.reliability_exporter.ReliabilityExporter:

Public Member Functions

def __init__
 Constructor. More...
 
def export
 Performs the write to the CSV file. More...
 
def search_actual_codes
 Determines whether or not the users's selected option for a given test is correct. More...
 

Public Attributes

 check
 
 filename
 
 logger
 

Private Member Functions

def _get_cat_sel
 
def _get_actual_speaker_codes
 
def _get_cat_correct
 This method updates the 'category_valid' key of a sub-dictionary obtained from get_tests_validation_data(). More...
 

Detailed Description

The class writes details about a particular check run (from the Reliability App) to a CSV file.

Definition at line 11 of file reliability_exporter.py.

Constructor & Destructor Documentation

def parsers.reliability_exporter.ReliabilityExporter.__init__ (   self,
  check,
  filename 
)

Constructor.

Parameters
self
check_run_id(int) the db_id of the run we're writing details for
filename(string) full path to the destination CSV file

Definition at line 16 of file reliability_exporter.py.

Member Function Documentation

def parsers.reliability_exporter.ReliabilityExporter._get_actual_speaker_codes (   self,
  test,
  db 
)
private

Definition at line 105 of file reliability_exporter.py.

def parsers.reliability_exporter.ReliabilityExporter._get_cat_correct (   self,
  test,
  actual_codes,
  cat_sel 
)
private

This method updates the 'category_valid' key of a sub-dictionary obtained from get_tests_validation_data().

i.e. it determines whether or not the user-selected option matches a speaker.

Definition at line 137 of file reliability_exporter.py.

def parsers.reliability_exporter.ReliabilityExporter._get_cat_sel (   self,
  test 
)
private

Definition at line 102 of file reliability_exporter.py.

def parsers.reliability_exporter.ReliabilityExporter.export (   self)

Performs the write to the CSV file.

Parameters
self
Returns
(boolean) True if write was successful, False if an error occurred

Definition at line 28 of file reliability_exporter.py.

def parsers.reliability_exporter.ReliabilityExporter.search_actual_codes (   self,
  cur_test,
  test_fcn,
  actual_codes 
)

Determines whether or not the users's selected option for a given test is correct.

Parameters
self
cur_test(dictionary) a sub-dictionary from to get_tests_validation_data() - containing data about the test determine correctness for
test_fcn(function) a function that tests whether an actual speaker code matches the user's combo selection. Function accepts a CodeInfo object representing an actual speaker code, and returns a boolean (False if user was incorrect, True if they were correct).
Returns
(boolean) True if one of the elements in cur_test's 'actual codes' list correctly corresponds to its 'category_input'

Definition at line 124 of file reliability_exporter.py.

Member Data Documentation

parsers.reliability_exporter.ReliabilityExporter.check

Definition at line 21 of file reliability_exporter.py.

parsers.reliability_exporter.ReliabilityExporter.filename

Definition at line 22 of file reliability_exporter.py.

parsers.reliability_exporter.ReliabilityExporter.logger

Definition at line 23 of file reliability_exporter.py.


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