Skip to content

Let the classification loader fill unset rows on a populated table - #114

Draft
rmartinsen-ucd wants to merge 1 commit into
mainfrom
rpm/classification-loader-fill
Draft

rmartinsen-ucd wants to merge 1 commit into
mainfrom
rpm/classification-loader-fill

Conversation

@rmartinsen-ucd

Copy link
Copy Markdown
Contributor

The import seeds every code as unclassified, so on test the classification table is never empty, and load-classifications.py refused to run. As a result, test shows about 2,400 unclassified codes that the CSV already classifies.

The loader now:

  • classifies rows that are still unset (IncludeInReport NULL), using the CSV values
  • inserts codes from the CSV that are missing
  • never changes a row that already has a classification, so values set in the app still win
  • lists the kept rows whose values disagree with the CSV, for review

Nothing else changed. It works on an empty table as before, and running it again is a no-op.

I also checked that the CSV matches local DataDb exactly: there are no differing values, and the only extra local rows are unclassified codes added by the seed.

Test plan

  • Scratch DB with 3,000 unset rows, one conflicting app edit, and one code not in the CSV: 4,696 rows inserted and 2,771 classified, the conflict kept and listed, and the extra code left alone. Afterward the table matched local DataDb, apart from the unclassified codes only the local seed adds.
  • Second run: 0 inserted, 0 classified.

🤖 Generated with Claude Code

… empty table

The import seeds every code as unclassified, so on test the table is never
empty and the loader refused to run. It now classifies rows that are still
unset, inserts missing codes, never changes a row that already has a
classification, and lists kept rows that disagree with the CSV.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b8ec4814-8618-4bd4-a416-0303731c957a
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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