| | | 1 | | using System.ComponentModel; |
| | | 2 | | using Spectre.Console; |
| | | 3 | | using Spectre.Console.Cli; |
| | | 4 | | |
| | | 5 | | namespace Orchestrator.Commands.Observability.PrepareCommunityToDate; |
| | | 6 | | |
| | | 7 | | public sealed class PrepareCommunityToDateSettings : CommandSettings |
| | | 8 | | { |
| | | 9 | | [CommandOption("--community-context")] |
| | | 10 | | [Description("Community context used to fetch tippuebersicht snapshots and build the prepared dataset")] |
| | 1 | 11 | | public string CommunityContext { get; set; } = string.Empty; |
| | | 12 | | |
| | | 13 | | [CommandOption("--cutoff-matchday")] |
| | | 14 | | [Description("Optional cutoff matchday. Defaults to the currently displayed tippuebersicht matchday.")] |
| | | 15 | | public int? CutoffMatchday { get; set; } |
| | | 16 | | |
| | | 17 | | [CommandOption("--source-pool-key")] |
| | | 18 | | [Description("Optional source pool identifier used in dataset names and output paths. Defaults to through-md<cutoff> |
| | | 19 | | public string? SourcePoolKey { get; set; } |
| | | 20 | | |
| | | 21 | | [CommandOption("--slice-key")] |
| | | 22 | | [Description("Optional slice key override. Defaults to community-to-date-md<cutoff>.")] |
| | | 23 | | public string? SliceKey { get; set; } |
| | | 24 | | |
| | | 25 | | [CommandOption("--dataset-name")] |
| | | 26 | | [Description("Optional hosted dataset name override for the prepared community-to-date dataset")] |
| | | 27 | | public string? DatasetName { get; set; } |
| | | 28 | | |
| | | 29 | | [CommandOption("--output-directory")] |
| | | 30 | | [Description("Optional output directory override. Defaults to artifacts/langfuse-experiments/community-to-date/<comm |
| | | 31 | | public string? OutputDirectory { get; set; } |
| | | 32 | | |
| | | 33 | | public override ValidationResult Validate() |
| | | 34 | | { |
| | 1 | 35 | | if (string.IsNullOrWhiteSpace(CommunityContext)) |
| | | 36 | | { |
| | 0 | 37 | | return ValidationResult.Error("--community-context is required"); |
| | | 38 | | } |
| | | 39 | | |
| | 1 | 40 | | if (CutoffMatchday is < 1 or > 35) |
| | | 41 | | { |
| | 0 | 42 | | return ValidationResult.Error("--cutoff-matchday must be between 1 and 35 when provided"); |
| | | 43 | | } |
| | | 44 | | |
| | 1 | 45 | | return ValidationResult.Success(); |
| | | 46 | | } |
| | | 47 | | } |