Skip to content

feat: support reading tilt and orientation from Data Platform metadat… - #135

Merged
PavanRaghavendraKulkarni merged 1 commit into
mainfrom
read_tilt_orientation_from_dp
Sep 9, 2026
Merged

PavanRaghavendraKulkarni merged 1 commit into
mainfrom
read_tilt_orientation_from_dp

Conversation

@PavanRaghavendraKulkarni

@PavanRaghavendraKulkarni PavanRaghavendraKulkarni commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Description

Adds support for reading tilt/orientation from Data Platform location metadata, falling back to the database when a location hasn't been backfilled with that metadata yet (or isn't found in DP at all). This is a prerequisite for eventually eliminating the database dependency entirely (see the follow-up PR, "Stripping out the datamodel") — DP has no native field for tilt/orientation, so they have to be read from each location's metadata Struct, written there by pv-site-api's create_location/update_location.

DbPvDataSource.get() now prefers DP-sourced tilt/orientation when present in a location's metadata, falling back to the site database's tilt/orientation columns otherwise — so behavior is unchanged for any site not yet backfilled in DP.

Fixes #

How Has This Been Tested?

  • Added unit tests covering: DP metadata present (used), DP metadata absent (falls back to DB), site not found in DP at all (falls back to DB)

  • Full existing test suite still passing

  • This one tested against the dev platform

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@PavanRaghavendraKulkarni
PavanRaghavendraKulkarni marked this pull request as ready for review September 2, 2026 07:06
@peterdudfield

peterdudfield commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor
  • Update PR descirptions with how its tested
  • Run locally, and plot forecast against current forecast (this cane ben viewed on site forecast page on the dashboard)

@PavanRaghavendraKulkarni

PavanRaghavendraKulkarni commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Analysis Dashboard

Screenshot 2026-09-02 at 1 57 23 PM

Local forecast

Screenshot 2026-09-02 at 2 12 09 PM

@PavanRaghavendraKulkarni
PavanRaghavendraKulkarni merged commit e76c2bf into main Sep 9, 2026
6 checks passed
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