Skip to content

Migrate vista precinct script to open source dependencies#193

Merged
stdavis merged 7 commits into
mainfrom
feat/script-migration
Jun 25, 2026
Merged

Migrate vista precinct script to open source dependencies#193
stdavis merged 7 commits into
mainfrom
feat/script-migration

Conversation

@stdavis

@stdavis stdavis commented Jun 12, 2026

Copy link
Copy Markdown
Member

This has not been fully tested on the vista servers yet so I don't want to merge this. But I did want a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the Vista precinct update/export tooling away from ArcPy/ODC-based workflows to an open-source, Conda-managed Python stack (GeoPandas + SQLAlchemy), with supporting docs and developer ergonomics.

Changes:

  • Replaces legacy ArcPy precinct export/update scripts with a new UpdatePrecinctID.py that queries Oracle + PostGIS and performs a GeoPandas spatial join.
  • Adds a Conda environment definition, sidecar JSON config template, a “tracer bullet” connectivity script, and pytest coverage for key helpers/output formatting.
  • Removes several ArcPy-based checker/update scripts and an exported CSV artifact; updates repo ignore rules and VS Code settings for the new workflow.

Reviewed changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/vista_pallet.py Adds a Forklift pallet definition for Vista data/services.
scripts/UpdatePrecinctIDByCounty.py Removes legacy ArcPy + pyodbc county updater script.
scripts/UpdatePrecinctID.py New open-source implementation for exporting precinct info via Oracle/PostGIS + GeoPandas join.
scripts/trace_update_precinct_id.py Adds a connectivity/import “tracer bullet” script for the new environment.
scripts/test_update_precinct_id.py Adds pytest coverage for parsing/config/output formatting helpers.
scripts/ResidenceXYChecker.py Removes legacy ArcPy-based XY checker.
scripts/RESIDENCE_EXPORT.csv Removes committed exported data artifact.
scripts/README.md Documents Conda setup, config shape, tracer usage, and CLI for the new script.
scripts/PrecinctChecker.py Removes legacy ArcPy precinct checker.
scripts/environment.yml Adds a conda-forge environment spec for the geospatial stack.
scripts/DJScript.py Removes legacy ArcPy/pyodbc script that updated precinct IDs and logged changes.
scripts/connections/update_precinct_id.config.example.json Adds example JSON config template for DB URLs/table settings.
scripts/CheckPrecinctIDInResidences.py Removes legacy ArcPy checker script.
scripts/CheckCountyIDInResidences.py Removes legacy ArcPy checker script.
.vscode/settings.json Adds pytest configuration + conda env manager setting; updates spellchecker words.
.vscode/launch.json Adds a debug configuration for running UpdatePrecinctID.py with arguments.
.gitignore Ignores scripts/connections/* (except the example) and expands ignore patterns.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/UpdatePrecinctID.py
Comment thread scripts/UpdatePrecinctID.py
Comment thread scripts/UpdatePrecinctID.py Outdated
Comment thread scripts/trace_update_precinct_id.py
acneville
acneville previously approved these changes Jun 16, 2026

@acneville acneville left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate the effective documentation in the README. The try-catch around imports is also a good practice. New script additions and old script removals look good as the project is migrated. Approved.

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit d9a17fd):
Firebase Preview: https://ut-dts-agrc-vista-dev--feat-script-migration-7fho1ce9.web.app
(expires "2026-07-07T19:43:23.743589742Z" )

@stdavis

stdavis commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

Waiting on Max to test this within the vista environment.

@stdavis stdavis enabled auto-merge (rebase) June 25, 2026 15:10
@stdavis stdavis requested a review from acneville June 25, 2026 15:10
@stdavis

stdavis commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

Max has tested this successfully from his end.

@stdavis stdavis merged commit 64ba567 into main Jun 25, 2026
7 checks passed
@stdavis stdavis deleted the feat/script-migration branch June 25, 2026 15:16
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.

3 participants