Skip to content

Commit

Permalink
Expand usage, fix travis
Browse files Browse the repository at this point in the history
  • Loading branch information
jnmclarty committed Mar 7, 2015
1 parent c87ea7d commit 533387a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .gitignore
@@ -1 +1,5 @@
*.pyc
*.pyc
.coverage
/dist/*
/htmlcov/*
/rrsm.egg-info/*
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -6,6 +6,6 @@ python:
install: pip install coveralls
# command to run tests, e.g. python setup.py test
script:
- nosetests --with-coverage --cover-package=smuggle -s
- nosetests --with-coverage --cover-package=rrsm -s
after_success:
- coveralls
22 changes: 16 additions & 6 deletions README.rst
Expand Up @@ -18,17 +18,27 @@ Usage
.. code:: python
>>> from rrsm import StateMachine
>>> SM = StateMachine(['COOL', 'OFF', 'ON', 'WARM'])
>>> #using strings
>>> SM == 'cool':
>>> #Instantiation works with a list of the form ['state', ...]
... #or a dictionary of the form {'state' : value, ...}
... SM = StateMachine(['cool', 'off', 'on', 'warm'])
>>> #checking state works against strings or integers:
... SM == 'cool'
True
>>> #Change the state
>>> SM('warm')
>>> #using attributes
>>> SM == SM.cool
... SM('warm')
>>> #using attributes to check state:
... SM == SM.cool
False
>>> SM == SM.warm
True
>>> SM.current_state
'warm'
>>> SM.current_code
3
Install
=======
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -8,7 +8,7 @@ def read(*paths):
return f.read()

v = '0.1.0'
print "Setting up sympa"
print "Setting up rrsm"

setup(name = "rrsm",
version = v,
Expand Down

0 comments on commit 533387a

Please sign in to comment.