From 5abca8bb0f25c93b6edc6dc60edcac0bd3be84d6 Mon Sep 17 00:00:00 2001 From: JulioV Date: Sun, 21 Feb 2021 19:34:42 -0500 Subject: [PATCH] Missing config validations --- config.yaml | 6 +++--- tools/config.schema.yaml | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/config.yaml b/config.yaml index 04626fc9..67f5344e 100644 --- a/config.yaml +++ b/config.yaml @@ -75,7 +75,7 @@ PHONE_ACTIVITY_RECOGNITION: TABLE: ANDROID: plugin_google_activity_recognition IOS: plugin_ios_activity_recognition - EPISODE_THRESHOLD_BETWEEN_ROWS: 5 # minutes. Max time difference for two consecutive rows to be considered within the same battery episode. + EPISODE_THRESHOLD_BETWEEN_ROWS: 5 # minutes. Max time difference for two consecutive rows to be considered within the same AR episode. PROVIDERS: RAPIDS: COMPUTE: False @@ -212,7 +212,7 @@ PHONE_DATA_YIELD: RAPIDS: COMPUTE: False FEATURES: [ratiovalidyieldedminutes, ratiovalidyieldedhours] - MINUTE_RATIO_THRESHOLD_FOR_VALID_YIELDED_HOURS: 0.5 # 0 to 1 representing the number of minutes with at least + MINUTE_RATIO_THRESHOLD_FOR_VALID_YIELDED_HOURS: 0.5 # 0 to 1, minimum percentage of valid minutes in an hour to be considered valid. SRC_LANGUAGE: "r" SRC_FOLDER: "rapids" # inside src/features/phone_data_yield @@ -335,7 +335,7 @@ FITBIT_DATA_YIELD: RAPIDS: COMPUTE: False FEATURES: [ratiovalidyieldedminutes, ratiovalidyieldedhours] - MINUTE_RATIO_THRESHOLD_FOR_VALID_YIELDED_HOURS: 0.5 # 0 to 1 representing the number of minutes with at least + MINUTE_RATIO_THRESHOLD_FOR_VALID_YIELDED_HOURS: 0.5 # 0 to 1, minimum percentage of valid minutes in an hour to be considered valid. SRC_LANGUAGE: "r" SRC_FOLDER: "rapids" # inside src/features/fitbit_data_yield diff --git a/tools/config.schema.yaml b/tools/config.schema.yaml index bff5963d..20cebb9b 100644 --- a/tools/config.schema.yaml +++ b/tools/config.schema.yaml @@ -68,7 +68,7 @@ definitions: items: type: string enum: ["withinsegments", "acrosssegments", "acrossdataset"] - SCANS_LEASE_FREQUENT_DEVICE: + SCANS_LEAST_FREQUENT_DEVICE: type: array uniqueItems: True items: @@ -182,6 +182,13 @@ properties: PHONE_DATA_CONFIGURATION: allOf: - $ref: "#/definitions/DATA_CONFIGURATION" + - properties: + SOURCE: + type: object + properties: + TYPE: + type: string + enum: [DATABASE] PHONE_ACCELEROMETER: type: object @@ -321,6 +328,11 @@ properties: uniqueItems: True items: type: string + SINGLE_APPS: + type: array + uniqueItems: True + items: + type: string EXCLUDED_CATEGORIES: type: ["null", array] uniqueItems: True @@ -519,7 +531,7 @@ properties: type: ["null", array] items: type: string - enum: ["PHONE_ACCELEROMETER", "PHONE_ACTIVITY_RECOGNITION", "PHONE_APPLICATIONS_FOREGROUND", "PHONE_BATTERY", "PHONE_BLUETOOTH", "PHONE_CALLS", "PHONE_CONVERSATION", "PHONE_LIGHT", "PHONE_LOCATIONS", "PHONE_MESSAGES", "PHONE_SCREEN", "PHONE_WIFI_CONNECTED", "PHONE_WIFI_VISIBLE"] + enum: ["PHONE_ACCELEROMETER", "PHONE_ACTIVITY_RECOGNITION", "PHONE_APPLICATIONS_CRASHES", "PHONE_APPLICATIONS_FOREGROUND", "PHONE_APPLICATIONS_NOTIFICATIONS", "PHONE_AWARE_LOG", "PHONE_BATTERY", "PHONE_BLUETOOTH", "PHONE_CALLS", "PHONE_CONVERSATION", "PHONE_KEYBOARD", "PHONE_LIGHT", "PHONE_LOCATIONS", "PHONE_MESSAGES", "PHONE_SCREEN", "PHONE_WIFI_CONNECTED", "PHONE_WIFI_VISIBLE"] PROVIDERS: type: ["null", object] properties: @@ -751,6 +763,12 @@ properties: RAPIDS: allOf: - $ref: "#/definitions/PROVIDER" + - properties: + FEATURES: + uniqueItems: True + items: + type: string + enum: ["countscans", "uniquedevices", "countscansmostuniquedevice"] additionalProperties: $ref: "#/definitions/PROVIDER" @@ -760,6 +778,9 @@ properties: - properties: SOURCE: properties: + TYPE: + type: string + enum: [DATABASE, FILES] COLUMN_FORMAT: type: string enum: ["JSON", "PLAIN_TEXT"]