From 0b87aa3b36f8f18480e42feea6a618876c5816e2 Mon Sep 17 00:00:00 2001 From: JulioV Date: Wed, 27 Jan 2021 17:12:53 -0500 Subject: [PATCH] Fix bug when no error message was displayed for an empty `[PHONE_DATA_YIELD][SENSORS]` when resampling location data --- Snakefile | 4 ++-- docs/change-log.md | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Snakefile b/Snakefile index 413438de..a68ced63 100644 --- a/Snakefile +++ b/Snakefile @@ -201,11 +201,11 @@ if isinstance(config["PHONE_AWARE_LOG"]["PROVIDERS"], dict): for provider in config["PHONE_LOCATIONS"]["PROVIDERS"].keys(): if config["PHONE_LOCATIONS"]["PROVIDERS"][provider]["COMPUTE"]: - if config["PHONE_LOCATIONS"]["LOCATIONS_TO_USE"] == "FUSED_RESAMPLED": + if config["PHONE_LOCATIONS"]["LOCATIONS_TO_USE"] in ["FUSED_RESAMPLED","ALL_RESAMPLED"]: if "PHONE_LOCATIONS" in config["PHONE_DATA_YIELD"]["SENSORS"]: files_to_compute.extend(expand("data/interim/{pid}/phone_yielded_timestamps.csv", pid=config["PIDS"])) else: - raise ValueError("Error: Add PHONE_LOCATIONS (and as many PHONE_SENSORS as you have) to [PHONE_DATA_YIELD][SENSORS] in config.yaml. This is necessary to compute phone_yielded_timestamps (time when the smartphone was sensing data) which is used to resample fused location data (RESAMPLED_FUSED)") + raise ValueError("Error: Add PHONE_LOCATIONS (and as many PHONE_SENSORS as you have) to [PHONE_DATA_YIELD][SENSORS] in config.yaml. This is necessary to compute phone_yielded_timestamps (time when the smartphone was sensing data) which is used to resample fused location data (ALL_RESAMPLED and RESAMPLED_FUSED)") files_to_compute.extend(expand("data/raw/{pid}/phone_locations_raw.csv", pid=config["PIDS"])) files_to_compute.extend(expand("data/interim/{pid}/phone_locations_processed.csv", pid=config["PIDS"])) diff --git a/docs/change-log.md b/docs/change-log.md index 1526e567..161dc920 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -1,5 +1,7 @@ # Change Log +## v0.4.1 +- Fix bug when no error message was displayed for an empty `[PHONE_DATA_YIELD][SENSORS]` when resampling location data ## v0.4.0 - Add four new phone sensors that can be used for PHONE_DATA_YIELD - Add code so new feature providers can be added for the new four sensors