Releases: cph-cachet/carp.core-kotlin
Version 1.0.0-alpha.28.2 (hotfix)
Applies three hotfixes to version 1.0.0-alpha.28:
- Bugfix:
ProtocolVersion.date
should always be serialized. - Bugfix: load
classDiscriminator
for unkown polymorphism at runtime. - Make sure
ParticipantGroupSnapshot
can be serialized as BSON.
Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp
Version 1.0.0-alpha.28.1 (hotfix)
Applies two hotfixes to version 1.0.0-alpha.28:
- Bugfix:
ProtocolVersion.date
should always be serialized. - Bugfix: load
classDiscriminator
for unkown polymorphism at runtime.
Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp
Version 1.0.0-alpha.29
This is an intermediate release with no difference in behavior for any of the application services. The primary reason for this release is to allow incorporating some big architectural changes.
- An
EventBus
has been introduced to handle integration events across application services. (ApplicationServiceEventBus
) - Some domain objects in the studies subsystem and how they are stored in repositories has changed.
However, there is an incomplete new StudyService.remove
endpoint, but for now this does not propagate removal to the deployment subsystem. Therefore using it is not yet recommended. In a next release this will also remove all associated deployments to the study in the deployment subsystem as expected.
Studies
StudyService
andParticipantService
use the event bus so that theStudyRepository
is no longer a dependency forParticipantService
. (#221)Participation
s are no longer stored inStudy
(and thusStudyRepository
), but moved to a newRecruitment
aggregate root stored inParticipantRepository
.
Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp
Version 1.0.0-alpha.28
This release primarily includes support to store data related to participants in study deployments.
Dependency upgrades:
- Kotlin 1.4.21
- kotlinx.serialization 1.0.1
Common
New features
- A
StudyProtocol
now containsexpectedParticipantData
which describes the 'profile'Data
participants or researchers need to fill out for participants in a study (ParticipantAttribute
s). Both standardized typesafe data and custom data can be requested;DefaultParticipantAttribute
andCustomParticipantAttribute
respectively. - To facilitate front-end development, developers do not need to be aware about concrete
Data
classes when uploading or retrieving participant data. An abstraction is introduced for requested user input which specifies a representation format and constraints (InputElement
). Using this abstraction input elements can be rendered (e.g.,Text
andSelectOne
), regardless of whether these are standardized input types or custom types defined by the researcher. - Default
InputDataType
s are registered in aInputDataTypeList
. The default one for CARP isCarpInputDataTypes
. This list needs to be passed to helper functions onParticipantAttribute
to perform data validation and to convert input data toData
classes for upload and vice versa.
Changes
InvalidConfigurationError
has been removed and should be replaced with defaultIllegalArgumentException
.
Deployment
ParticipationService
:
- Added
getParticipantData
andgetParticipantDataList
which returnsParticipantData
. - Added
setParticipantData
to set a singleInputDataType
in a deployment to specifiedData
.
Studies
ParticipantService
:
ParticipantGroupStatus
which is returned by various endpoints (e.g.,getParticipantGroupStatusList
) now contains participant data.- Added
setParticipantGroupData
to set data for a deployed participant group. This simply redirects tosetParticipantData
in the deployment subsystem'sParticipationService
.
Protocols
- Expected exceptions in
StudyProtocolRepository
changed slightly (e.g.,getBy
returnsnull
when not found rather than an exception). AddedInMemoryStudyProtocolRepository
as an example implementation and tests are fully updated inStudyProtocolRepositoryTest
.
ProtocolService
:
- Renamed
update
toaddVersion
. - Added
updateParticipantDataConfiguration
which allows updating the expected participant data for a specific protocol version. - Endpoints specifying a specific protocol now take a
StudyProtocol.Id
comprised of a ownerUUID
and protocol name.ProtocolOwner
no longer needs to be passed. getAllFor
should return an empty list rather thanIllegalArgumentException
when no protocols for the specified owner are found.
Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp
Version 1.0.0-alpha.27
This release primarily contains non-functional changes, in preparation for new functional changes to come. Upgrading to this release will prepare you to more easily upgrade to alpha.28 next.
Studies subsystem changes:
- Added
ParticipantService.getParticipant
. (6f99ed5)
Deployment subsystem change:
- Split off
ParticipationService
fromDeploymentService
andParticipationRepository
fromDeploymentRepository
. (#197)
Common:
EmailAddress
andTimeSpan
are now serialized as primitive strings, not JSON objects.DateTime
is now serialized as a string in ISO 8601 UTC format, and no longer as a long representing milliseconds.
Client subsystem:
- Bugfix:
remainingDevicesToRegister
returned in the study runtime statusRegisteringDevices
could change when callingtryDeployment
. Now it is immutable.
Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp
Version 1.0.0-alpha.26
Protocols subsystem:
- Bugfix: not all device and registration types could be serialized since some weren't registered for polymorphic serialization.
Studies subsystem:
- Split off
ParticipantService
fromStudyService
andParticipantRepository
fromStudyRepository
. (#192)
Test subsystem:
- Added
SerializerRegistrationTest.verifyTypesAreRegistered()
helper method which tests whether all types extending from a specific base type in a specified namespace are registered for polymorphic serialization in a specifiedSerializersModule
. This is now used to unit test the associated bugfix in this release. (https://github.com/cph-cachet/carp.core-kotlin/blob/develop/carp.test/src/jvmMain/kotlin/dk/cachet/carp/test/serialization/SerializerRegistrationTest.kt)
Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp
Version 1.0.0-alpha.25
Protocol subsystem change:
- Added
ProtocolFactoryService
as a new service which will create study protocols from templates. The first factory method added now iscreateCustomProtocol
which can be used to create a study protocol which has its own way of describing study protocols that deviates from the CARP core study protocol model. This is an optional service which does not need to be implemented; protocols can be created as usual through the protocols API. (#187)
Client subsystem change:
ClientManager.stopStudy()
added to stop a study deployment from the client. (#188)
Common:
- Bugfix:
DateTime
could't be serialized in formats other than JSON. (092d439)
Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp
Version 1.0.0-alpha.24
Client subsystem changes:
- Old
DataCollector
renamed toDataListener
.DataListener
is the central abstraction used by the client to subscribe and unsubscribe to data streams on the local device as well as connected devices. - Added
DeviceDataCollector
andConnectedDeviceDataCollector
which are created/injected throughDeviceDataCollectorFactory
. This is the entry point for developers to add integrations for sensors. (#177) StudyRuntimeStatus
is now a state machine with states:NotReadyForDeployment
,RegisteringDevices
, andDeployed
. When deployment has been received the state containsDeviceRegistrationStatus
for the master device and each of the connected devices.remainingDevicesToRegister
is now persisted inStudyRuntimeSnapshot
.- It is now verified whether connected devices are supported during deployment, whether they are used or not. Before deployment would succeed if no measures were ever sent to the unsupported connected device. (35175c2)
ClientManager.getConnectedDeviceManager()
can be used to retrieve aConnectedDeviceManager
which once a device has been registered (as exposed byDeviceRegistrationStatus
) can be used to access device status, but will not expose subscription to data streams which will remain internal toClientManager
.- Bugfix:
ClientManager.tryDeployment
now returnsDeployed
when a study was already deployed previously (returnedfalse
indicating deployment failed in the past).
Deployment subsystem change:
- Bugfix: loading
StudyDeploymentSnapshot
which contained more than one device registration history failed. (#180).
Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp
Version 1.0.0-alpha.23
Updated dependencies:
kotlinx.serialization
to1.0.0
- The collection initializers for JS which were previously used have been removed. The new TS declarations now require
ListSerializer
,MapSerializer
, andSetSerializer
initializer functions rather than the oldget_list
,get_set
, andget_map
. (bea4dd6)
- The collection initializers for JS which were previously used have been removed. The new TS declarations now require
Protocols subsystem changes:
- Added new device registration:
BLESerialNumberDeviceRegistration
andMACAddressDeviceRegistration
. - Added new device descriptor:
BLEHeartRateSensor
(usingMACAddressDeviceRegistration
). (#166)
Common:
- Added new data types:
Acceleration
,RRInterval
, andSensorSkinContact
, used byBLEHeartRateSensor
. - Bugfix:
UUID.stringRepresentation
was case sensitive. Made it case sensitive (lower case needed) and added aparse
method to make initialization less strict (allowing upper case).
Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp
Version 1.0.0-alpha.22
- Introduction of
Data
and refactoring ofDataType
.DataType
and CARPDataType
instances were moved tocarp.common
(d8f3dc8).DataType
can now be initialized usingfromFullyQualifiedName
(cdfd47d).- First
Data
types to hold actual data:FreeFormText
,ECG
,Geolocation
, andHeartRate
. - Better disambiguation between
DataTypeSamplingScheme
andDataType
, as part of which theprotocols.domain.data
namespace was renamed toprotocols.domain.sampling
and all sampling schemes were suffixed withSamplingScheme
(444680b).
- Upgraded to
kotlinx.serialization
1.0.0-RC2.- JetBrains changed the artifact name in this release, from
kotlinx-serialization-core
tokotlinx-serialization-json
which you need to update in your dependencies. - Correspondingly, the
kotlinx.serialization
TypeScript declarations have been split into two modules: functions toget_list_
,get_set_
, andget_map_
serializers remain incore
, but to get access toJson
you now need to include the newjson
module. (56eff90) kotlinx.serialization
now setsencodeDefaults
inJson
configuration tofalse
by default. This is incompatible with the current implementation ofUnknownPolymorphicSerializer
, so in case you want to use this you need to make sure to setencodeDefaults
totrue
(#169). Or, simply use CARP'screateDefaultJSON
method which has this set totrue
by default.
- JetBrains changed the artifact name in this release, from
Protocols subsystem changes:
DeviceDescriptor
now containssupportedDataTypes
which is used inStudyProtocol
to warn when the protocol contains triggers containing a measure with an unexpectedDataType
for the target device (not listed insupportedDataTypes
). This warning is returned asUnexpectedMeasuresWarning
when callingStudyProtocol.getDeploymentIssues()
.
Client subsystem changes:
- Introduced a
DataCollector
interface inStudyRuntime
which will become the central point to collect requested data. For now it checks whether data collection for requested data types for a specificMasterDeviceDeployment
is supported (baec73d).
Multiplatform release accessible through Maven:
https://mvnrepository.com/artifact/dk.cachet.carp