Repository navigation
refactor(remote): move build_patches into a psycopg-free module - #20
Merged
Merged
Conversation
`build_patches` uses no database, but its module imported psycopg, so a local curator could not reuse it. Move it and its helpers unchanged to `wikibricks_remote.proposals`; `maintenance` re-imports it. The import boundary test now covers `proposals` and `resources`. Moved by GLM 5.3 Flash; verified as a pure move in review. Co-authored-by: Isaac <no-reply@databricks.com>
This was referenced Sep 29, 2026
Merged
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.
Why
The upcoming local curator (
wikibricks-curator) must turn model proposals into curation patches with the existing, testedbuild_patches.build_patchesuses no database, but its module importspsycopgat the top, so it can't be imported where PostgreSQL isn't installed.Change
build_patches,_page_proposal, the proposal-field constants and_canonical_jsonmove unchanged towikibricks_remote/proposals.py. The module imports nopsycopg,databricksor PostgreSQL store.wikibricks_remote.maintenanceimports them from there, sofrom wikibricks_remote.maintenance import build_patchesstill works.wikibricks_remote.proposalsandwikibricks_remote.resourceswith PostgreSQL and Databricks blocked.Verification
GLM 5.3 Flash made the move; I confirmed in review that it's a pure move.
This pull request and its description were written by Isaac.