Repository navigation
feat: public load_glossary_schema() and __all__ on the consumed modules - #12
Merged
Merged
Conversation
The HA integration reads the glossary schema and imports from 17 modules; the schema loader was private to inventory.py and most modules declared no __all__. The accessor moves to codec.py as a public function, the consumed modules declare their surface, and a test keeps both in line. Co-Authored-By: Claude Sonnet 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.
Public surface for the consumer, ahead of the next release candidate (decision "How ha-midea consumes libmidea", map #16).
blaueis.core.codec.load_glossary_schema()is public and cached; the private loader ininventory.pyis gone (its one test now uses the public name).__all__(core: codec, command, crypto, debug_ring, formula, frame, gate_eval, process, query, quirks, scan_queries, status, ux_gating, validation, plus the two modules that already had one; client: device, status_db, ws_client). The lists name exactly what the integration imports.tests/test_public_surface.pychecks that every consumed name is declared and that every name in those__all__lists exists.Not a behaviour change: no function was altered.
Heads-up on verification: in my local environment 9 tests (
test_inventory,test_field_boundary_coverage,test_value_suppression) fail in a full-suite run, with or without this change, and pass when run on their own, which points at test-order state in my environment; CI onmainis green. This PR is judged by CI.