Skip to content

Commit

Permalink
docs: AUTHORS.rst and CONTRIBUTING.rst
Browse files Browse the repository at this point in the history
* Improves also API section.

Signed-off-by: Jiri Kuncar <[email protected]>
  • Loading branch information
jirikuncar committed Sep 3, 2014
1 parent 394974b commit eb81438
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 34 deletions.
16 changes: 16 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Authors
=======

Workflow was originally developed by Roman Chyla. It is now being
developed and maintained by the Invenio collaboration. You can
contact us at
`[email protected] <mailto:[email protected]>`_.

Contributors
^^^^^^^^^^^^

- Roman Chyla <[email protected]>
- Raja Sripada <[email protected]>
- Jiri Kuncar <[email protected]>
- Tibor Simko <[email protected]>
- Brett Anthoine <[email protected]>
36 changes: 36 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Contributing
============

Bug reports, feature requests, and other contributions are welcome.
If you find a demonstrable problem that is caused by the code of this
library, please:

1. Search for `already reported problems
<https://github.com/inveniosoftware/workflow/issues>`_.
2. Check if the issue has been fixed or is still reproducible on the
latest `master` branch.
3. Create an issue with **a test case**.

If you create a feature branch, you can run the tests to ensure everything is
operating correctly:

.. code-block:: console
$ ./run-tests.sh
...
Name Stmts Miss Cover Missing
-------------------------------------------------------------
workflow/__init__ 2 0 100%
workflow/config 231 92 60% ...
workflow/engine 321 93 71% ...
workflow/patterns/__init__ 5 0 100%
workflow/patterns/controlflow 159 66 58% ...
workflow/patterns/utils 249 200 20% ...
workflow/version 2 0 100%
-------------------------------------------------------------
TOTAL 969 451 53%
...
55 passed, 1 warnings in 3.10 seconds
6 changes: 4 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

include COPYING.txt
include CHANGES.txt
include README.rst
include docs/*.rst docs/*.py docs/Makefile
include *.rst
include tests/*.ini
include .coveragerc run-tests.sh pytest.ini
include .coveragerc .travis.yml pytest.ini
include *.py *.sh
33 changes: 8 additions & 25 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -381,42 +381,25 @@ the definition of the pipeline, such as `IF`, `IF_NOT`, `PARALLEL_SPLIT`
and others.
Contribution & Tests
====================
Bug reports, feature requests, or other contributions are welcome.
If you find a demonstrable problem that is caused by the code of this
library please:
1. Search for already reported problem using GitHub issue search.
2. Check if the issue has been fixed or is still reproducable on the
latest `master` branch.
3. Create an issue with **a test case**.
After your changes, you could run the tests to ensure everything is
operating correctly.
.. code-block:: console
$ ./run_tests.sh
API
===
This documentation is automatically generated from Workflow's source
code.
Workflow
--------
^^^^^^^^
.. automodule:: workflow
:members:
.. autoclass:: workflow.engine.GenericWorkflowEngine
:members:
.. autoclass:: workflow.engine.PhoenixWorkflowEngine
:members:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
.. include:: ../CONTRIBUTING.rst
.. include:: ../AUTHORS.rst
14 changes: 7 additions & 7 deletions workflow/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,15 @@ def haltProcessing(self):
raise HaltProcessing

def jumpTokenForward(self, offset):
"""Jump to `x`th token."""
"""Jump to `x` th token."""
raise JumpTokenForward(offset)

def jumpTokenBack(self, offset):
"""Return `x` tokens back - be careful with circular loops."""
raise JumpTokenBack(offset)

def jumpCallForward(self, offset):
"""Jump to `x`th call in this loop."""
"""Jump to `x` th call in this loop."""
raise JumpCallForward(offset)

def jumpCallBack(self, offset):
Expand All @@ -226,12 +226,12 @@ def breakFromThisLoop(self):
def configure(self, **kwargs):
"""Method to set attributes of the workflow engine.
..note:: Use with extreme care (well, you can set up the attrs
.. note:: Use with extreme care (well, you can set up the attrs
directly, I am not protecting them, but that is not nice).
Used mainly if you want to change the engine's callbacks -
if processing factory `before_processing`, `after_processing`.
:param **kwargs: dictionary of values
:param kwargs: dictionary of values
"""
for (key, value) in kwargs.items():
if hasattr(self, key):
Expand All @@ -246,7 +246,7 @@ def process(self, objects):
"""Start processing.
:param objects: either a list of object or instance of
:class:`~workflow.objects.TokenizedDocument`
`TokenizedDocument`
:return: You never know what will be returned from the workflow.
But many exceptions can be raised, so watch out for them,
if there happened an exception, you can be sure something
Expand Down Expand Up @@ -388,7 +388,7 @@ def run_callbacks(self, callbacks, objects, obj, indent=0):
at the indent level is increases after the task has
finished processing; on error it will point to the
last executed task position.
The position adjusting also happens after the
The position adjusting also happens after the
task has finished.
"""
c = 0 # Just a counter for debugging
Expand Down Expand Up @@ -466,7 +466,7 @@ def execute_callback(self, callback, obj):
def getCallbacks(self, key='*'):
"""Return callbacks for the given workflow.
:param key: name of the workflow (default: *)
:param key: name of the workflow (default: '*')
if you want to get all configured workflows
pass None object as a key
:return: list of callbacks
Expand Down

0 comments on commit eb81438

Please sign in to comment.