Repository navigation
r202639: read more panel and circuit properties - #207
Merged
Merged
Conversation
…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.
…nel-and-circuit-properties
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.
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: the snapshot reads more panel and circuit properties, and site properties never become readings.
Nonewhere undeclared or unpublished:SpanPanelSnapshot.busbar_current_a,frequency_hz,upstream_protection_rating_a(upstream lugs'connection/overcurrent-protection);SpanCircuitSnapshot.nominal_voltage_vandprotection_functions(tuple[ProtectionFunction, ...], published order, unknown values dropped).ProtectionFunctionandPROTECTION_FUNCTIONSare exported.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.overcurrent-protectionto 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%).