evgraph-rules
The built-in rule pack for Evgraph.
What is it
evgraph-rules is the reference implementation of Evgraph's rule-pack
mechanism, and the set of governance checks that ship out of the box.
Rules are deliberately shipped as their own package, separate from
evgraph-core: policy — what counts as good evidence — should be free to
evolve, gain new checks, or be replaced by an organization's own rule pack,
without ever touching the stable graph and evidence-level vocabulary that
evgraph-core defines. A rule pack participates in Evgraph purely by being
pip install-ed; evgraph.discover_rules() finds every rule registered
under the evgraph.rules entry-point group at runtime; evgraph-rules is
simply the first (and currently only first-party) example of that
mechanism, not a privileged one.
Each rule here is a small, pure function over an EvidenceGraph: it takes a
graph, cites the specific nodes and edges its conclusion rests on, and
returns Findings whose certainty (EvidenceLevel) is never higher than the
evidence it cites — enforced by evgraph_core.compute_finding_level(), not
by convention.
Main features
approval-precedes-deployment— checks that a deployment'sREQUIRES_APPROVALedge points to aHumanApprovalwhoseapproved_atprecedes the deployment'sdeployed_at. Reasoning classCONSISTENCY: it cross-references two structural timestamps rather than reading either in isolation.dataset-manifest-complete— checks that everyDatasetnode in the graph declares a non-emptylicenseattribute. Reasoning classSTRUCTURAL: a direct presence check on a single node, with no cross-referencing between nodes.model-version-has-training-provenance— checks that every node whose type ends inModelVersionhas aTRAINED_BYedge to the run that produced it. Deliberately written against the graph shape (…ModelVersionnode,TRAINED_BYedge) rather than against MLflow by name, entirely independent of any one adapter's implementation — so it applies unmodified to any future adapter (a different model registry, for example) that produces the same shape.- Entry-point registration — all three rules register under
evgraph.rulesin this package'spyproject.toml. Installing a third-party rule pack the same way makesscan()pick it up automatically; no changes toevgraph-coreorevgraphare required.
Where to get it
The source is hosted on GitHub at: https://github.com/SVamseekar/evgraph
Binary installers for the latest released version are available at the Python Package Index (PyPI):
pip install evgraph-rules
From source, for contributing:
git clone https://github.com/SVamseekar/evgraph.git
cd evgraph
pip install -e reference/python/evgraph-core
pip install -e reference/python/evgraph-rules
Dependencies
evgraph-core— installed automatically as a dependency.
pytest>=7 is required for the test suite
(pip install "evgraph-rules[test]").
Documentation
| For | Start here |
|---|---|
| Rule Evaluation Specification (RES) | docs/specs/ |
How rules plug into scan() |
evgraph package README |
| Writing a third-party rule pack | docs/specs/ (Plugin Extension Specification) |
| The full library stack | Main project README |
Getting help
Ask questions and report bugs via GitHub Issues on the main repository.
Contributing
All contributions, bug reports, and feature requests are welcome on the main repository. See CONTRIBUTING.md and the Code of Conduct. Security reports: SECURITY.md.
License
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 evgraph_rules-0.1.1.tar.gz.
File metadata
- Download URL: evgraph_rules-0.1.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba2ce944e0739d7f72a5a6e6a8d536ca6f7f9ef558f5d9e8a27e32b48931c946
|
|
| MD5 |
04ba51eefdbcdb4f402de704c24550a1
|
|
| BLAKE2b-256 |
1acbb8ae08c785970d4f2455f70d30d34e2a7d0615848efdf98d5b443e00e2bd
|
File details
Details for the file evgraph_rules-0.1.1-py3-none-any.whl.
File metadata
- Download URL: evgraph_rules-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
475925258d1cf7863530226b39b74939ff29d9d2c18893cc7d2af29f866e39fd
|
|
| MD5 |
2c4c203184922b8c8c77d94912b10562
|
|
| BLAKE2b-256 |
8d711507c33aaab0a97aee95239914615f145d109dfb17857561e06448f5b25b
|