Metadata-Version: 2.4
Name: semantic-state-machine-graphable
Version: 0.1.4
Summary: A library for visualizing semantic-state-machine structures and AuditContext execution paths as graphs using graphable.
Keywords: state-machine,graphable,visualization,audit,type-safety
Author: Richard West
Author-email: Richard West <dopplereffect.us@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Dist: graphable>=0.6.1
Requires-Dist: semantic-state-machine>=0.1.0
Requires-Python: >=3.13
Project-URL: Homepage, https://github.com/TheTrueSCU/semantic-state-machine-graphable
Project-URL: Repository, https://github.com/TheTrueSCU/semantic-state-machine-graphable
Project-URL: Issues, https://github.com/TheTrueSCU/semantic-state-machine-graphable/issues
Description-Content-Type: text/markdown

# 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:
```bash
uv sync
```

### From PyPI
```bash
pip install semantic-state-machine-graphable
```

## Testing
The project uses `pytest` for testing. Run the test suite with coverage reporting:
```bash
PYTHONPATH=src uv run pytest --cov=semantic_state_machine_graphable --cov-report=term-missing
```

## Usage

### State Machine Visualization
```python
from semantic_state_machine import StateMachine
from semantic_state_machine_graphable.graph import StateMachineGraph

sm = StateMachine(...)
sm.add_transition(...)

graph = StateMachineGraph(sm)
# Now visualize or export the graph
```

### Execution Path Visualization
```python
from semantic_state_machine import AuditedStateMachine, AuditContext
from semantic_state_machine_graphable.graph import AuditContextGraph

sm = AuditedStateMachine(...)
ctx = AuditContext(...)
# ... execute transitions ...

graph = AuditContextGraph(ctx, sm)
# Now visualize or export the execution path graph
```

## License
This project is licensed under the MIT License.
