< Summary

Information
Class: Orchestrator.Commands.Observability.PrepareRepeatedMatchSlice.PrepareRepeatedMatchSliceSettings
Assembly: Orchestrator
File(s): /home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/Commands/Observability/PrepareRepeatedMatchSlice/PrepareRepeatedMatchSliceSettings.cs
Line coverage
65%
Covered lines: 15
Uncovered lines: 8
Coverable lines: 23
Total lines: 105
Line coverage: 65.2%
Branch coverage
68%
Covered branches: 15
Total branches: 22
Branch coverage: 68.1%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%
Validate()68.18%532260%

File(s)

/home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/Commands/Observability/PrepareRepeatedMatchSlice/PrepareRepeatedMatchSliceSettings.cs

#LineLine coverage
 1using System.ComponentModel;
 2using Spectre.Console;
 3using Spectre.Console.Cli;
 4
 5namespace Orchestrator.Commands.Observability.PrepareRepeatedMatchSlice;
 6
 7public sealed class PrepareRepeatedMatchSliceSettings : CommandSettings
 8{
 9    [CommandOption("--community-context")]
 10    [Description("Community context used to scope persisted historical match outcomes")]
 111    public string CommunityContext { get; set; } = string.Empty;
 12
 13    [CommandOption("--matchdays")]
 14    [Description("Optional comma-separated list of matchdays to sample from. Defaults to all Bundesliga matchdays.")]
 15    public string? Matchdays { get; set; }
 16
 17    [CommandOption("--match-count")]
 18    [Description("Number of distinct fixtures to sample")]
 19    [DefaultValue(5)]
 120    public int MatchCount { get; set; } = 5;
 21
 22    [CommandOption("--repetitions")]
 23    [Description("Number of repeated predictions to materialize per selected fixture")]
 24    [DefaultValue(4)]
 125    public int Repetitions { get; set; } = 4;
 26
 27    [CommandOption("--sample-seed")]
 28    [Description("Optional deterministic seed for random fixture selection. Defaults to the current UTC date in yyyyMMdd
 29    public int? SampleSeed { get; set; }
 30
 31    [CommandOption("--starts-after")]
 32    [Description("Optional match start cutoff in NodaTime invariant ZonedDateTime 'G' format. Only matches strictly afte
 33    public string? StartsAfter { get; set; }
 34
 35    [CommandOption("--slice-key")]
 36    [Description("Optional slice key override. Defaults to random-<match-count>x<repetitions>-seed-<sample-seed>")]
 37    public string? SliceKey { get; set; }
 38
 39    [CommandOption("--source-pool-key")]
 40    [Description("Optional source pool identifier used in dataset names and output paths. Defaults to all-matchdays")]
 41    public string? SourcePoolKey { get; set; }
 42
 43    [CommandOption("--dataset-name")]
 44    [Description("Optional hosted dataset name override for the prepared repeated-match slice")]
 45    public string? DatasetName { get; set; }
 46
 47    [CommandOption("--dataset-description")]
 48    [Description("Optional short note describing this repeated-match slice dataset")]
 49    public string? DatasetDescription { get; set; }
 50
 51    [CommandOption("--output-directory")]
 52    [Description("Optional output directory override. Defaults to artifacts/langfuse-experiments/repeated-match-slices/<
 53    public string? OutputDirectory { get; set; }
 54
 55    public override ValidationResult Validate()
 56    {
 157        if (string.IsNullOrWhiteSpace(CommunityContext))
 58        {
 059            return ValidationResult.Error("--community-context is required");
 60        }
 61
 162        if (MatchCount < 1)
 63        {
 164            return ValidationResult.Error("--match-count must be at least 1");
 65        }
 66
 167        if (Repetitions < 1)
 68        {
 169            return ValidationResult.Error("--repetitions must be at least 1");
 70        }
 71
 172        if (!string.IsNullOrWhiteSpace(StartsAfter))
 73        {
 74            try
 75            {
 076                _ = EvaluationTimeParser.Parse(StartsAfter);
 077            }
 78            catch (ArgumentException ex)
 79            {
 080                return ValidationResult.Error(ex.Message);
 81            }
 82        }
 83
 184        if (string.IsNullOrWhiteSpace(Matchdays))
 85        {
 086            return ValidationResult.Success();
 87        }
 88
 189        var segments = Matchdays.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
 190        if (segments.Length == 0)
 91        {
 092            return ValidationResult.Error("--matchdays must contain at least one matchday number when provided");
 93        }
 94
 195        foreach (var segment in segments)
 96        {
 197            if (!int.TryParse(segment, out var matchday) || matchday is < 1 or > 34)
 98            {
 099                return ValidationResult.Error($"Invalid matchday '{segment}'. Expected an integer between 1 and 34.");
 100            }
 101        }
 102
 1103        return ValidationResult.Success();
 0104    }
 105}

Methods/Properties

.ctor()
Validate()