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.2.tar.gz (9.3 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.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file evgraph_rules-0.1.2.tar.gz.

File metadata

  • Download URL: evgraph_rules-0.1.2.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for evgraph_rules-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fdfe2c07a370900e3f96752eb7ba013acc04919ba96637ae491e7597fb6672ae
MD5 e0d7ee8a92a05b59d56c1fec9d6f9db4
BLAKE2b-256 9daf061c88920cb67badbc653e2652b0dbbbe66b1779e32d8726cd2f1aadf299

See more details on using hashes here.

Provenance

The following attestation bundles were made for evgraph_rules-0.1.2.tar.gz:

Publisher: publish.yml on SVamseekar/evgraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file evgraph_rules-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: evgraph_rules-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for evgraph_rules-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4c8c3f2b45f3eccdbe2bebfb8d18766fb115c9cdab2625992ff5d303559afadc
MD5 37b46d42156981ab3fbd15a7fd62c0bb
BLAKE2b-256 ad457ee0aee0777d212ebb58bd5b6009e15e0d446e0a49eb5d14785b0a7f7f5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for evgraph_rules-0.1.2-py3-none-any.whl:

Publisher: publish.yml on SVamseekar/evgraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

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