Skip to content

Commit

Permalink
Merge pull request #199 from RADAR-base/release-0.5.5
Browse files Browse the repository at this point in the history
Release 0.5.5
  • Loading branch information
nivemaham committed Dec 9, 2019
2 parents dbc7755 + 7ae22f0 commit 857fede
Show file tree
Hide file tree
Showing 23 changed files with 306 additions and 34 deletions.
18 changes: 15 additions & 3 deletions commons/connector/upload/altoida/altoida_summary.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@
{"name": "label", "type": "string", "doc": "Label name of session as entered in the app."},
{"name": "age", "type": "int", "doc": "Age of the participant in years."},
{"name": "yearsOfEducation", "type": "int", "doc": "Years of education in years."},
{"name": "gender", "type": "int", "doc": "Gender of the participant 0=male, 1=female, 2=other."},
{"name": "class", "type": "int", "doc": "Classification based on the analysis 0=healthy, 1=at risk, 2=MCI due to AD."},
{"name": "gender", "type": {
"name": "GenderType",
"type": "enum",
"doc": "Gender types provided by Altoida.",
"symbols": ["MALE", "FEMALE", "OTHER", "UNKNOWN"]}, "doc": "Gender of the participant.", "default": "UNKNOWN"},
{"name": "classification", "type": ["null", {
"name": "Classification",
"type": "enum",
"doc": "Classifications provided by Altoida.",
"symbols": ["HEALTHY", "AT_RISK", "MCI_DUE_TO_AD"]}], "doc": "Classification based on the analysis 0=healthy, 1=at risk, 2=MCI due to AD.", "default": null},
{"name": "nmi", "type": "double", "doc": "NMI value of the test,a value in 0-100, where 0-33.3 is class 2, 33.3-66.6 is class 1, 66.6-100 is class 0."},
{"name": "groundTruth", "type": "int", "doc": "If the test is based on additional biomarkers -1=unknown, 0=healthy, 1= at risk, 2=MCI/AB+, 3=MCI/AB-."}
{"name": "groundTruth", "type": {
"name": "GroundTruth",
"type": "enum",
"doc": "GroundTruth supported by Altoida.",
"symbols": ["UNKNOWN", "HEALTHY", "AT_RISK", "MCI_OR_AB_PLUS", "MCI_OR_AB_MINUS"]}, "doc": "If the test is based on additional biomarkers -1=unknown, 0=healthy, 1= at risk, 2=MCI/AB+, 3=MCI/AB-.", "default": "UNKNOWN"}
]
}
4 changes: 2 additions & 2 deletions commons/connector/upload/altoida/altoida_trial.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"fields": [
{"name": "placeDuration", "type": "float", "doc": "Time the user required to place the object (s)."},
{"name": "findDuration", "type": "float", "doc": "Time the user required to find the object (s)."},
{"name": "stepAngularChange", "type": "float", "doc": "Mean angle the user turned during one step when finding the object (s)."},
{"name": "stepAngularChange", "type": ["null", "float"], "doc": "Mean angle the user turned during one step when finding the object (s).", "default": null},
{"name": "totalAngularChange", "type": "float", "doc": "Accumulated angular change when finding the object (radians)."},
{"name": "pathComplexity", "type": "float", "doc": "Path complexity when finding the object (m)."}
{"name": "pathComplexity", "type": ["null", "float"], "doc": "Path complexity when finding the object (m).", "default": null}
]
}
13 changes: 13 additions & 0 deletions commons/connector/upload/axivity/axivity_acceleration.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"namespace": "org.radarcns.connector.upload.axivity",
"type": "record",
"name": "AxivityAcceleration",
"doc": "Data from 3-axis accelerometer sensor with gravitational constant g as unit.",
"fields": [
{"name": "time", "type": "double", "doc": "Interpolated Timestamp in unix time from the CWA data."},
{"name": "timeReceived", "type": "double", "doc": "Timestamp in unix time received from upload."},
{"name": "x", "type": "float", "doc": "Acceleration in the x-axis (g)."},
{"name": "y", "type": "float", "doc": "Acceleration in the y-axis (g)."},
{"name": "z", "type": "float", "doc": "Acceleration in the z-axis (g)."}
]
}
11 changes: 11 additions & 0 deletions commons/connector/upload/axivity/axivity_battery.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"namespace": "org.radarcns.connector.upload.axivity",
"type": "record",
"name": "AxivityBattery",
"doc": "Battery level data from Axivity device.",
"fields": [
{"name": "time", "type": "double", "doc": "Timestamp in unix time acquired locally from the device."},
{"name": "timeReceived", "type": "double", "doc": "Timestamp in unix time received from upload."},
{"name": "batteryLevel", "type": "float", "doc": "Battery level of the Axivity device ." }
]
}
11 changes: 11 additions & 0 deletions commons/connector/upload/axivity/axivity_light.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"namespace": "org.radarcns.connector.upload.axivity",
"type": "record",
"name": "AxivityLight",
"doc": "Light data from axivity.",
"fields": [
{"name": "time", "type": "double", "doc": "Timestamp in unix time acquired locally from the device."},
{"name": "timeReceived", "type": "double", "doc": "Timestamp in unix time received from upload."},
{"name": "light", "type": "float", "doc": "Light." }
]
}
14 changes: 14 additions & 0 deletions commons/connector/upload/axivity/axivity_metadata.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"namespace": "org.radarcns.connector.upload.axivity",
"type": "record",
"name": "AxivityMetadata",
"doc": "Data that contains one column with the version name as type string.",
"fields": [
{"name": "time", "type": "double", "doc": "Timestamp in unix time acquired locally from the device."},
{"name": "timeReceived", "type": "double", "doc": "Timestamp in unix time received from upload."},
{"name": "deviceId", "type": "string", "doc": "Version number."},
{"name": "exerciseCode", "type": "string", "doc": "Exercise code from axivity."},
{"name": "bodyLocation", "type": "int", "doc": "Body location recorded on the axivity device."},
{"name": "studyCode", "type": "string", "doc": "Study code recorded on the axivity device."}
]
}
11 changes: 11 additions & 0 deletions commons/connector/upload/axivity/axivity_temperature.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"namespace": "org.radarcns.connector.upload.axivity",
"type": "record",
"name": "AxivityTemperature",
"doc": "Temperature data from axivity.",
"fields": [
{"name": "time", "type": "double", "doc": "Timestamp in unix time acquired locally from the device."},
{"name": "timeReceived", "type": "double", "doc": "Timestamp in unix time received from upload."},
{"name": "temperature", "type": "float", "doc": "Temperature (°C)." }
]
}
11 changes: 11 additions & 0 deletions commons/connector/upload/oxford/oxford_camera_axes.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"namespace": "org.radarcns.connector.upload.oxford",
"type": "record",
"name": "OxfordCameraAxes",
"doc": "Three-axes reference system.",
"fields": [
{"name": "x", "type": "float", "doc": "X coordinate value."},
{"name": "y", "type": "float", "doc": "Y coordinate value."},
{"name": "z", "type": "float", "doc": "Z coordinate value."}
]
}
21 changes: 21 additions & 0 deletions commons/connector/upload/oxford/oxford_camera_data.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"namespace": "org.radarcns.connector.upload.oxford",
"type": "record",
"name": "OxfordCameraData",
"doc": "Entry for an image captured by Oxford's wearable camera.",
"fields": [
{"name": "time", "type": "double", "doc": "Time since Unix Epoch as reported by the device (s)."},
{"name": "timeReceived", "type": "double", "doc": "Time this record was processed (s)."},
{"name": "name", "type": "string", "doc": "Image name."},
{"name": "infraredProximity", "type": "boolean", "doc": "True if a the infrared sensor detected an warm object (e.g. part of a human body) closeby when the image was captured."},
{"name": "acceleration", "type": "OxfordCameraAxes", "doc": "Acceleration of the camera when the image was captured (g)."},
{"name": "magneticField", "type": "OxfordCameraAxes", "doc": "Magnetic field of the camera when the image was captured (100 µT)."},
{"name": "orientation", "type": "OxfordCameraAxes", "doc": "Orientation of the camera when the image was captured (unknown unit, unknown interpretation)."},
{"name": "temperature", "type": "float", "doc": "Ambient temperature when the image was recorded (celcius)."},
{"name": "colorMean", "type": "OxfordCameraRgb", "doc": "Mean color saturation over all pixels of the image in the sRGB color space (range 0-1)."},
{"name": "luminanceMean", "type": "float", "doc": "Mean luminance over all pixels of the image (0 - 1). Calculation unknown but assumed to match sum of RGB values."},
{"name": "exposure", "type": "int", "doc": "Physical exposure of the captured image (unknown unit, unknown range)."},
{"name": "gain", "type": "float", "doc": "Gain applied to raw photo sensor values. Amplification factor of the signal (unknown range)."},
{"name": "colorBalance", "type": "OxfordCameraRgb", "doc": "Relative distribution of gain applied in the captured image (uncertain interpretation)."}
]
}
12 changes: 12 additions & 0 deletions commons/connector/upload/oxford/oxford_camera_image.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"namespace": "org.radarcns.connector.upload.oxford",
"type": "record",
"name": "OxfordCameraImage",
"doc": "Image captured by Oxford's wearable camera. This only contains a URL reference to the actual image data.",
"fields": [
{"name": "time", "type": "double", "doc": "Time since Unix Epoch as reported by the device (s)."},
{"name": "timeReceived", "type": "double", "doc": "Time this record was processed (s)."},
{"name": "name", "type": "string", "doc": "Image name."},
{"name": "url", "type": "string", "doc": "URL where image is stored."}
]
}
11 changes: 11 additions & 0 deletions commons/connector/upload/oxford/oxford_camera_rgb.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"namespace": "org.radarcns.connector.upload.oxford",
"type": "record",
"name": "OxfordCameraRgb",
"doc": "Color in sRGB color space.",
"fields": [
{"name": "red", "type": "float", "doc": "Red value."},
{"name": "green", "type": "float", "doc": "Green value."},
{"name": "blue", "type": "float", "doc": "Blue value."}
]
}
4 changes: 2 additions & 2 deletions java-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ repositories {
dependencies {
// Commons schemas (backend, passive remote monitoring app)
compile 'org.radarcns:radar-schemas-commons:0.4.3'
compile 'org.radarcns:radar-schemas-commons:0.5.5'
// Questionnaire schemas (active remote monitoring app)
compile 'org.radarcns:radar-schemas-tools:0.4.3'
compile 'org.radarcns:radar-schemas-tools:0.5.5'
}
```
Usually, you only need to include the schemas you actually need in your dependencies.
Expand Down
4 changes: 2 additions & 2 deletions java-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ subprojects {
apply plugin: 'idea'

// Configuration
version = '0.5.4'
version = '0.5.5'
group = 'org.radarcns'
ext.githubRepoName = 'RADAR-base/RADAR-Schemas'

Expand Down Expand Up @@ -128,5 +128,5 @@ subprojects {
}

wrapper {
gradleVersion '5.5.1'
gradleVersion '6.0.1'
}
Binary file modified java-sdk/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion java-sdk/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
35 changes: 15 additions & 20 deletions java-sdk/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand Down Expand Up @@ -125,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down Expand Up @@ -154,19 +154,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

Expand All @@ -175,14 +175,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
2 changes: 1 addition & 1 deletion java-sdk/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
2 changes: 1 addition & 1 deletion java-sdk/radar-schemas-tools/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ext {

repositories {
jcenter()
maven { url 'http://packages.confluent.io/maven/' }
maven { url 'https://packages.confluent.io/maven/' }
maven { url "https://dl.bintray.com/radar-base/org.radarbase" }
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import net.sourceforge.argparse4j.impl.action.StoreConstArgumentAction;
import net.sourceforge.argparse4j.inf.ArgumentParser;
import net.sourceforge.argparse4j.inf.Namespace;
import org.apache.kafka.clients.admin.AlterConfigOp;
import org.apache.kafka.clients.admin.AlterConfigOp.OpType;
import org.apache.kafka.clients.admin.AlterConfigsResult;
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.consumer.ConsumerConfig;
Expand Down Expand Up @@ -380,7 +382,9 @@ private void resetSchemaRegistryId() throws KeeperException, InterruptedExceptio
private void commitBackup(SchemaTopicBackup backup)
throws ExecutionException, InterruptedException, KeeperException {
AlterConfigsResult alterResult = topics.getKafkaClient()
.alterConfigs(Map.of(topicResource, backup.getConfig()));
.incrementalAlterConfigs(Map.of(topicResource, backup.getConfig().entries().stream()
.map(e -> new AlterConfigOp(e, OpType.SET))
.collect(Collectors.toList())));

try (KafkaProducer<byte[], byte[]> producer = new KafkaProducer<>(getProducerProps())) {
List<Future<RecordMetadata>> futures = backup.getRecords().stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public void close() {

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void start(SourceCatalogue sourceCatalogue) throws Exception {

ResourceConfig config = new ResourceConfig();
config.register(new SourceCatalogueService(sourceCatalogue));
ServletHolder servlet = new ServletHolder(new ServletContainer(config));
Expand Down
Loading

0 comments on commit 857fede

Please sign in to comment.