Repository navigation
fix(registers): pass back_populate by keyword instead of a logger - #10
Open
adamsrnmsu wants to merge 1 commit into
Open
adamsrnmsu wants to merge 1 commit into
adamsrnmsu wants to merge 1 commit into
Conversation
get_reg_state in webapp/registers/utility.py called load_regstate(reg_ops, logger). load_regstate has no logger parameter; its second positional parameter is back_populate, so the logger object (always truthy) is what turned back-population on for every register state the webapp loads. The Registers page depends on that back-population: it fills each register's leading NaNs with its first value, and the charts and the State tab's hdbscan clustering expect no leading gaps. So the fix keeps the behavior and states it: load_regstate(reg_ops, back_populate=True). This was the only caller of load_regstate in src. Verified: - new tests/test_registers_utility.py asserts load_regstate gets one positional argument and back_populate=True; it fails on main (the logger is passed positionally) and passes with the fix - full pytest: same results as main apart from the new test (failures are Elasticsearch tests with no server running, plus the known macOS-only test_build_paths_uses_var_lib_for_manifest_state) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Description
webapp/registers/utility.pyget_reg_statecalledload_regstate(reg_ops, logger).load_regstatehas no logger parameter; its second positional parameter isback_populate, so the (always truthy) logger is what turned back-population on for every register state the webapp loads.The Registers page depends on that back-population: it fills each register's leading NaNs with its first value, which the charts and the State tab's hdbscan clustering expect. So this keeps the behavior and states it:
load_regstate(reg_ops, back_populate=True). No change in what the page shows.Related Issues/PRs
state_reduction.pyonly).Type of Change
fix)feat)docs)refactor)chore)Checklist
Testing
tests/test_registers_utility.py:load_regstategets one positional argument andback_populate=True. Fails onmain(the logger is passed positionally) and passes with the fix.mainand no new ones (Elasticsearch tests that need a server, plus the macOS-onlytest_build_paths_uses_var_lib_for_manifest_state).🤖 Generated with Claude Code