#560: port arbin_res to the two-stage design#608
Merged
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
…ODBC on
Windows, mdbtools on posix. Two facts made it tractable:
- CI can check it. The arbin golden runs green on Linux CI (mdbtools is
installed), so the parity case runs there, not only locally. Where no backend
exists the parity test skips gracefully, mirroring the golden's skip_reason.
- The vendor stage is thin. get_headers_normal() is already a
{cellpy attr -> Arbin column} map - the same shape the config loaders carry -
so declarations() reuses derive_column_maps and gets the provenance rule
(Test_ID dropped, not mapped onto the framework test_id) for free. parse() is
just the database read via _loader_win/_loader_posix, stopping before the
rename and the Excel-serial datetime conversion that harmonize() now owns. It
shares loader()'s read path, so the two cannot drift.
Scoped to a single test: the golden fixture is single-test, no aux columns, and
loader() still handles the multi-test split and aux joins. A multi-test .res -
where Test_ID is nonzero and harmonize()'s framework test_id would differ from
the vendor value - is the switchover's concern. In this fixture Test_ID is 0, so
the stamped test_id agrees; that agreement is a value coincidence, not a
guarantee for multi-test files (noted for the switchover).
Value parity holds on all 17 shared measurement columns; only date_time is
excused. Mutation-checked: swapping the charge/discharge vendor names is caught
(both capacities flag). A column-drop mutation is NOT caught by this oracle
(shared-columns-only), but the loader_arbin_res golden pins the full column set -
layered coverage.
tests/test_arbin_two_stage.py pins the decisions and skips without a backend.
Full suite under PYTHONUTF8=1: 1241 passed, 0 failed.
Also carried here (needed for any non-config loader, first used by pec): the
parity oracle reads loader.config_params via getattr so loaders without one work,
and skips a case whose backend is unavailable.
Loader plan §2.6b updated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jepegit
force-pushed
the
issue-560-parse-arbin-res
branch
from
July 21, 2026 08:28
439d5f4 to
bd7603a
Compare
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 #560. Off master, not stacked. Overlaps slightly with #607 (pec) — see the note at the end.
What
arbin_res was the tier-1 loader I flagged as awkward: Access
.resvia ODBC on Windows, mdbtools on posix, multi-test files, aux-table joins. Two facts made it tractable:loader_arbin_resgolden runs green on Linux CI — mdbtools is installed there — so the parity case runs in CI, not only locally. Where no backend exists, the parity test skips gracefully, mirroring the golden'sskip_reason.get_headers_normal()is already a{cellpy attr → Arbin column}map — the same shape the configuration loaders carry — sodeclarations()reusesderive_column_mapsand inherits the provenance rule (Test_IDdropped, not mapped onto the frameworktest_id) for free.parse()is just the database read via_loader_win/_loader_posix, stopping before the rename and the Excel-serial datetime conversion thatharmonize()now owns. It sharesloader()'s read path, so the two cannot drift.Scope
Single test: the golden fixture is single-test with no aux columns, and
loader()still handles the multi-test split and aux joins. A multi-test.res— whereTest_IDis nonzero andharmonize()'s frameworktest_iddiffers from the vendor value — is the switchover's concern. In this fixtureTest_IDis 0, so the agreement holds by the file's value, not by construction (noted for the switchover).Verification
date_timeexcused, as everywhere.loader_arbin_resgolden pins the full column set, so that's layered.tests/test_arbin_two_stage.pypins the decisions and skips without a backend.PYTHONUTF8=1: 1241 passed, 0 failed.Merge-order note
Two small changes here also appear in #607 (pec), because both are the first non-config loaders: the parity oracle reading
loader.config_paramsviagetattr, and the per-case backend skip. If #607 merges first,PARITY_CASESconflicts trivially (both append a case) — resolvable in seconds. Thegetattrline is identical in both and merges cleanly.🤖 Generated with Claude Code