Skip to content

feat(forecasts): Add metadata column#127

Merged
devsjc merged 4 commits intomainfrom
devsjc/forecast-metadata
Feb 25, 2026
Merged

feat(forecasts): Add metadata column#127
devsjc merged 4 commits intomainfrom
devsjc/forecast-metadata

Conversation

@devsjc
Copy link
Contributor

@devsjc devsjc commented Feb 25, 2026

Contribution Checklist

  • Have you followed the Open Climate Fix Contribution Guidelines?
  • Have you referenced the Issue this PR addresses, where applicable?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added a summary of the changes?
  • Have you written new tests for your changes, where applicable?
  • Have you successfully run make lint with your changes locally?
  • Have you successfully run make test with your changes locally?

Warning

PRs may be closed if all the above boxes are not checked.

Changes in this Pull Request

Adds a metadata column to the forecasts table, and corresponding parameters in the CreateForecast routes, and other routes that return forecast values. Returned forecast value metadata is the combination of the predicted generation values metadata and the forecast metadata.

peterdudfield
peterdudfield previously approved these changes Feb 25, 2026
@github-actions
Copy link

Benchmark Results

Benchmark results
?   	github.com/openclimatefix/data-platform/cmd	[no test files]
?   	github.com/openclimatefix/data-platform/internal/gen/ocf/dp	[no test files]
?   	github.com/openclimatefix/data-platform/internal/interceptors	[no test files]
PASS
ok  	github.com/openclimatefix/data-platform/internal/server/dummy	0.005s
{"level":"debug","time":"2026-02-25T13:06:44Z","message":"Completed migrations"}
goos: linux
goarch: amd64
pkg: github.com/openclimatefix/data-platform/internal/server/postgres
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkPostgresClient/2400000/GetForecastAsTimeseries-4         	      52	  21675322 ns/op
BenchmarkPostgresClient/2400000/GetForecastAtTimestamp-4          	      54	  21546607 ns/op
BenchmarkPostgresClient/2400000/GetObservationsAsTimeseries-4     	     960	   1206239 ns/op
BenchmarkPostgresClient/2400000/CreateForecast-4                  	      50	  22686961 ns/op
PASS
ok  	github.com/openclimatefix/data-platform/internal/server/postgres	1300.522s
?   	github.com/openclimatefix/data-platform/internal/server/postgres/gen	[no test files]

@devsjc devsjc merged commit fb9bb7f into main Feb 25, 2026
3 checks passed
@devsjc devsjc deleted the devsjc/forecast-metadata branch February 25, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants