Skip to content

r202639: read more panel and circuit properties - #207

Merged
cayossarian merged 4 commits into
prerelease/3.8from
feat/panel-and-circuit-properties
Oct 9, 2026
Merged

cayossarian merged 4 commits into
prerelease/3.8from
feat/panel-and-circuit-properties

Conversation

@cayossarian

Copy link
Copy Markdown
Member

r202639: the snapshot reads more panel and circuit properties, and site properties never become readings.

  • New fields, each None where undeclared or unpublished: SpanPanelSnapshot.busbar_current_a, frequency_hz, upstream_protection_rating_a (upstream lugs' connection/overcurrent-protection); SpanCircuitSnapshot.nominal_voltage_v and protection_functions (tuple[ProtectionFunction, ...], published order, unknown values dropped). ProtectionFunction and PROTECTION_FUNCTIONS are exported.
  • Each carries field metadata from its declaration and leaves the discovery and extension rows. A node that omits one is not reported as a gap.
  • SITE_PROPERTIES (address lines, locality, region, country code, coordinates, utility meter serial) never become extension or adopted readings, on any node. They remain discovery rows (names only). The postal code and time zone readings are unchanged.
  • The expected-failure registry has no pending rows left. One acceptance test, which expects the lugs' overcurrent-protection to stay a discovery row, is registered as a known divergence with a companion test for the rest of it.

Stacked on #206.

Checks:

  • pytest tests -q: 1656 passed, 7 skipped, 3 xfailed (39 new; 8 registry rows removed, 1 divergence added).
  • pre-commit run --all-files: all hooks pass (ruff, black, mypy, pylint, bandit, vulture, coverage 96.58%).

…minal voltage and protection functions

The snapshot reads five properties where a panel declares them, each None
where it is undeclared or unpublished:

- SpanPanelSnapshot.busbar_current_a and frequency_hz from the panel's
  meter/busbar-current and meter/frequency;
- SpanPanelSnapshot.upstream_protection_rating_a from the upstream lugs'
  connection/overcurrent-protection;
- SpanCircuitSnapshot.nominal_voltage_v from info/nominal-voltage;
- SpanCircuitSnapshot.protection_functions from
  breaker/protection-functions, as ProtectionFunction members in
  published order, dropping any value outside PROTECTION_FUNCTIONS.

Each carries field metadata from its declaration and is no longer a
discovery row or an extension reading. A node that leaves one of them
out is not a gap, so no unresolved row appears where a panel does not
declare it. ProtectionFunction and PROTECTION_FUNCTIONS are exported.

The acceptance tests these satisfy leave the expected-failure registry.
The one that expects the lugs' overcurrent-protection to stay a
discovery row is registered as a known divergence, with a companion
test asserting the rest of it.

Part of the spanos3/r202639/03 batch 2 work.
…ings

SITE_PROPERTIES lists the property ids that say where a panel is
installed: its address lines, locality, region, country code,
coordinates and utility meter serial. Extension and adopted readings
skip them on whatever node a device declares them. Where the panel
declares them, under info beside the site's info/name, the identity node
already keeps them out; the list holds wherever else a device puts them.
They stay discovery rows, which carry no values, and the panel's postal
code and time zone readings are unchanged.

Part of the spanos3/r202639/03 batch 2 work.
@cayossarian
cayossarian changed the base branch from feat/shared-meters to prerelease/3.8 October 9, 2026 15:21
Resolved tests/expected_failures.py: DIVERGENT keeps the lugs
overcurrent-protection row from this branch and the two registration
rows from prerelease/3.8, with _RATE_LIMIT; _COMPANIONS stays removed, as
no pending row names a companion test any more.
@cayossarian
cayossarian merged commit 98b5981 into prerelease/3.8 Oct 9, 2026
5 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