Skip to content

r202639: shared meters and relays - #206

Merged
cayossarian merged 3 commits into
prerelease/3.8from
feat/shared-meters
Oct 9, 2026
Merged

cayossarian merged 3 commits into
prerelease/3.8from
feat/shared-meters

Conversation

@cayossarian

Copy link
Copy Markdown
Member

r202639: circuits that share a meter or a relay name each other.

  • New fields SpanCircuitSnapshot.meter_shared_with / relay_shared_with (tuple[str, ...] | None), read from meter/ and switch/shared-with-device-ids and resolved to snapshot circuit ids: self and unknown ids dropped, ordered by device_id_order (circuit-9 before circuit-10). None while undeclared or unpublished; () where no listed id is a known circuit.
  • New export shared_meter_groups(circuits): the circuits one meter measures, keyed by their first member. It only groups; nothing is summed.
  • Both lists are now addressed properties, so they are no longer discovery rows or extension readings.
  • packages/schema-1/pyproject.toml records that the core floor rises to 3.8.0b1 when that release is cut.
  • Four acceptance tests now pass and leave the expected-failure registry. The rows that also wait on the panel and circuit readings stay until that change.

Stacked on #205.

Checks:

  • pytest tests -q: 1610 passed, 7 skipped, 10 xfailed (28 new; 4 registry rows removed).
  • pre-commit run --all-files: all hooks pass (ruff, black, mypy, pylint, bandit, vulture, coverage 96.55%).

SpanCircuitSnapshot.meter_shared_with and relay_shared_with list the
other circuits one meter measures or one relay switches, read from
meter/ and switch/shared-with-device-ids. The circuit itself and ids
naming no circuit in the snapshot are dropped, and the rest are ordered
by device_id_order, under which circuit-9 sorts before circuit-10. Each
is None while the list is undeclared or unpublished, and () where it
names no known circuit.

shared_meter_groups groups the circuits one meter measures, keyed by
their first member, and is exported. Nothing is summed. Both lists are
addressed properties now, so they are no longer discovery rows or
extension readings. The acceptance tests these satisfy leave the
expected-failure registry.

Part of the spanos3/r202639/03 batch 2 work.
The parser now fills snapshot fields new in span-panel-api 3.8.0b1 and
imports device_id_order from its models, so the floor rises to 3.8.0b1
when that release is cut.

Part of the spanos3/r202639/03 batch 2 work.
@cayossarian
cayossarian changed the base branch from feat/feeds-role to prerelease/3.8 October 9, 2026 15:17
@cayossarian cayossarian closed this Oct 9, 2026
@cayossarian cayossarian reopened this Oct 9, 2026
@cayossarian
cayossarian merged commit 5e2957f into prerelease/3.8 Oct 9, 2026
7 checks passed
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