feat(substations): transmission_line_endpoints join table + sync (PR 6/9)#199
Closed
texture-fleet-agent[bot] wants to merge 2 commits intomeridian/substations-cronfrom
Closed
Conversation
…c (PR 6/9) Implements transmission_line_endpoints join table to replace fuzzy sub1/sub2 string references with formal foreign keys. Includes fuzzy matching sync script with confidence scoring for community review workflow. **What's included:** - Schema: transmission_line_endpoints table with role (from|to) and match_confidence - Migration: 0005_transmission_line_endpoints.sql with indexes - Sync script: fuzzy-matches transmission_lines.sub1/sub2 against substation names - Levenshtein + suffix-variation matching for reliability - Match confidence (0..1) for high/medium/low confidence filtering **Features:** - Auto-matches high-confidence pairs (≥0.85) - Flags lower-confidence for community review - Handles common suffix variations (SUBSTATION/STATION/SUB) - Batch insert with upsert support **Next:** - PR #7: power_plant_interconnections join + sync - PR #8: Join query API endpoints - PR #9: Docs + catalog --- *Part of CommonGrid 9th entry point milestone (substations) — PR 6 of 9*
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Vercel Pro plan enforces a max of 800 seconds for serverless function maxDuration. The previous 1800s value caused the build to succeed but deployment to fail at the patchBuild step with: Builder returned invalid maxDuration value for Serverless Function "api/cron/sync-substations". Serverless Functions must have a maxDuration between 1 and 800 for plan pro. Capping at 800 unblocks deploys. Full US substation syncs that exceed this should be moved to a long-running runner (GitHub Actions, Render, etc.) rather than a Vercel serverless function.
Contributor
|
Reopening after incorrect close during fallback merge. CI ✓, ready to merge. |
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.
Part of the substations 9th entry point epic.
Adds
transmission_line_endpointsjoin table linking substations to the transmission lines they terminate, plus a sync script that populates it from HIFLD line geometries (endpoint matching with confidence scores).Stack: PR 6/9 (base: #198 [PR 5 cron])
Enables spatial graph traversal: for any substation, which transmission lines come in and go out.