Repository navigation
r202639: shared meters and relays - #206
Merged
Merged
Conversation
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.
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.
r202639: circuits that share a meter or a relay name each other.
SpanCircuitSnapshot.meter_shared_with/relay_shared_with(tuple[str, ...] | None), read frommeter/andswitch/shared-with-device-idsand resolved to snapshot circuit ids: self and unknown ids dropped, ordered bydevice_id_order(circuit-9beforecircuit-10).Nonewhile undeclared or unpublished;()where no listed id is a known circuit.shared_meter_groups(circuits): the circuits one meter measures, keyed by their first member. It only groups; nothing is summed.packages/schema-1/pyproject.tomlrecords that the core floor rises to 3.8.0b1 when that release is cut.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%).