dispel.providers.ads.io module#
Functionality to read ADS files.
- dispel.providers.ads.io.create_ads_raw_data_set(data, raw_data_set_id)[source]#
Create ADS raw data set.
- Parameters:
- Return type:
- dispel.providers.ads.io.create_ads_raw_data_set_definition(value_definitions, raw_data_set_id)[source]#
Create ADS raw data set definition.
- Parameters:
value_definitions (Iterable[RawDataValueDefinition]) – An iterable of raw data value definitions
raw_data_set_id (str) – The raw data set id
- Returns:
The definition of the raw data set
- Return type:
- dispel.providers.ads.io.create_ads_value_definitions(value_sample, raw_data_set_id)[source]#
Create ADS related value definition classes.
- Parameters:
- Return type:
List[RawDataValueDefinition]
- dispel.providers.ads.io.enrich_context(context, evaluation_code, level_modalities)[source]#
Enrich the context information with test specific information.
- dispel.providers.ads.io.get_ads_raw_data_set(level, raw_data_set_id)[source]#
Read the ads raw data sets.
- Parameters:
- Returns:
The raw data set data frame.
- Return type:
- Raises:
ValueError – If the raw data set id is not found in level data.
- dispel.providers.ads.io.parsable_ads_json(value)[source]#
Infer if a value can be automatically read with
parse_ads_raw_json()
.
- dispel.providers.ads.io.parse_ads_raw_json(data)[source]#
Parse data from ADS JSON file.
- Parameters:
data (dict) – The ADS raw data.
- Returns:
The
ADSReading
representation of the ADS JSON raw data.- Return type:
- dispel.providers.ads.io.parse_context(data)[source]#
Parse the context information available for each level.
- dispel.providers.ads.io.parse_device(device_dict)[source]#
Parse a device dictionary into a Device class.
- dispel.providers.ads.io.parse_evaluation(id_, evaluation, user_id=None)[source]#
Parse the evaluation information into an Evaluation class.
- dispel.providers.ads.io.parse_level(data, evaluation_code, ads_modalities)[source]#
Parse a specific level.
- dispel.providers.ads.io.parse_levels(data, evaluation_code, ads_modalities)[source]#
Extract a list of Level from
levels_data
.Here
levels_data
refers todata['mobileEvaluationTest']['levels']
.- Parameters:
data (dict) – A dictionary extracted from a json corresponding to every level related information.
evaluation_code (str) – The evaluation code, e.g.
CPS
ads_modalities (ADSModalities) – The AdS modalities object.
- Returns:
A list of
Level
s.- Return type:
List[Level]
- dispel.providers.ads.io.parse_raw_data_set_value_definitions(level, raw_data_set_id)[source]#
Parse ADS raw data set value definitions.
- Parameters:
- Return type:
- dispel.providers.ads.io.parse_screen(platform, screen_dict)[source]#
Parse a screen dictionary into a Screen class.
- Parameters:
- Returns:
The screen information.
- Return type:
- Raises:
ValueError – If given an unsupported platform.
- dispel.providers.ads.io.parse_session(session_dict)[source]#
Parse the session information into a Session class.