feat: include tilt and orientation in Data Platform location metadata… - #228
Open
PavanRaghavendraKulkarni wants to merge 4 commits into
Open
PavanRaghavendraKulkarni wants to merge 4 commits into
PavanRaghavendraKulkarni wants to merge 4 commits into
Conversation
… and add backfill script
…ters and assertions
PavanRaghavendraKulkarni
marked this pull request as ready for review
August 28, 2026 13:15
…rrent state from Data Platform
…e version to 1.1.9
Contributor
Author
|
Script ran only on the Development not on the Production |
peterdudfield
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
forecast-inferenceis moving to read all site data (includingtilt/orientation) directly from the Data Platform instead of the site database. DP has no native field for these — they're a property of the specific energy source, not the underlying geometry — so this PR writes them into each location'smetadataon create/update (confirmed to land onsources_history, notgeometries: verified via source-code trace of the DP server and a live behavioral test — renaming a location leaves its metadata untouched).create_location()/update_location()indataplatform_client.pynow accept optionaltilt/orientation, andmain.py's site create/edit routes pass them through.update_location()also gains an opt-inraise_on_errorflag (defaultFalse, live API behavior unchanged) so batch tooling can detect real failures instead of the existing swallow-and-log default silently reporting success.scripts/backfill_dp_tilt_orientation.py(new in this PR) against the target environment to populate DP metadata for sites that predate this change:Tests:
DB_URL=... DATA_PLATFORM_HOST=... DATA_PLATFORM_PORT=... \ python scripts/backfill_dp_tilt_orientation.py --apply