From bb384577bcf1ffd0c876fcb174a80ea0a120b52f Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Fri, 19 Dec 2014 19:26:12 -0800 Subject: [PATCH] Move implementation(s) to there own sections Instead of putting implementation(s) under the interfaces section put the implementation(s) under there own section. This also includes some other tweaks to refer to those implementation(s) where appropriate. Change-Id: Iffdc0439c843e7f70cf873e5a75501feb51f96c7 --- doc/source/conductors.rst | 4 +++ doc/source/engines.rst | 6 +++- doc/source/persistence.rst | 33 +++++++++++++++++-- taskflow/persistence/backends/impl_dir.py | 8 ++--- .../persistence/backends/impl_sqlalchemy.py | 8 ++--- .../persistence/backends/impl_zookeeper.py | 10 +++--- 6 files changed, 53 insertions(+), 16 deletions(-) diff --git a/doc/source/conductors.rst b/doc/source/conductors.rst index 25eb75c8..56fb0e0e 100644 --- a/doc/source/conductors.rst +++ b/doc/source/conductors.rst @@ -63,6 +63,10 @@ Interfaces ========== .. automodule:: taskflow.conductors.base + +Implementations +=============== + .. automodule:: taskflow.conductors.single_threaded Hierarchy diff --git a/doc/source/engines.rst b/doc/source/engines.rst index 04d462a4..0231ae86 100644 --- a/doc/source/engines.rst +++ b/doc/source/engines.rst @@ -330,6 +330,11 @@ saved for this execution. Interfaces ========== +.. automodule:: taskflow.engines.base + +Implementations +=============== + .. automodule:: taskflow.engines.action_engine.analyzer .. automodule:: taskflow.engines.action_engine.compiler .. automodule:: taskflow.engines.action_engine.completer @@ -339,7 +344,6 @@ Interfaces .. automodule:: taskflow.engines.action_engine.runtime .. automodule:: taskflow.engines.action_engine.scheduler .. automodule:: taskflow.engines.action_engine.scopes -.. automodule:: taskflow.engines.base Hierarchy ========= diff --git a/doc/source/persistence.rst b/doc/source/persistence.rst index 0da68de1..3ea8c86d 100644 --- a/doc/source/persistence.rst +++ b/doc/source/persistence.rst @@ -155,6 +155,11 @@ Memory Retains all data in local memory (not persisted to reliable storage). Useful for scenarios where persistence is not required (and also in unit tests). +.. note:: + + See :py:class:`~taskflow.persistence.backends.impl_memory.MemoryBackend` + for implementation details. + Files ----- @@ -166,6 +171,11 @@ from the same local machine only). Useful for cases where a *more* reliable persistence is desired along with the simplicity of files and directories (a concept everyone is familiar with). +.. note:: + + See :py:class:`~taskflow.persistence.backends.impl_dir.DirBackend` + for implementation details. + Sqlalchemy ---------- @@ -228,6 +238,11 @@ parent_uuid VARCHAR False .. _sqlalchemy: http://www.sqlalchemy.org/docs/ .. _ACID: https://en.wikipedia.org/wiki/ACID +.. note:: + + See :py:class:`~taskflow.persistence.backends.impl_sqlalchemy.SQLAlchemyBackend` + for implementation details. + Zookeeper --------- @@ -241,6 +256,11 @@ logbook represented as znodes. Since zookeeper is also distributed it is also able to resume a engine from a peer machine (having similar functionality as the database connection types listed previously). +.. note:: + + See :py:class:`~taskflow.persistence.backends.impl_zookeeper.ZkBackend` + for implementation details. + .. _zookeeper: http://zookeeper.apache.org .. _kazoo: http://kazoo.readthedocs.org/ @@ -251,12 +271,21 @@ Interfaces .. automodule:: taskflow.persistence.backends.base .. automodule:: taskflow.persistence.logbook +Implementations +=============== + +.. automodule:: taskflow.persistence.backends.impl_dir +.. automodule:: taskflow.persistence.backends.impl_memory +.. automodule:: taskflow.persistence.backends.impl_sqlalchemy +.. automodule:: taskflow.persistence.backends.impl_zookeeper + Hierarchy ========= .. inheritance-diagram:: - taskflow.persistence.backends.impl_memory - taskflow.persistence.backends.impl_zookeeper + taskflow.persistence.backends.base taskflow.persistence.backends.impl_dir + taskflow.persistence.backends.impl_memory taskflow.persistence.backends.impl_sqlalchemy + taskflow.persistence.backends.impl_zookeeper :parts: 2 diff --git a/taskflow/persistence/backends/impl_dir.py b/taskflow/persistence/backends/impl_dir.py index 0a687473..6b6a0582 100644 --- a/taskflow/persistence/backends/impl_dir.py +++ b/taskflow/persistence/backends/impl_dir.py @@ -46,11 +46,11 @@ class DirBackend(base.Backend): guarantee that there will be no interprocess race conditions when writing and reading by using a consistent hierarchy of file based locks. - Example conf: + Example configuration:: - conf = { - "path": "/tmp/taskflow", - } + conf = { + "path": "/tmp/taskflow", + } """ def __init__(self, conf): super(DirBackend, self).__init__(conf) diff --git a/taskflow/persistence/backends/impl_sqlalchemy.py b/taskflow/persistence/backends/impl_sqlalchemy.py index d84b9b27..41f29c9c 100644 --- a/taskflow/persistence/backends/impl_sqlalchemy.py +++ b/taskflow/persistence/backends/impl_sqlalchemy.py @@ -183,11 +183,11 @@ def _ping_listener(dbapi_conn, connection_rec, connection_proxy): class SQLAlchemyBackend(base.Backend): """A sqlalchemy backend. - Example conf: + Example configuration:: - conf = { - "connection": "sqlite:////tmp/test.db", - } + conf = { + "connection": "sqlite:////tmp/test.db", + } """ def __init__(self, conf, engine=None): super(SQLAlchemyBackend, self).__init__(conf) diff --git a/taskflow/persistence/backends/impl_zookeeper.py b/taskflow/persistence/backends/impl_zookeeper.py index ca801b43..c2a07b8e 100644 --- a/taskflow/persistence/backends/impl_zookeeper.py +++ b/taskflow/persistence/backends/impl_zookeeper.py @@ -43,12 +43,12 @@ class ZkBackend(base.Backend): inside those directories that represent the contents of those objects for later reading and writing. - Example conf: + Example configuration:: - conf = { - "hosts": "192.168.0.1:2181,192.168.0.2:2181,192.168.0.3:2181", - "path": "/taskflow", - } + conf = { + "hosts": "192.168.0.1:2181,192.168.0.2:2181,192.168.0.3:2181", + "path": "/taskflow", + } """ def __init__(self, conf, client=None): super(ZkBackend, self).__init__(conf)