diff --git a/internal/cli/root.go b/internal/cli/root.go index 4ec47f5..f9e7af5 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -223,7 +223,6 @@ func (r Runner) resolveGenerate(args []string) (app.GenerateRequest, error) { Path: opts.ConfigPath, Units: opts.Units, Timezone: opts.Timezone, - Output: opts.Output, }) if err != nil { return app.GenerateRequest{}, err diff --git a/internal/config/config.go b/internal/config/config.go index aacfed4..e9cb8df 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -17,7 +17,6 @@ type Config struct { MissingSource MissingSourceConfig `yaml:"missing_source"` Scriptorium ScriptoriumConfig `yaml:"scriptorium"` Workspace WorkspaceConfig `yaml:"workspace"` - Reports ReportOutputConfig `yaml:"reports"` Dayparts []DaypartConfig `yaml:"dayparts"` RecentChange RecentChangeConfig `yaml:"recent_change"` } @@ -52,11 +51,6 @@ type WorkspaceConfig struct { PreflightDir string `yaml:"preflight_dir"` } -type ReportOutputConfig struct { - OutputDir string `yaml:"output_dir"` - Paths map[string]string `yaml:"paths"` -} - type DaypartConfig struct { Name string `yaml:"name"` Start string `yaml:"start"` diff --git a/internal/config/config_test.go b/internal/config/config_test.go index da0366b..584e1fe 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -92,7 +92,7 @@ func TestInvalidConfigProducesActionableError(t *testing.T) { } func TestLoadAppliesOverrides(t *testing.T) { - cfg, err := Load(LoadOptions{Units: "metric", Timezone: "+09:30", Output: "./out"}) + cfg, err := Load(LoadOptions{Units: "metric", Timezone: "+09:30"}) if err != nil { t.Fatalf("Load() error = %v", err) } @@ -102,7 +102,4 @@ func TestLoadAppliesOverrides(t *testing.T) { if cfg.WeatherAPI.Timezone != "+09:30" { t.Fatalf("Timezone = %q, want +09:30", cfg.WeatherAPI.Timezone) } - if cfg.Reports.OutputDir != "./out" { - t.Fatalf("OutputDir = %q, want ./out", cfg.Reports.OutputDir) - } } diff --git a/internal/config/defaults.go b/internal/config/defaults.go index 0677387..cce805a 100644 --- a/internal/config/defaults.go +++ b/internal/config/defaults.go @@ -28,10 +28,6 @@ func Defaults() Config { DataPackagesDir: "data-packages", PreflightDir: "preflight", }, - Reports: ReportOutputConfig{ - OutputDir: "reports", - Paths: map[string]string{}, - }, Dayparts: []DaypartConfig{ {Name: "overnight", Start: "00:00", End: "06:00"}, {Name: "morning", Start: "06:00", End: "12:00"}, diff --git a/internal/config/load.go b/internal/config/load.go index 7e4651a..829bb55 100644 --- a/internal/config/load.go +++ b/internal/config/load.go @@ -12,7 +12,6 @@ type LoadOptions struct { Path string Units string Timezone string - Output string } func Load(opts LoadOptions) (Config, error) { @@ -35,9 +34,6 @@ func Load(opts LoadOptions) (Config, error) { if opts.Timezone != "" { cfg.WeatherAPI.Timezone = opts.Timezone } - if opts.Output != "" { - cfg.Reports.OutputDir = opts.Output - } if err := Validate(cfg); err != nil { return Config{}, err @@ -61,8 +57,5 @@ func mergeFile(cfg *Config, path string) error { if cfg.MissingSource.Sources == nil { cfg.MissingSource.Sources = map[string]MissingSourcePolicy{} } - if cfg.Reports.Paths == nil { - cfg.Reports.Paths = map[string]string{} - } return nil } diff --git a/internal/config/validate.go b/internal/config/validate.go index 0b7e629..88b8a28 100644 --- a/internal/config/validate.go +++ b/internal/config/validate.go @@ -58,9 +58,6 @@ func Validate(cfg Config) error { if cfg.Workspace.Root == "" { return fmt.Errorf("workspace.root is required") } - if cfg.Reports.OutputDir == "" { - return fmt.Errorf("reports.output_dir is required") - } if len(cfg.Dayparts) == 0 { return fmt.Errorf("dayparts must contain at least one entry") }