Fix doc build

Most notably, taskflow is hitting the sphinx issue
https://github.com/sphinx-doc/sphinx/issues/2549 which causes a
spurious warning that breaks the build with -W.  There is a
workaround posted in
https://stackoverflow.com/questions/31784830/sphinx-ivar-tag-goes-looking-for-cross-references
to move :ivar: docstrings to inline comments on the member variable
itself.  This is not ideal because it causes the docs to render
differently from :ivar:, but until the sphinx bug is fixed it will
allow us to keep documenting the problematic variables.

There was also a problem with one of the doctests because the
output had changed.  That is now fixed.

I also noticed a typo in one of the parameter descriptions so that
is fixed too.

Change-Id: Ib44621f6c3ba2c5476ec430218a0449f9f45d18f
This commit is contained in:
Ben Nemec 2018-04-30 16:23:37 +00:00
parent 8fb318edb6
commit e93f40cd1c
3 changed files with 14 additions and 8 deletions

View File

@ -99,9 +99,9 @@ prior to running:
>>> engines.run(flo)
Traceback (most recent call last):
...
taskflow.exceptions.MissingDependencies:
taskflow.patterns.linear_flow.Flow: cat-dog;
2 requires ['meow', 'woof'] but no other entity produces said requirements
taskflow.exceptions.MissingDependencies: 'linear_flow.Flow: cat-dog(len=2)' requires ['meow', 'woof'] but no other entity produces said requirements
MissingDependencies: 'execute' method on '__main__.DogTalk==1.0' requires ['woof'] but no other entity produces said requirements
MissingDependencies: 'execute' method on '__main__.CatTalk==1.0' requires ['meow'] but no other entity produces said requirements
The recommended way to provide flow inputs is to use the ``store`` parameter
of the engine helpers (:py:func:`~taskflow.engines.helpers.run` or

View File

@ -189,7 +189,7 @@ class Atom(object):
:param requires: A set or list of required inputs for this atom's
``execute`` method.
:param revert_requires: A set or list of required inputs for this atom's
``revert`` method. If unpassed, ```requires`` will
``revert`` method. If unpassed, ``requires`` will
be used.
:ivar version: An *immutable* version that associates version information
with this atom. It can be useful in resuming older versions
@ -212,8 +212,6 @@ class Atom(object):
a different ``revert_rebind`` value was received.
:ivar inject: See parameter ``inject``.
:ivar Atom.name: See parameter ``name``.
:ivar requires: A :py:class:`~taskflow.types.sets.OrderedSet` of inputs
this atom requires to function.
:ivar optional: A :py:class:`~taskflow.types.sets.OrderedSet` of inputs
that are optional for this atom to ``execute``.
:ivar revert_optional: The ``revert`` version of ``optional``.
@ -284,6 +282,10 @@ class Atom(object):
(self.revert_rebind, addl_requires,
self.revert_optional) = revert_mapping
# TODO(bnemec): This should be documented as an ivar, but can't be due
# to https://github.com/sphinx-doc/sphinx/issues/2549
#: A :py:class:`~taskflow.types.sets.OrderedSet` of inputs this atom
#: requires to function.
self.requires = exec_requires.union(addl_requires)
def _build_arg_mapping(self, executor, requires=None, rebind=None,

View File

@ -301,13 +301,15 @@ class FlowDetail(object):
guaranteed to be persisted when a save (or update) occurs via some backend
connection.
:ivar state: The state of the flow associated with this flow detail.
:ivar meta: A dictionary of meta-data associated with this flow detail.
"""
def __init__(self, name, uuid):
self._uuid = uuid
self._name = name
self._atomdetails_by_id = {}
# TODO(bnemec): This should be documented as an ivar, but can't be due
# to https://github.com/sphinx-doc/sphinx/issues/2549
#: The state of the flow associated with this flow detail.
self.state = None
self.meta = {}
@ -486,7 +488,6 @@ class AtomDetail(object):
guaranteed to be persisted when a save (or update) occurs via some backend
connection.
:ivar state: The state of the atom associated with this atom detail.
:ivar intention: The execution strategy of the atom associated
with this atom detail (used by an engine/others to
determine if the associated atom needs to be
@ -515,6 +516,9 @@ class AtomDetail(object):
def __init__(self, name, uuid):
self._uuid = uuid
self._name = name
# TODO(bnemec): This should be documented as an ivar, but can't be due
# to https://github.com/sphinx-doc/sphinx/issues/2549
#: The state of the atom associated with this atom detail.
self.state = None
self.intention = states.EXECUTE
self.results = None