Configuration

class Configuration(profileName: String? = null) : ConfigVerifiable

Runtime configuration for various aspects of the grader.

The profile is read during runtime with the following priority:

  • --profile flag if running from standalone JAR

  • VM options, i.e. -Dgrader.profile=

  • profile in config.properties

Constructors

Link copied to clipboard
constructor(profileName: String? = null)

Types

Link copied to clipboard
data class BuildInfo(val _version: String, val git: Configuration.BuildInfo.GitInfo)

Build information fields.

Link copied to clipboard
object Companion
Link copied to clipboard
data class Compat(val pipelineStage: Configuration.Compat.PipelineStage, val _useSharedDirForEnvFiles: String = "")

Compatibility properties fields (compat.*).

Link copied to clipboard
data class Context(val submission: Configuration.Context.PathMapping, val template: Configuration.Context.PathMapping, val skeleton: Configuration.Context.PathMapping, val provided: Configuration.Context.PathMapping, val generated: Configuration.Context.PathMapping, val srcName: String, val inPaths: Configuration.Context.EnvMapping, val outPathsRoots: Configuration.Context.EnvMapping, val logPaths: Configuration.Context.EnvMapping, val compressionName: String? = "gz", val _eraseOutputDirOnShutdown: String = "") : ConfigVerifiable

Context properties fields (context.*).

Link copied to clipboard
data class Database(val url: String, val driver: String, val username: String, val password: String)

Database properties fields (database.*).

Link copied to clipboard
data class Debug(val dockerDaemonDispatcher: Configuration.Debug.DockerDaemonDispatcher)

Debug properties fields (debug.*).

Link copied to clipboard

Docker properties fields (docker.*).

Link copied to clipboard
data class PipelineStage(val _paths: String, val _stageResultValidationMode: String = "", val outputTrunc: Configuration.PipelineStage.OutputTruncation = OutputTruncation(32_000_000, 128_000)) : ConfigVerifiable

Pipeline stage properties fields (pipelineStage.*).

Link copied to clipboard
annotation class Prefix(val value: String)

Indicates to fromProperties that properties with the namespace of value should be used to parse the configuration.

Link copied to clipboard
sealed class Profile

Configuration profiles.

Link copied to clipboard
data class Redis(val host: String, val _port: String) : ConfigVerifiable

Redis properties fields (redis.*).

Link copied to clipboard
data class Report(val json: Configuration.Report.ReportFormat, val yaml: Configuration.Report.ReportFormat, val _emitScoreReport: String = "") : ConfigVerifiable

Report properties fields (report.*).

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Dumps all fields of this configuration into a string, in the form of key=value pairs.

Link copied to clipboard
private fun toProperties(): Properties

Outputs this configuration into a Properties object, which can then be serialized into a file.

Link copied to clipboard
open fun verifyAll()

Verifies that the required constraints of this object is met.

Link copied to clipboard
open fun verifyImpl()

Additional checks for verifying constraints on fields which do not implement ConfigVerifiable.