This is an extension to the Kivy framework that adds a system for programming with statecharts. It is a port of Michael Cohen's Ki framework, which became SproutCore.statechart.
SC.Statechart was used as the basis for this port to Python.
A virtual environment works well for Kivy and kivy_statecharts development. Using the virtualenvwrapper framework is a good approach. After installing the base system prerequisites for Kivy:
pip install kivy_statecharts (when available on PyPI)
NOTE: Until kivy_statecharts is on PyPI, do clone and setup as below:
If you are debugging or adding features to kivy_statecharts, clone the repo and set up for development:
git clone https://github.com/geojeff/kivy-statecharts.git python setup develop python setup dev (See below; For setting up for testing)
Be warned: This addon is in alpha state. Use it at your own risk.
For now, source Sphinx docs are in the docs directory.
See the examples.
kivy_statecharts is considered alpha software, not yet suitable for use in production environments. The current state of the project is in no way feature complete nor API stable. If you really want to use it in your project(s), make sure to pin the exact version in your requirements. Not doing so will likely break your project when future releases become available.
Contributions to kivy_statecharts are very welcome. Just clone its GitHub repository and submit your contributions as pull requests.
Note that all development is done on the develop branch. master is reserved for "production-ready state". Therefore, make sure to always base development work on the current state of the develop branch.
kivy_statecharts has 100% test coverage. Use nosetests or py.test.
Please make sure that you add tests for new features and that all tests pass before submitting pull requests. Running the test suite is as easy as running py.test from the source directory. Presently, both py.test and nosetests work. Run python setup.py dev to have all the test requirements installed in your virtualenv.
Unit tests have previously been done with nose. In the kivy_statechart directory, run:
As of April 2012, most tests were ported.