From 0eb0abf4a8d955665a197173ae5427e44fd615c3 Mon Sep 17 00:00:00 2001 From: Bel LaPointe <153096461+breel-render@users.noreply.github.com> Date: Wed, 28 Jan 2026 09:53:04 -0700 Subject: [PATCH] bpis to period as well --- cmd/cli/main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/cli/main.go b/cmd/cli/main.go index 55a3785..e75e979 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -6,6 +6,7 @@ import ( "flag" "fmt" "io" + "maps" "math" "os" "os/signal" @@ -100,6 +101,14 @@ func Main() { panic(err) } bpis = b + if period := config.Query.Period; !period.Empty() { + before := period.Stop.Format("2006-01-02") + for _, timeToValue := range bpis { + maps.DeleteFunc(timeToValue, func(k string, _ float64) bool { + return k > before + }) + } + } } cpiNormalizer := ana.NewNormalizer()