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
AuditContextas 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 byhypothesisand 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
Release history Release notifications | RSS feed
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 semantic_state_machine_graphable-0.2.0.tar.gz.
File metadata
- Download URL: semantic_state_machine_graphable-0.2.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba366ec39d8d460f69674be905b8b43957956604eb042b49e2c36bc7fb60c1b0
|
|
| MD5 |
d9c76ede14320642092bb3ca14b7be7d
|
|
| BLAKE2b-256 |
683c044f3fe13adfa67c23ff3cdd7973883440243dd47ff3696b24bcef5a8e45
|
Provenance
The following attestation bundles were made for semantic_state_machine_graphable-0.2.0.tar.gz:
Publisher:
publish.yml on TheTrueSCU/semantic-state-machine-graphable
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
semantic_state_machine_graphable-0.2.0.tar.gz -
Subject digest:
ba366ec39d8d460f69674be905b8b43957956604eb042b49e2c36bc7fb60c1b0 - Sigstore transparency entry: 1290590360
- Sigstore integration time:
-
Permalink:
TheTrueSCU/semantic-state-machine-graphable@92f66a419daadafd92921ae50e61b311b27a23e0 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/TheTrueSCU
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@92f66a419daadafd92921ae50e61b311b27a23e0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file semantic_state_machine_graphable-0.2.0-py3-none-any.whl.
File metadata
- Download URL: semantic_state_machine_graphable-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc223aec9758467d1de5bd8ce4a795ebddd4d747c434de09e0eadcb7f9ce63dc
|
|
| MD5 |
a28a1d6b3df5df1570641ea00e450c40
|
|
| BLAKE2b-256 |
e857574a79513d3f2d46a6bb8018d002f8be41e4fae9f72af3f8ec50cb86159b
|
Provenance
The following attestation bundles were made for semantic_state_machine_graphable-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on TheTrueSCU/semantic-state-machine-graphable
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
semantic_state_machine_graphable-0.2.0-py3-none-any.whl -
Subject digest:
cc223aec9758467d1de5bd8ce4a795ebddd4d747c434de09e0eadcb7f9ce63dc - Sigstore transparency entry: 1290590399
- Sigstore integration time:
-
Permalink:
TheTrueSCU/semantic-state-machine-graphable@92f66a419daadafd92921ae50e61b311b27a23e0 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/TheTrueSCU
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@92f66a419daadafd92921ae50e61b311b27a23e0 -
Trigger Event:
release
-
Statement type: