DBO-1 feat(demo): add DBO-in-BMS reference impl - #1735
Open
ekodikara wants to merge 2 commits into
Open
Conversation
Adds _demo_implementation/, a runnable example of the code a building
management system needs around the Digital Buildings Ontology: creating a
device, mapping its points, and placing it in the building.
Six things it demonstrates:
1. Point mappings keep the native BMS point and its DBO meaning on the
same row. Neither replaces the other.
2. The ontology is version-pinned by content digest, so a build is
reproducible and CI reports when the vocabulary moves.
3. Entity types are inferred and ranked from a device's mapped point
set instead of picked from a dropdown of 40 variants.
4. MISSING is a first-class state with a required justification, which
is what DBO expects when a device cannot supply a required field.
5. Location is a CONTAINS edge in the same table as FEEDS and HAS_PART,
not a column on the device.
6. Four CI gates, ending with the upstream instance validator.
Verified: 92 unit tests pass, and the generated building config passes
tools/validators/instance_validator with "All entities validated
SUCCESSFULLY" (one expected warning for the intentional MISSING field).
Building the sample site against the real validator surfaced three rules
that are not stated in the ontology YAML - FACILITIES code patterns, zone
entities needing links or a translation, and justification for MISSING.
All three are handled in code and written up in the README.
This directory is a reference only. It is not wired into the ontology or
the upstream tooling, and nothing outside _demo_implementation/ changes.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
The README had drifted from the code while the dashboard was being
added. Three things were wrong or missing:
- It quoted two different test counts in two places, one of them two
rounds of work out of date.
- The Makefile had a shortcut for every command except serve, even
though the README implied all of them were covered.
- __init__.py never exported the dashboard, so "from bms_dbo import
serve" failed despite the package docstring advertising a small,
importable public surface.
Rather than just correcting the text, this adds tests/test_package.py so
the same drift fails the build next time: every name in __all__ must
exist, every CLI command and make target the README mentions must be
real, and the test counts it quotes must agree with each other. The last
one was checked by hand against a deliberately broken README to confirm
it fails when it should.
299 tests pass and the exported config still clears the upstream
instance validator.
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.
Adds _demo_implementation/, a runnable example of the code a building management system needs around the Digital Buildings Ontology: creating a device, mapping its points, and placing it in the building.
Six things it demonstrates:
Verified: 92 unit tests pass, and the generated building config passes tools/validators/instance_validator with "All entities validated SUCCESSFULLY" (one expected warning for the intentional MISSING field).
Building the sample site against the real validator surfaced three rules that are not stated in the ontology YAML - FACILITIES code patterns, zone entities needing links or a translation, and justification for MISSING. All three are handled in code and written up in the README.
This directory is a reference only. It is not wired into the ontology or the upstream tooling, and nothing outside _demo_implementation/ changes.