Commits

Ginés Martínez Sánchez  committed 8131f82 Draft

preparing release 0.5.0

  • Participants
  • Parent commits 885a2b9

Comments (0)

Files changed (15)

 The interface is simple and common to all objects; you just have to change the
 name of the event and the data they carry.
 
-It includes a full asynchronous http server and wsgi server.
+It includes a full asynchronous http server, wsgi server
+and winsocket server/client compatible with
+`sockjs <https://github.com/sockjs/sockjs-client>`_.
 
 The wsgi server is inspired in `Tornado <http://www.tornadoweb.org/>`_
 and `Waitress <http://docs.pylonsproject.org/projects/waitress>`_ projects

File docs/examples.rst

     src/examples/stress_client_echo
     src/examples/stress_server_echo
     src/examples/wsgi_server
+    src/examples/sockjs_server
+    src/examples/winsocket

File docs/index.rst

 The interface is simple and common to all objects; you just have to change the
 name of the event and the data they carry.
 
-It includes a full asynchronous http server and wsgi server.
+It includes a full asynchronous http server, wsgi server
+and winsocket server/client compatible with
+`sockjs <https://github.com/sockjs/sockjs-client>`_.
 
 The http/wsgi server is inspired in `Tornado <http://www.tornadoweb.org/>`_
 and `Waitress <http://docs.pylonsproject.org/projects/waitress>`_ projects

File docs/narrative.rst

 
 The gaplic send the event to his GRouter, and these router sends the event
 to the destination gaplic.
+
+Use this methods to send and receive events from others gaplics:
+
+* :meth:`ginsfsm.gaplic.GAplic.send_event_to_external_gaplic`
+* :meth:`ginsfsm.gaplic.GAplic.send_event_to_external_role`
+* :meth:`ginsfsm.gaplic.GAplic.subscribe_event_from_external_gaplic`
+* :meth:`ginsfsm.gaplic.GAplic.subscribe_event_from_external_role`
+* :meth:`ginsfsm.gaplic.GAplic.unsubscribe_event_from_external_gaplic`
+* :meth:`ginsfsm.gaplic.GAplic.unsubscribe_event_from_external_role`

File docs/src/api/c_sockjs_server.rst

 
 
 .. automodule:: ginsfsm.protocols.sockjs.server.c_sockjs_server
-
-
-//.. automodule:: ginsfsm.protocols.sockjs.server.c_sockjs_clisrv

File docs/src/examples/sockjs_server.rst

+:mod:`ginsfsm.examples.sockjs`
+==============================
+
+ .. automodule:: ginsfsm.examples.sockjs
+
+ .. automodule:: ginsfsm.examples.sockjs.test_sockjs_apps

File docs/src/examples/winsocket.rst

+:mod:`ginsfsm.examples.router`
+==============================
+
+ .. automodule:: ginsfsm.examples.router.test_router

File ginsfsm/__init__.py

 """
 A python library to do development based in Finite State Machines.
 """
-__version__ = '0.4.3'
+__version__ = '0.5.0'
 __title__ = 'ginsfsm'
 __author__ = 'Ginés Martínez'
 __license__ = 'MIT License'

File ginsfsm/examples/router/test_router.py

 # -*- encoding: utf-8 -*-
 """
+Routing events between gaplics.
+===============================
+
+.. autoclass:: Sample1
+    :members:
+
+.. autoclass:: Sample2
+    :members:
+
+
 In this example:
     TITI gaplic of main thread
     TOTO gaplic another thread or subprocess

File ginsfsm/examples/sockjs/README.txt

+You can run this sockjs server with::
+
+    gserve test_sockjs_server.init
+
+To test it you must use the sockjs tests:
+
+http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html

File ginsfsm/examples/sockjs/test_sockjs_apps/__init__.py

 # -*- encoding: utf-8 -*-
 """
 Pyramid root entry point
+
+.. autoclass:: PyramidRoot
+    :members:
+
+:func:`pyramid_application`.
+
 """
 
 from pyramid.config import Configurator
 #       Pyramid wsgi-app configuration
 #-------------------------------------------------#
 def pyramid_application(global_config, **local_conf):
-    """ Returns a WSGI application.
+    """ Paste entry point.
+
+        Returns a WSGI application.
     """
     if 'gaplic' in local_conf:
         gaplic_name = local_conf.pop('gaplic')

File ginsfsm/gconfig.py

 
 .. autoclass:: GConfig
     :members: reset_all_parameters, reset_parameter, write_parameters,
-        write_few_parameters, read_parameters, read_parameter
+     write_few_parameters, read_parameters, read_parameter
 
 .. autoexception:: GConfigTemplateError
 
 .. autoexception:: GConfigValidateError
+
 """
 
 from ginsfsm.globals import get_global_app
 
 class GConfigTemplateError(Exception):
     """ Raised when something is wrong in the :term:`gconfig-template`
-    definition."""
+        definition.
+    """
 
 
 class GConfigValidateError(Exception):
-    """ Raised when something is a parameter is not validated."""
+    """ Raised when something is a parameter is not validated.
+    """
 
 
 def add_gconfig(gconfig, new_gconfig):
         describing the template of configuration parameters,
         with key/value as::
 
-        'parameter_name':
-        [type, default_value, flag, validate_function, description]
+            'parameter_name':
+            [type, default_value, flag, validate_function, description]
 
     Each parameter is defined with a template, that it's a list of 4 elements:
 

File ginsfsm/protocols/sockjs/server/stats.py

 from collections import deque
 
-from tornado import ioloop
-
 
 class MovingAverage(object):
     """Moving average class implementation"""

File ginsfsm/tests/test_circular_fifo.py

     circular = CircularFIFO(5)
 
     circular.putdata("123")
-    print circular
+    print(circular)
     circular.getdata(2)
-    print circular
+    print(circular)
 
     circular.putdata("abcd")
-    print circular
+    print(circular)
 
     circular.getdata(0)
-    print circular
+    print(circular)
 except IOError:
     README = CHANGES = ''
 
-setup(name='ginsfsm',
+setup(
+    name='ginsfsm',
     version=ginsfsm.__version__,
     description="GinsFSM, a library to develop systems based in "
                 "finite-state machines. It's a communication framework, "
     ],
 
     keywords='framework communication fsm finite state machine fsm wsgi http '
-             'socket poll epoll kqueue select server client workflow pyramid',
+             'socket poll epoll kqueue select server client workflow pyramid '
+             'websocket sockjs',
     author='Ginés Martínez',
     author_email='ginsmar at artgins.com',
     url='http://ginsfsm.org',
     zip_safe=False,
     install_requires=[
         'PasteDeploy >= 1.5.0',  # py3 compat
-        'ujson',
+        'Pyramid >= 1.4',  # py3 compat
+        #'ujson',
     ],
     extras_require=dict(
         rst=[
         gserve = ginsfsm.scripts.gserve:main
         gconsole = ginsfsm.scripts.gconsole:main
     """,
-    )
+)