From f9b44824acc5aa6444594e3c699204dcd6fce3c7 Mon Sep 17 00:00:00 2001 From: this-Aditya Date: Thu, 25 Jan 2024 17:00:54 +0530 Subject: [PATCH 01/11] Using PairState enum for paired status --- commons/passive/phone/phone_bluetooth_device_scanned.avsc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/commons/passive/phone/phone_bluetooth_device_scanned.avsc b/commons/passive/phone/phone_bluetooth_device_scanned.avsc index 80f52d35..ec2fac7b 100644 --- a/commons/passive/phone/phone_bluetooth_device_scanned.avsc +++ b/commons/passive/phone/phone_bluetooth_device_scanned.avsc @@ -8,6 +8,11 @@ {"name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)."}, {"name": "macAddressHash", "type": ["null", "bytes"], "default": null, "doc":"Hash of Nearby Bluetooth device MAC address."}, {"name": "hashSaltReference", "type": ["null", "int"], "doc": "Random identifier associated with the device or installation of the app. If the app gets reinstalled or installed on another device, it's clear during analysis that the mac addresses between iterations are not comparable.", "default": null}, - {"name": "isPaired", "type": ["null","boolean"], "doc": "Whether the bluetooth device is paired.", "default": null} + {"name": "pairedState", "type": ["null", { + "name": "PairedState", + "type": "enum", + "doc": "Represent the bond state of the remote device. \nNOT_PAIRED indicates the remote device is not paired. \nPAIRING indicates pairing is in progress with the remote device. \nPAIRED Indicates the remote device is paired.", + "symbols": ["NOT_PAIRED", "PAIRING", "PAIRED"] + }], "doc": "Indicates the current paired status of the remote device", "default": null } ] } From 7726b9b3858740f20e8d509d3f37dbc973d56a55 Mon Sep 17 00:00:00 2001 From: this-Aditya Date: Thu, 25 Jan 2024 17:18:53 +0530 Subject: [PATCH 02/11] minor change for CI passing --- commons/passive/phone/phone_bluetooth_device_scanned.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/passive/phone/phone_bluetooth_device_scanned.avsc b/commons/passive/phone/phone_bluetooth_device_scanned.avsc index ec2fac7b..8824511f 100644 --- a/commons/passive/phone/phone_bluetooth_device_scanned.avsc +++ b/commons/passive/phone/phone_bluetooth_device_scanned.avsc @@ -13,6 +13,6 @@ "type": "enum", "doc": "Represent the bond state of the remote device. \nNOT_PAIRED indicates the remote device is not paired. \nPAIRING indicates pairing is in progress with the remote device. \nPAIRED Indicates the remote device is paired.", "symbols": ["NOT_PAIRED", "PAIRING", "PAIRED"] - }], "doc": "Indicates the current paired status of the remote device", "default": null } + }], "doc": "Indicates the current paired status of the remote device.", "default": null } ] } From c9863ee4c1305c0ead4dddd18573e828d6ae84b4 Mon Sep 17 00:00:00 2001 From: Bastiaan Date: Tue, 13 Feb 2024 11:25:43 +0100 Subject: [PATCH 03/11] bump radar-jersey to version 0.11.1-snapshot --- java-sdk/buildSrc/src/main/kotlin/Versions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-sdk/buildSrc/src/main/kotlin/Versions.kt b/java-sdk/buildSrc/src/main/kotlin/Versions.kt index cae1e66a..d91d089f 100644 --- a/java-sdk/buildSrc/src/main/kotlin/Versions.kt +++ b/java-sdk/buildSrc/src/main/kotlin/Versions.kt @@ -9,7 +9,7 @@ object Versions { const val avro = "1.11.1" const val jackson = "2.15.2" const val argparse = "0.9.0" - const val radarJersey = "0.11.0-SNAPSHOT" + const val radarJersey = "0.11.1-SNAPSHOT" const val junit = "5.10.0" const val confluent = "7.5.0" const val kafka = "$confluent-ce" From 1463b8ad0134a2483d5eebbc2b5d727a09757160 Mon Sep 17 00:00:00 2001 From: Pauline Date: Tue, 5 Mar 2024 13:52:24 +0000 Subject: [PATCH 04/11] Add Fitbit intraday spo2 to schemas and specs --- commons/connector/fitbit/fitbit_intraday_spo2.avsc | 12 ++++++++++++ specifications/connector/radar-fitbit-connector.yml | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 commons/connector/fitbit/fitbit_intraday_spo2.avsc diff --git a/commons/connector/fitbit/fitbit_intraday_spo2.avsc b/commons/connector/fitbit/fitbit_intraday_spo2.avsc new file mode 100644 index 00000000..ff51a4e0 --- /dev/null +++ b/commons/connector/fitbit/fitbit_intraday_spo2.avsc @@ -0,0 +1,12 @@ +{ + "namespace": "org.radarcns.connector.fitbit", + "type": "record", + "name": "FitbitIntradaySpo2", + "doc": "Intra day spo2 data from fitbit device.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." }, + { "name": "timeInterval", "type": "int", "doc": "Chronological window size (s)." }, + { "name": "spo2", "type": "float", "doc": "Percentage value of SpO2 calculated at the specific time."} + ] +} diff --git a/specifications/connector/radar-fitbit-connector.yml b/specifications/connector/radar-fitbit-connector.yml index 3825f4e0..cebb0835 100644 --- a/specifications/connector/radar-fitbit-connector.yml +++ b/specifications/connector/radar-fitbit-connector.yml @@ -37,3 +37,6 @@ data: - doc: Skin temperature topic: connect_fitbit_skin_temperature value_schema: .connector.fitbit.FitbitSkinTemperature + - doc: Spo2 or Blood oxygen saturation + topic: connect_fitbit_intraday_spo2 + value_schema: .connector.fitbit.FitbitIntradaySpo2 \ No newline at end of file From 53446e588894a316b44579a31d9dfd9606046abd Mon Sep 17 00:00:00 2001 From: Pauline Date: Tue, 5 Mar 2024 14:04:31 +0000 Subject: [PATCH 05/11] Update intraday spo2 schema --- commons/connector/fitbit/fitbit_intraday_spo2.avsc | 1 - 1 file changed, 1 deletion(-) diff --git a/commons/connector/fitbit/fitbit_intraday_spo2.avsc b/commons/connector/fitbit/fitbit_intraday_spo2.avsc index ff51a4e0..9e64f7af 100644 --- a/commons/connector/fitbit/fitbit_intraday_spo2.avsc +++ b/commons/connector/fitbit/fitbit_intraday_spo2.avsc @@ -6,7 +6,6 @@ "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." }, - { "name": "timeInterval", "type": "int", "doc": "Chronological window size (s)." }, { "name": "spo2", "type": "float", "doc": "Percentage value of SpO2 calculated at the specific time."} ] } From d96dc26cc8e013e3d9849e760a0d7e836b26d51f Mon Sep 17 00:00:00 2001 From: Pauline Date: Wed, 6 Mar 2024 11:05:47 +0000 Subject: [PATCH 06/11] Update fitbit spo2 docs --- commons/connector/fitbit/fitbit_intraday_spo2.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/connector/fitbit/fitbit_intraday_spo2.avsc b/commons/connector/fitbit/fitbit_intraday_spo2.avsc index 9e64f7af..c9e8fd8a 100644 --- a/commons/connector/fitbit/fitbit_intraday_spo2.avsc +++ b/commons/connector/fitbit/fitbit_intraday_spo2.avsc @@ -6,6 +6,6 @@ "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." }, - { "name": "spo2", "type": "float", "doc": "Percentage value of SpO2 calculated at the specific time."} + { "name": "spo2", "type": "float", "doc": "Percentage value of SpO2 in the bloodstream. SpO2 data is collected when the user is in an extended period of sleep (at least 3 hours of quality sleep). Spo2 values are calculated on a 5-minute exponentially-moving average and provided at the end of a period of sleep."} ] } From 9a68fb276762885e3fbd95a7ff2bbc359fc96d20 Mon Sep 17 00:00:00 2001 From: Pauline Conde Date: Mon, 11 Mar 2024 14:50:12 +0000 Subject: [PATCH 07/11] Add resting HR to Fitbit specs --- specifications/connector/radar-fitbit-connector.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specifications/connector/radar-fitbit-connector.yml b/specifications/connector/radar-fitbit-connector.yml index cebb0835..259959c2 100644 --- a/specifications/connector/radar-fitbit-connector.yml +++ b/specifications/connector/radar-fitbit-connector.yml @@ -39,4 +39,7 @@ data: value_schema: .connector.fitbit.FitbitSkinTemperature - doc: Spo2 or Blood oxygen saturation topic: connect_fitbit_intraday_spo2 - value_schema: .connector.fitbit.FitbitIntradaySpo2 \ No newline at end of file + value_schema: .connector.fitbit.FitbitIntradaySpo2 + - doc: Resting heart rate + topic: connect_fitbit_resting_heart_rate + value_schema: .connector.fitbit.FitbitRestingHeartRate From 0ee56a62c6855b2c5525c9706c4956e5fcb85520 Mon Sep 17 00:00:00 2001 From: this-Aditya Date: Wed, 13 Mar 2024 20:25:28 +0530 Subject: [PATCH 08/11] Added field for backward compatibility --- commons/passive/phone/phone_bluetooth_device_scanned.avsc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commons/passive/phone/phone_bluetooth_device_scanned.avsc b/commons/passive/phone/phone_bluetooth_device_scanned.avsc index 8824511f..2f0f9e44 100644 --- a/commons/passive/phone/phone_bluetooth_device_scanned.avsc +++ b/commons/passive/phone/phone_bluetooth_device_scanned.avsc @@ -8,11 +8,12 @@ {"name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)."}, {"name": "macAddressHash", "type": ["null", "bytes"], "default": null, "doc":"Hash of Nearby Bluetooth device MAC address."}, {"name": "hashSaltReference", "type": ["null", "int"], "doc": "Random identifier associated with the device or installation of the app. If the app gets reinstalled or installed on another device, it's clear during analysis that the mac addresses between iterations are not comparable.", "default": null}, + {"name": "isPaired", "type": ["null","boolean"], "doc": "Whether the bluetooth device is paired. This has been deprecated in favor of pairedState in newer versions.", "default": null}, {"name": "pairedState", "type": ["null", { "name": "PairedState", "type": "enum", - "doc": "Represent the bond state of the remote device. \nNOT_PAIRED indicates the remote device is not paired. \nPAIRING indicates pairing is in progress with the remote device. \nPAIRED Indicates the remote device is paired.", - "symbols": ["NOT_PAIRED", "PAIRING", "PAIRED"] + "doc": "Represent the bond state of the remote device. \nNOT_PAIRED indicates the remote device is not paired. \nPAIRING indicates pairing is in progress with the remote device. \nPAIRED Indicates the remote device is paired. \nUNKNOWN indicates the pairing status is not known.", + "symbols": ["NOT_PAIRED", "PAIRING", "PAIRED", "UNKNOWN"] }], "doc": "Indicates the current paired status of the remote device.", "default": null } ] } From 65403bc6246c5f5e5ba9552b8a76dac6c00231eb Mon Sep 17 00:00:00 2001 From: Bastiaan Date: Fri, 15 Mar 2024 10:28:54 +0100 Subject: [PATCH 09/11] Security updates --- java-sdk/build.gradle.kts | 2 +- java-sdk/buildSrc/build.gradle.kts | 2 +- java-sdk/buildSrc/src/main/kotlin/Versions.kt | 18 +++++++++--------- .../build.gradle.kts | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/java-sdk/build.gradle.kts b/java-sdk/build.gradle.kts index 3a9d76c7..bb1c88b9 100644 --- a/java-sdk/build.gradle.kts +++ b/java-sdk/build.gradle.kts @@ -57,7 +57,7 @@ configure(listOf( apply(plugin = "org.radarbase.radar-publishing") radarKotlin { - javaVersion.set(11) + javaVersion.set(Versions.java) } radarPublishing { diff --git a/java-sdk/buildSrc/build.gradle.kts b/java-sdk/buildSrc/build.gradle.kts index 1854997d..76639766 100644 --- a/java-sdk/buildSrc/build.gradle.kts +++ b/java-sdk/buildSrc/build.gradle.kts @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "1.9.10" + kotlin("jvm") version "1.9.22" } repositories { diff --git a/java-sdk/buildSrc/src/main/kotlin/Versions.kt b/java-sdk/buildSrc/src/main/kotlin/Versions.kt index cae1e66a..bb9ad230 100644 --- a/java-sdk/buildSrc/src/main/kotlin/Versions.kt +++ b/java-sdk/buildSrc/src/main/kotlin/Versions.kt @@ -3,18 +3,18 @@ object Versions { const val kotlin = "1.9.10" const val java = 17 - const val avroGenerator = "1.5.0" + const val avroGenerator = "1.9.1" - const val radarCommons = "1.1.1-SNAPSHOT" - const val avro = "1.11.1" - const val jackson = "2.15.2" + const val radarCommons = "1.1.2" + const val avro = "1.11.3" + const val jackson = "2.16.1" const val argparse = "0.9.0" - const val radarJersey = "0.11.0-SNAPSHOT" - const val junit = "5.10.0" - const val confluent = "7.5.0" + const val radarJersey = "0.11.1" + const val junit = "5.10.1" + const val confluent = "7.6.0" const val kafka = "$confluent-ce" - const val okHttp = "4.11.0" - const val ktor = "2.3.0" + const val okHttp = "4.12.0" + const val ktor = "2.3.4" const val slf4j = "2.0.9" const val jakartaValidation = "3.0.2" const val log4j2 = "2.20.0" diff --git a/java-sdk/radar-schemas-registration/build.gradle.kts b/java-sdk/radar-schemas-registration/build.gradle.kts index 2d44b8f5..e70db27b 100644 --- a/java-sdk/radar-schemas-registration/build.gradle.kts +++ b/java-sdk/radar-schemas-registration/build.gradle.kts @@ -16,5 +16,5 @@ dependencies { implementation("io.confluent:kafka-schema-registry-client:${Versions.confluent}") implementation("org.apache.kafka:connect-json:${Versions.kafka}") - implementation("io.ktor:ktor-client-auth:2.3.4") + implementation("io.ktor:ktor-client-auth:${Versions.ktor}") } From cbc120f30b550b242c6c65c14399f1a8f4a91ff7 Mon Sep 17 00:00:00 2001 From: Bastiaan Date: Fri, 15 Mar 2024 10:36:27 +0100 Subject: [PATCH 10/11] snyk threshold to high --- .github/workflows/snyk.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/snyk.yaml b/.github/workflows/snyk.yaml index 8731bc7e..97a9baa6 100644 --- a/.github/workflows/snyk.yaml +++ b/.github/workflows/snyk.yaml @@ -34,4 +34,6 @@ jobs: --all-sub-projects --configuration-matching='^runtimeClasspath$' --org=radar-base - --policy-path=$PWD/.snyk + --policy-path=.snyk + --json-file-output=snyk.json + --severity-threshold=high From 636336ab472943ddb9d94dabedc87a8f84ce44fe Mon Sep 17 00:00:00 2001 From: Bastiaan Date: Fri, 15 Mar 2024 11:02:43 +0100 Subject: [PATCH 11/11] bump version and update README.md --- README.md | 2 +- java-sdk/buildSrc/src/main/kotlin/Versions.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d25ecee2..61b0e3ac 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ - In the `passive` subdirectory, add schemas for passive data collection, like wearables. - In the `stream` subdirectory, add schemas used in Kafka Streams. - The `specifications` directory contains specifications of what data types are collected through which devices. -- Java SDKs for each of the components are provided in the `java-sdk` folder, see installation instructions there. They are automatically generated from the Avro schemas using the Avro 1.8.2 specification. + - Java SDKs for each of the components are provided in the `java-sdk` folder, see installation instructions there. They are automatically generated from the Avro schemas using the Avro specification (version in [Versions.kt](java-sdk/buildSrc/src/main/kotlin/Versions.kt)). ## Usage diff --git a/java-sdk/buildSrc/src/main/kotlin/Versions.kt b/java-sdk/buildSrc/src/main/kotlin/Versions.kt index bb9ad230..186275ca 100644 --- a/java-sdk/buildSrc/src/main/kotlin/Versions.kt +++ b/java-sdk/buildSrc/src/main/kotlin/Versions.kt @@ -1,5 +1,5 @@ object Versions { - const val project = "0.8.7-SNAPSHOT" + const val project = "0.8.7" const val kotlin = "1.9.10" const val java = 17