presence-audit
Given a declaration of what should exist and a capture of what was observed, say which declared points are reading, present but not reading, or absent.
Those three states are the whole product. We did not look and it is not there are different findings, and a presence audit exists to keep them apart.
What it does not know
Anything about your domain. What a declared point IS, which kinds are worth auditing, when two of them are redundant readings of one thing, what changed about one between two captures — all of that arrives through a vocabulary supplied by a vertical you register. This package ships none.
The protocol in protocols.py is the whole contract a vertical is written
against. If something here needs a member the protocol does not declare, the
protocol is wrong — not your vertical.
Registering a vertical
Three ways in, resolved before anything is read:
- an entry point in the group
presence_audit.plugins PRESENCE_AUDIT_PLUGINS, anos.pathsep-separated list of specs- whatever your own command line passes to
plugins.load_spec
Two installed verticals are refused rather than ranked: both would register, the later would silently win, and every verdict would come from a domain you were not auditing.
What a vertical supplies
A sketch, not a runnable block — the complete member list is
vocabulary.Vocabulary, which documents each one and what an empty answer
means. Thirteen members; most domains answer several of them with nothing.
class MyVocabulary:
kinds = ("tag", "label") # every class a declared point falls into
count_keys = {"label": "not_a_tag"} # the ones worth reporting, under YOUR name
def classify(self, declared_type): ... # must return a member of `kinds`
def is_auditable(self, kind): ... # which kinds the audit is about
def is_expected_live(self, declared_type): ...
# ... and eight more, including the three that let a domain say
# something about its own capture that the pairing cannot see
def register():
from presence_audit import vocabulary
vocabulary.register(MyVocabulary())
Name register on the presence_audit.plugins entry point and a plain
pip install finds it. Then diff.compare(declaration, capture) answers in
three states, counting your kinds under your own keys.
Two installed verticals are refused, not ranked — both would register, the later would win, and every verdict would come from a domain you were not auditing. Choose one with the environment variable or your own command line.
Status
Extracted from bmc-sensor-audit, which keeps its Redfish capture layer, its
sensor vocabulary and its command line and now depends on this. The extraction
was by import graph: every module here reaches nothing domain-specific, and that
is asserted by a test rather than by this sentence.
Apache-2.0.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file presence_audit-0.1.0.tar.gz.
File metadata
- Download URL: presence_audit-0.1.0.tar.gz
- Upload date:
- Size: 67.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfa140eadd0264a74e236fee53a555609bca57c9c5e597a232570f34cd842c51
|
|
| MD5 |
ab22732b81d72ffdf544ca71dd4abfdf
|
|
| BLAKE2b-256 |
5b801c5a9e5f2cbfa2211e9d2bf3e813d862739a6f39017e808b980acbfc0cf3
|
File details
Details for the file presence_audit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: presence_audit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 63.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf14983539de33d4a31b45e1e0e6dd3b5d1e182e24a15af1f04ca52d297941fc
|
|
| MD5 |
623d84b285419ce5dc8352246f5ece11
|
|
| BLAKE2b-256 |
987793c6170e479d5bfc0eaccf6e91b5be4e831b5b4b32a2b65c1f998e75c160
|