Skip to main content

evgraph-rules

PyPI License Python

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's REQUIRES_APPROVAL edge points to a HumanApproval whose approved_at precedes the deployment's deployed_at. Reasoning class CONSISTENCY: it cross-references two structural timestamps rather than reading either in isolation.
  • dataset-manifest-complete — checks that every Dataset node in the graph declares a non-empty license attribute. Reasoning class STRUCTURAL: 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 in ModelVersion has a TRAINED_BY edge to the run that produced it. Deliberately written against the graph shape (…ModelVersion node, TRAINED_BY edge) 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.rules in this package's pyproject.toml. Installing a third-party rule pack the same way makes scan() pick it up automatically; no changes to evgraph-core or evgraph are 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

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

BSD 3-Clause.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evgraph_rules-0.1.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evgraph_rules-0.1.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

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

Hashes for evgraph_rules-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ba2ce944e0739d7f72a5a6e6a8d536ca6f7f9ef558f5d9e8a27e32b48931c946
MD5 04ba51eefdbcdb4f402de704c24550a1
BLAKE2b-256 1acbb8ae08c785970d4f2455f70d30d34e2a7d0615848efdf98d5b443e00e2bd

See more details on using hashes here.

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

Hashes for evgraph_rules-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 475925258d1cf7863530226b39b74939ff29d9d2c18893cc7d2af29f866e39fd
MD5 2c4c203184922b8c8c77d94912b10562
BLAKE2b-256 8d711507c33aaab0a97aee95239914615f145d109dfb17857561e06448f5b25b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page