| | | 1 | | using System.ComponentModel; |
| | | 2 | | using Spectre.Console; |
| | | 3 | | using Spectre.Console.Cli; |
| | | 4 | | |
| | | 5 | | namespace Orchestrator.Commands.Observability.PrepareRepeatedMatch; |
| | | 6 | | |
| | | 7 | | public sealed class PrepareRepeatedMatchSettings : CommandSettings |
| | | 8 | | { |
| | | 9 | | [CommandOption("--community-context")] |
| | | 10 | | [Description("Community context used to load persisted historical outcomes")] |
| | 1 | 11 | | public string CommunityContext { get; set; } = string.Empty; |
| | | 12 | | |
| | | 13 | | [CommandOption("--home")] |
| | | 14 | | [Description("Home team name")] |
| | 1 | 15 | | public string HomeTeam { get; set; } = string.Empty; |
| | | 16 | | |
| | | 17 | | [CommandOption("--away")] |
| | | 18 | | [Description("Away team name")] |
| | 1 | 19 | | public string AwayTeam { get; set; } = string.Empty; |
| | | 20 | | |
| | | 21 | | [CommandOption("--matchday")] |
| | | 22 | | [Description("Historical matchday number")] |
| | | 23 | | public int? Matchday { get; set; } |
| | | 24 | | |
| | | 25 | | [CommandOption("--sample-size")] |
| | | 26 | | [Description("Number of repeated executions to materialize in the dedicated hosted dataset")] |
| | | 27 | | [DefaultValue(5)] |
| | 1 | 28 | | public int SampleSize { get; set; } = 5; |
| | | 29 | | |
| | | 30 | | [CommandOption("--slice-key")] |
| | | 31 | | [Description("Optional repetition slice key override. Defaults to repeat-<sample-size>")] |
| | | 32 | | public string? SliceKey { get; set; } |
| | | 33 | | |
| | | 34 | | [CommandOption("--source-pool-key")] |
| | | 35 | | [Description("Optional source pool identifier used in dataset names and output paths. Defaults to md<matchday>-<home |
| | | 36 | | public string? SourcePoolKey { get; set; } |
| | | 37 | | |
| | | 38 | | [CommandOption("--dataset-name")] |
| | | 39 | | [Description("Optional hosted dataset name override for the repeated-match dataset")] |
| | | 40 | | public string? DatasetName { get; set; } |
| | | 41 | | |
| | | 42 | | [CommandOption("--dataset-description")] |
| | | 43 | | [Description("Optional short note describing why this repeated-match dataset is interesting")] |
| | | 44 | | public string? DatasetDescription { get; set; } |
| | | 45 | | |
| | | 46 | | [CommandOption("--output-directory")] |
| | | 47 | | [Description("Optional output directory override. Defaults to artifacts/langfuse-experiments/repeated-match/<communi |
| | | 48 | | public string? OutputDirectory { get; set; } |
| | | 49 | | |
| | | 50 | | public override ValidationResult Validate() |
| | | 51 | | { |
| | 1 | 52 | | if (string.IsNullOrWhiteSpace(CommunityContext)) |
| | | 53 | | { |
| | 0 | 54 | | return ValidationResult.Error("--community-context is required"); |
| | | 55 | | } |
| | | 56 | | |
| | 1 | 57 | | if (string.IsNullOrWhiteSpace(HomeTeam)) |
| | | 58 | | { |
| | 0 | 59 | | return ValidationResult.Error("--home is required"); |
| | | 60 | | } |
| | | 61 | | |
| | 1 | 62 | | if (string.IsNullOrWhiteSpace(AwayTeam)) |
| | | 63 | | { |
| | 0 | 64 | | return ValidationResult.Error("--away is required"); |
| | | 65 | | } |
| | | 66 | | |
| | 1 | 67 | | if (!Matchday.HasValue) |
| | | 68 | | { |
| | 0 | 69 | | return ValidationResult.Error("--matchday is required"); |
| | | 70 | | } |
| | | 71 | | |
| | 1 | 72 | | if (SampleSize < 1) |
| | | 73 | | { |
| | 0 | 74 | | return ValidationResult.Error("--sample-size must be at least 1"); |
| | | 75 | | } |
| | | 76 | | |
| | 1 | 77 | | return ValidationResult.Success(); |
| | | 78 | | } |
| | | 79 | | } |