< Summary

Information
Class: Orchestrator.Commands.Observability.ExportExperimentDataset.ExportExperimentDatasetSettings
Assembly: Orchestrator
File(s): /home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/Commands/Observability/ExportExperimentDataset/ExportExperimentDatasetSettings.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 14
Coverable lines: 14
Total lines: 49
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 16
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_CommunityContext()100%210%
set_CommunityContext(...)100%210%
.ctor()100%210%
get_Matchdays()100%210%
set_Matchdays(...)100%210%
get_OutputPath()100%210%
set_OutputPath(...)100%210%
Validate()0%272160%

File(s)

/home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/Commands/Observability/ExportExperimentDataset/ExportExperimentDatasetSettings.cs

#LineLine coverage
 1using System.ComponentModel;
 2using Spectre.Console;
 3using Spectre.Console.Cli;
 4
 5namespace Orchestrator.Commands.Observability.ExportExperimentDataset;
 6
 7public sealed class ExportExperimentDatasetSettings : CommandSettings
 8{
 9    [CommandOption("--community-context")]
 10    [Description("Community context used to scope persisted match outcomes")]
 011    public string CommunityContext { get; set; } = string.Empty;
 12
 13    [CommandOption("--matchdays")]
 14    [Description("Optional comma-separated list of matchdays to export. Defaults to all Bundesliga matchdays.")]
 015    public string? Matchdays { get; set; }
 16
 17    [CommandOption("--output")]
 18    [Description("Path to the JSON file to write. Defaults to artifacts/langfuse-dataset/<community>.json")]
 019    public string? OutputPath { get; set; }
 20
 21    public override ValidationResult Validate()
 22    {
 023        if (string.IsNullOrWhiteSpace(CommunityContext))
 24        {
 025            return ValidationResult.Error("--community-context is required");
 26        }
 27
 028        if (string.IsNullOrWhiteSpace(Matchdays))
 29        {
 030            return ValidationResult.Success();
 31        }
 32
 033        var segments = Matchdays.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
 034        if (segments.Length == 0)
 35        {
 036            return ValidationResult.Error("--matchdays must contain at least one matchday number when provided");
 37        }
 38
 039        foreach (var segment in segments)
 40        {
 041            if (!int.TryParse(segment, out var matchday) || matchday is < 1 or > 34)
 42            {
 043                return ValidationResult.Error($"Invalid matchday '{segment}'. Expected an integer between 1 and 34.");
 44            }
 45        }
 46
 047        return ValidationResult.Success();
 48    }
 49}