Skip to main content

A library for visualizing semantic-state-machine structures and AuditContext execution paths as graphs using graphable.

Project description

semantic-state-machine-graphable

A library for visualizing semantic-state-machine structures and AuditContext execution paths as graphs using graphable.

Features

  • StateMachineGraph: Visualize the static structure of a semantic-state-machine.StateMachine.
  • AuditContextGraph: Visualize the execution history of an AuditContext as a graph, with edges annotated by transition indices.

Installation

For Development

The project is managed with uv. To install dependencies:

uv sync

From PyPI

pip install semantic-state-machine-graphable

Testing

The project employs a tiered testing strategy:

  • Unit & Integration: Run with pytest.
  • Property-based Fuzzing: Run with pytest tests/hypothesis. These are powered by hypothesis and provide robust edge-case coverage.

Run the full test suite:

uv run pytest tests

Usage

State Machine Visualization

from semantic_state_machine_graphable import StateMachineGraph

graph = StateMachineGraph(sm)
# Export to DOT format
dot_output = graph.to_dot()
print(dot_output)

# To visualize with Graphviz, you can use the command line:
# echo '...' | dot -Tpng -o state_machine.png

Execution Path Visualization

from semantic_state_machine_graphable import AuditContextGraph

graph = AuditContextGraph(ctx, sm)
# Export to DOT format
dot_output = graph.to_dot()
print(dot_output)

# To visualize with Graphviz:
# echo '...' | dot -Tpng -o audit_path.png

License

This project is licensed under the MIT License.

Project details


Download files

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

Source Distribution

semantic_state_machine_graphable-0.3.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file semantic_state_machine_graphable-0.3.0.tar.gz.

File metadata

File hashes

Hashes for semantic_state_machine_graphable-0.3.0.tar.gz
Algorithm Hash digest
SHA256 06c7fb5de70433643a7f4d1b283130b969a5bfd57cad7ae2b7493f4d7cafc52e
MD5 5c7ee6d7c689b6e312c028c3989f1b1c
BLAKE2b-256 d16fe464e712832a8c6b0cc2468227d466e91259e889ca995572ebed15284446

See more details on using hashes here.

Provenance

The following attestation bundles were made for semantic_state_machine_graphable-0.3.0.tar.gz:

Publisher: publish.yml on TheTrueSCU/semantic-state-machine-graphable

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

File details

Details for the file semantic_state_machine_graphable-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for semantic_state_machine_graphable-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 836e71e7a67d63aff486bb7235cfc758e89fc884b4a2cecf5051492ebbca4719
MD5 00f9f1fc446ba24d7b6c9aef2dd19dc9
BLAKE2b-256 36aa6a815dc4f71a9abc3a1503260d0dc6ab1d6def55cd231b0ac9e14b284f6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for semantic_state_machine_graphable-0.3.0-py3-none-any.whl:

Publisher: publish.yml on TheTrueSCU/semantic-state-machine-graphable

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

Supported by

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