Skip to content

feat: public load_glossary_schema() and __all__ on the consumed modules - #12

Merged
fabcoded merged 1 commit into
mainfrom
feat/public-surface
Oct 18, 2026
Merged

fabcoded merged 1 commit into
mainfrom
feat/public-surface

Conversation

@fabcoded

Copy link
Copy Markdown
Owner

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 in inventory.py is gone (its one test now uses the public name).
  • 17 modules that blaueis-ha-midea imports from declare __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.py checks 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 on main is green. This PR is judged by CI.

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>
@fabcoded
fabcoded merged commit 1b7f86c into main Oct 18, 2026
8 checks passed
@fabcoded
fabcoded deleted the feat/public-surface branch October 18, 2026 00:35
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.

1 participant