Skip to content

fix(logic): Return geometry when asked#133

Merged
devsjc merged 2 commits intomainfrom
devsjc/include-geometry
Mar 18, 2026
Merged

fix(logic): Return geometry when asked#133
devsjc merged 2 commits intomainfrom
devsjc/include-geometry

Conversation

@devsjc
Copy link
Copy Markdown
Contributor

@devsjc devsjc commented Mar 18, 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

Fixes a bug where the geometry wasn't returned when requested with a location. (See #111)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 18, 2026

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-03-18T16:52:18Z","message":"Completed migrations"}
goos: linux
goarch: amd64
pkg: github.com/openclimatefix/data-platform/internal/server/postgres
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkPostgresClient/small/GetForecastAsTimeseries-4         	      56	  20332997 ns/op
BenchmarkPostgresClient/small/GetForecastAtTimestamp-4          	      79	  15023824 ns/op
BenchmarkPostgresClient/small/GetObservationsAsTimeseries-4     	     867	   1281966 ns/op
BenchmarkPostgresClient/small/CreateForecast-4                  	      78	  15064613 ns/op
PASS
ok  	github.com/openclimatefix/data-platform/internal/server/postgres	72.729s
?   	github.com/openclimatefix/data-platform/internal/server/postgres/gen	[no test files]
Benchmark vs base branch
goos: linux
goarch: amd64
pkg: github.com/openclimatefix/data-platform/internal/server/postgres
cpu: AMD EPYC 7763 64-Core Processor                
                                                   │ bench-main.txt │  bench-devsjc-include-geometry.txt   │
                                                   │     sec/op     │    sec/op     vs base                │
PostgresClient/small/GetForecastAsTimeseries-4         18.70m ± ∞ ¹   20.33m ± ∞ ¹       ~ (p=1.000 n=1) ²
PostgresClient/small/GetForecastAtTimestamp-4          14.59m ± ∞ ¹   15.02m ± ∞ ¹       ~ (p=1.000 n=1) ²
PostgresClient/small/GetObservationsAsTimeseries-4     1.198m ± ∞ ¹   1.282m ± ∞ ¹       ~ (p=1.000 n=1) ²
PostgresClient/small/CreateForecast-4                  14.56m ± ∞ ¹   15.06m ± ∞ ¹       ~ (p=1.000 n=1) ²
geomean                                                8.306m         8.764m        +5.52%
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

@devsjc devsjc force-pushed the devsjc/include-geometry branch from ca19a9c to 7e51d4d Compare March 18, 2026 16:49
@devsjc devsjc merged commit 7367fb9 into main Mar 18, 2026
4 checks passed
@devsjc devsjc deleted the devsjc/include-geometry branch March 18, 2026 16:53
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.

1 participant