klinker41 / riskscore-kt-public

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RiskScore

API

The public API is RiskScoreCalculator, RiskScoreCalculatorConfiguration and ScanInstance. There is an example configuration at RiskScoreCalculatorConfiguration.exampleConfiguration taken from the GAEN repo.

Usage

The risk score is computed from the list of ScanInstances associated with a single exposure window.

For a sample, data is available at https://github.com/nhsx/gaen_data-public. This data can be tested by running

./gradlew run

Adding as a dependency

Include the following to the repositories block in your module's build.gradle file

maven {
    url = 'https://maven.pkg.github.com/nhsx/riskscore-kt-public'
    credentials {
        username = project.findProperty("gpr.user") ?: System.getenv("PACKAGES_ACCESS_ACTOR")
        password = project.findProperty("gpr.key") ?: System.getenv("PACKAGES_ACCESS_TOKEN")
    }
}

Then you can use the riskscore-kt dependency as follows

implementation "uk.nhs.covid19:riskscore-kt:$riskscore_version"

NB: Consumers of this library should bundle a Kotlin stdlib with API version 1.3.

Versioning

This module uses semantic versioning.

Release

To publish the package, simply create a release on GitHub and this will trigger a workflow to publish the package.

Be sure to update the version number in build.gradle to match the tag of the release.

Dependencies

The module depends on Apache commons-math v3 for the Gamma distribution calculations.

Testing

This module uses kotest for unit and property based testing. To use this in Intellij / Android studio install the kotest plugin.

About

License:Other


Languages

Language:Kotlin 100.0%