< Summary

Information
Class: Orchestrator.Commands.Observability.ReconstructPrompt.ReconstructPromptSettings
Assembly: Orchestrator
File(s): /home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/Commands/Observability/ReconstructPrompt/ReconstructPromptSettings.cs
Line coverage
69%
Covered lines: 16
Uncovered lines: 7
Coverable lines: 23
Total lines: 79
Line coverage: 69.5%
Branch coverage
58%
Covered branches: 7
Total branches: 12
Branch coverage: 58.3%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Model()100%11100%
set_Model(...)100%11100%
.ctor()100%11100%
get_CommunityContext()100%11100%
set_CommunityContext(...)100%11100%
get_HomeTeam()100%11100%
set_HomeTeam(...)100%11100%
get_AwayTeam()100%11100%
set_AwayTeam(...)100%11100%
get_Matchday()100%11100%
set_Matchday(...)100%11100%
get_WithJustification()100%11100%
set_WithJustification(...)100%11100%
get_EvaluationTime()100%11100%
set_EvaluationTime(...)100%11100%
Validate()58.33%241256.25%

File(s)

/home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/Commands/Observability/ReconstructPrompt/ReconstructPromptSettings.cs

#LineLine coverage
 1using System.ComponentModel;
 2using Spectre.Console;
 3using Spectre.Console.Cli;
 4
 5namespace Orchestrator.Commands.Observability.ReconstructPrompt;
 6
 7public class ReconstructPromptSettings : CommandSettings
 8{
 9    [CommandArgument(0, "<MODEL>")]
 10    [Description("The model used for the stored prediction")]
 111    public string Model { get; set; } = string.Empty;
 12
 13    [CommandOption("--community-context")]
 14    [Description("Community context used for the stored prediction")]
 115    public string CommunityContext { get; set; } = string.Empty;
 16
 17    [CommandOption("--home")]
 18    [Description("Home team name")]
 119    public string HomeTeam { get; set; } = string.Empty;
 20
 21    [CommandOption("--away")]
 22    [Description("Away team name")]
 123    public string AwayTeam { get; set; } = string.Empty;
 24
 25    [CommandOption("--matchday")]
 26    [Description("Matchday number for the selected match")]
 127    public int? Matchday { get; set; }
 28
 29    [CommandOption("--with-justification")]
 30    [Description("Reconstruct the justification prompt variant")]
 31    [DefaultValue(false)]
 132    public bool WithJustification { get; set; }
 33
 34    [CommandOption("--evaluation-time")]
 35    [Description("Optional explicit evaluation time in NodaTime invariant ZonedDateTime 'G' format, for example '2026-03
 136    public string? EvaluationTime { get; set; }
 37
 38    public override ValidationResult Validate()
 39    {
 140        if (string.IsNullOrWhiteSpace(Model))
 41        {
 042            return ValidationResult.Error("Model is required");
 43        }
 44
 145        if (string.IsNullOrWhiteSpace(CommunityContext))
 46        {
 047            return ValidationResult.Error("--community-context is required");
 48        }
 49
 150        if (string.IsNullOrWhiteSpace(HomeTeam))
 51        {
 052            return ValidationResult.Error("--home must be provided");
 53        }
 54
 155        if (string.IsNullOrWhiteSpace(AwayTeam))
 56        {
 057            return ValidationResult.Error("--away must be provided");
 58        }
 59
 160        if (!Matchday.HasValue)
 61        {
 062            return ValidationResult.Error("--matchday must be provided");
 63        }
 64
 165        if (!string.IsNullOrWhiteSpace(EvaluationTime))
 66        {
 67            try
 68            {
 169                _ = Commands.Observability.EvaluationTimeParser.Parse(EvaluationTime);
 170            }
 71            catch (ArgumentException ex)
 72            {
 073                return ValidationResult.Error(ex.Message);
 74            }
 75        }
 76
 177        return ValidationResult.Success();
 078    }
 79}