Skip to content

Releases: cph-cachet/carp.core-kotlin

Version 1.0.0-alpha.37

22 Sep 12:35
cd8bd29
Compare
Choose a tag to compare
Pre-release

Changes to JSON serialization format:

  • Use of optional fields in snapshots where relevant (#12): collections which may be empty, null for optional parameters, and empty strings for applicationData.
  • Optional text is nullable, rather than default empty string. This includes removing StudyInvitation.empty(), for which null is now preferred.
  • Encoding of default values can now be disabled (and is disabled by default serializer) (cfdccc6).
  • Duration is now serialized using ISO standard, rather than microseconds (#287).

Dependency updates:

  • Kotlin 1.5.31
  • coroutines 1.5.2

Common

  • BatteryAwareSampling.low is no longer nullable (f57e39d).
  • Bugfix: Make default sampling schemes in BatteryAwareSamplingScheme public (b603b9e).
  • Renamed:
    • inputType to inputDataType in ParticipantAttribute and InputDataTypeList (fa78283).
    • InputElement.name to prompt (#262).
  • MAC address builder can now use either : or - separators and accepts both lowercase and uppercase (8b28201).
  • Removed DeviceRegistration.fromJson and toJson methods (6cf30f2). Use the default json.serialization encode/decode functions instead.
  • Added DeviceDescriptor.getDefaultSamplingConfiguration() to facilitate client implementations (#311).

Deployments

  • ParticipationService.setParticipantData changed to support setting multiple participant data at once (518d05f).
  • Add protocol warning for BackgroundTask with no measures (e642397).
  • TypeScript declarations fixed for StudyDeploymentStatus and DeviceDeploymentStatus (#307).

Studies

  • TypeScript declarations fixed for StudyStatus (#307).

Clients

  • Add ClientRepository.removeStudyRuntime() (#313)

Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp

Version 1.0.0-alpha.36

03 Sep 09:26
98fccd8
Compare
Choose a tag to compare
Pre-release

Primarily, this version Introduces the data subsystem, with minor additions to the common module in order to accommodate the new endpoint definitions.

Data

Added a definition for data streams identified by (DataStreamId), and objects to initialize data points for data streams (Measurement, DataStreamPoint, DataStreamSequence, and DataStreamBatch).

These classes are currently used by the new data ingestion endpoints. They provide a clear contract between the client subsystem and the data subsystem on how to upload data, and which data is expected/valid; this was infrastructure-specific before, i.e., not part of core.

Common

  • The base class EnumObjectList has been turned into a map (EnumObjectMap) since lookups by key were shared by all implementing classes. (cd02b1f) Correspondingly, DataTypeMetaDataList has been turned into DataTypeMetaDataMap and DataTypeSamplingSchemeList into DataTypeSamplingSchemeMap.
  • Added intersect extension for Range, which may be of use to simplify implementing data stream sequence/timestamping logic. (62b81da)
  • Added getInteractionDataTypes to TaskDescriptor, which should return the data types that are uploaded as the result of user interactions, e.g., filling out a survey. (a03abfe)

Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp

Version 1.0.0-alpha.35

10 Aug 11:17
Compare
Choose a tag to compare
Pre-release

Dependency updates:

  • Kotlin 1.5.21
  • kotlinx.serialization 1.2.2
  • coroutines 1.5.1

Timestamp variables are now consistently named using the past tense followed by on, rather than a date or time suffix. E.g., createdOn rather than creationDate. This could cause confusion as to whether only a date or time of day was stored.

Common

  • Replaced previously custom DateTime with kotlinx-datetime Instant
  • Replaced previously custom TimeSpan with kotlin's Duration
  • CustomInput is no longer generic

Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp

Version 1.0.0-alpha.34

23 Jun 14:20
41fd1e0
Compare
Choose a tag to compare
Pre-release

Common

  • Measure can be now either DataStream or TriggerData:
    • DataStream: what was previously known as Measure. Describes passive data collection of a particular type on a device.
    • TriggerData: determines that when a trigger starts or stops a task, the conditions under which this happens should be measured.
  • Added SignalStrength to AltBeacon.Sensors. (#277)
  • Bugfix: DataTypeMetaDataList did not iterate containing types.

Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp

Version 1.0.0-alpha.33

16 Jun 19:26
501d40d
Compare
Choose a tag to compare
Pre-release

Studies

  • Participant group data is no longer exposed through RecruitmentService. From now on, call ParticipationService in the deployments subsystem directly to get/set this data.
    • Removed RecruitmentService.setParticipantGroupData().
    • ParticipantGroupStatus no longer contains participant data.
  • Bugfix: race condition when calling RecruitmentService.deployParticipantGroup (#269).

Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp

Version 1.0.0-alpha.32

31 May 17:49
e73b5f7
Compare
Choose a tag to compare
Pre-release

Common

  • description added to TaskDescriptor to specify reason for data collection.
  • Added a WebTask: describes a redirect to a web page which contains the task which needs to be performed.
  • DataType meta data can now be retrieved through CarpDataTypes:
    • displayName: a name which can be used to display to the user which data is collected.
    • timeType: determines how matching Data should be stored temporally, i.e., whether endTime should be specified.
  • applicationData fields can now use plain (non-escaped) JSON objects when JSON serialization is used.

Protocols / deployments

  • applicationData added to StudyProtocolSnapshot, which is passed along to any MasterDeviceDeployment when the protocol is deployed.

Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp

Version 1.0.0-alpha.31

17 May 12:38
Compare
Choose a tag to compare
Pre-release

Stabilized namespaces

The primary change in this release involves moving classes to different namespaces in preparation of a stable 1.0.0 release:

  • All subsystem namespaces are now plural:
    • deployment is now deployments
    • client is now clients
  • Classes have been moved to root namespaces which determine their role in the system, as dictated by DDD (application, domain, and infrastructure namespaces).
  • The InputElement interface has been moved side-by-side with its concrete implementations in data.input.elements (now plural), similar to the other extendable classes.
  • Core classes previously located in protocols.domain (such as DeviceDescriptor, Trigger, etc.) have been moved to common.application. These classes were not strictly linked to the protocols subsystem, but made up a 'shared kernel' reused in all subsystems.

With all core classes moved to the common module, there is no longer a need for subsystem-specific SerializersModules and Json serializers. These have been removed and all subsystems can rely on the central Json serializer defined in the common.infrastructure.serialization.

Core study protocol model

Many of the core classes defining study protocols are now located in common.application, as they are frequently passed between application services. This release made some fundamental changes to the core model, which are summarized here:

DeviceDescriptor

  • SamplingSchemes are no longer strongly-linked to DataType. Instead, DeviceDescriptors decide on the DataTypeSamplingScheme for each of the DataTypes they support.
  • Implementations of DeviceDescriptor need to list Sensors (DataTypeSamplingSchemeList) and Tasks (TaskDescriptorList). This is statically available information on device capabilities which is not serialized since it is not configurable by the researcher defining the study protocol.
  • isValidConfiguration renamed to isValidRegistration. Documentation on what DeviceRegistration is should now be clearer.

TaskDescriptor / Measure

  • Specializations of Measure are removed and it is now a concrete class.
  • Measures are initialized through DataTypeSamplingScheme and no longer through separate functions accessible from the DeviceDescriptor. In addition, the API is extended to support checking whether or not a constructed Measure is valid for the related DataTypeSamplingScheme. E.g., to check whether or not a set interval exceeds a minimum/maximum value.
  • Likewise, TaskDescriptors can be constructed through the DeviceDescriptor's TaskDescriptorList.
  • ConcurrentTask is renamed to BackgroundTask.

DataTypeSamplingScheme

  • Added a BatteryAwareSamplingScheme specialization of DataTypeSamplingScheme which serves as a base class for sampling schemes which adapt to how much battery is left on a device. This is now used by Smartphone to implement a AdaptiveGranularitySamplingScheme for GEOLOCATION.

Trigger

  • Triggers can now also stop tasks.
  • TriggeredTask is renamed to TaskControl.
  • Extension functions are added to Trigger to create related TaskControl objects. E.g.: start in phone.atStartOfStudy().start( measures, phone ).

Studies and deployments subsystem

  • Renamed ParticipantService in studies subsystem to RecruitmentService to disambiguate it from ParticipationService in the deployments subystem. (496d33f)
  • Creating a study deployment (DeploymentService.createStudyDeployment) and inviting participants to that deployment is now a single call. Correspondingly, ParticipationService.addParticipation has been removed. Instead, createStudyDeployment takes a List<ParticipantInvitation> which needs to specify a complete list of all people to be invited to the deployment. This now also supports passing preregistrations for connected devices (e.g., the researcher already configured the connection details for a device they hand out to participants).
  • participationId has been removed. It is now named participantId and is provided by the calling subsystem in ParticipantInvitation. The original intent was for this to be an anonymous ID for participants, but this did not fully work since studyDeploymentId was not anonymized. Instead, we have decided anonymization (of both studyDeploymentId and participantId) needs to happen (by default) on data export.
  • Bugfix: event bus race condition in ParticipantService. (#248)

Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp

Version 1.0.0-alpha.30

25 Mar 19:25
8d1d026
Compare
Choose a tag to compare
Pre-release

Dependency upgrades:

  • Kotlin 1.4.31
  • kotlinx.serialization 1.1.0
  • Gradle 6.8.3

Common

  • Change to the EventBus abstraction: handlers now need to be 'activated' after 'registering' them. A base ChannelConventionEventBus class can be used when a one-to-one mapping between messaging channel and application service is desired. (#238)
  • Removing studies propagates to removal of data in deployment subsystem. (#231)
  • Bugfix: locale-dependent serialization of MAC address and UUID. (2357620)
  • Serialization improvements:
    • UnknownPolymorphicSerializer no longer has a hardcoded class discriminator. (7f699e2)
    • Remove periods in JSON keys so that BSON serialization may work. (27447dd)
    • Fallback to normal polymorphic serialization for non-Json formats. (fef947d)
    • UnknownPolymorphicSerializer is now the default fallback serializer for types which support it and no longer needs to be specified in every place where the type is used. (#232)

Protocols

  • Bugfix: ProtocolVersion.date should always be serialized. (5cd6016)

Deployment

  • Dependencies between DeploymentService and ParticipationService are now managed through events on the event bus, and the code is refactored accordingly; StudyDeployment does device management (deployment and in the future status management), whereas ParticipantGroup manages everything related to participants, such as assigning devices to participants, consent, and storing participant data. (#227)
    • Participation is now stored in ParticipantGroup rather than in StudyDeployment.
    • Assigned master devices and registration state is stored in ParticipantGroup.
    • DeploymentRepository dependency is removed from ParticipationService.
  • Assigned master devices are stored and returned as part of active invitations. (#228)
  • Added DeploymentRepository.remove().
  • Added ParticipationRepository.remove().
  • Added DeploymentService.removeStudyDeployments().

TypeScript declarations

  • Added TypeScript declarations for deployment service requests. (#229)
  • Added toArray for ArrayList and HashSet. (0470149)

Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp

Version 1.0.0-alpha.29.1 (hotfix)

Version 1.0.0-alpha.28.3 (hotfix)