Skip to content

Commit

Permalink
Documentation improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Jul 31, 2016
1 parent d1c5dee commit 9591b3c
Show file tree
Hide file tree
Showing 39 changed files with 436 additions and 346 deletions.
49 changes: 22 additions & 27 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -583,10 +583,10 @@ Installing the dependencies:

$ pip install -U -r requirements/pkgutils.txt

pyflakes & PEP8
~~~~~~~~~~~~~~~
pyflakes & PEP-8
~~~~~~~~~~~~~~~~

To ensure that your changes conform to PEP8 and to run pyflakes
To ensure that your changes conform to ``8`` and to run pyflakes
execute:
::

Expand Down Expand Up @@ -659,15 +659,12 @@ You should probably be able to pick up the coding style
from surrounding code, but it is a good idea to be aware of the
following conventions.

* All Python code must follow the `PEP-8`_ guidelines.
* All Python code must follow the ``8`` guidelines.

`pep8.py`_ is an utility you can use to verify that your code
``pep8`` is a utility you can use to verify that your code
is following the conventions.

.. _`PEP-8`: http://www.python.org/dev/peps/pep-0008/
.. _`pep8.py`: http://pypi.python.org/pypi/pep8

* Docstrings must follow the `PEP-257`_ conventions, and use the following
* Docstrings must follow the ``257`` conventions, and use the following
style.

Do this:
Expand Down Expand Up @@ -695,8 +692,6 @@ is following the conventions.
Short description.
"""

.. _`PEP-257`: http://www.python.org/dev/peps/pep-0257/

* Lines shouldn't exceed 78 columns.

You can enforce this in ``vim`` by setting the ``textwidth`` option:
Expand Down Expand Up @@ -917,7 +912,7 @@ Packages
:git: https://github.com/celery/celery
:CI: http://travis-ci.org/#!/celery/celery
:Windows-CI: https://ci.appveyor.com/project/ask/celery
:PyPI: http://pypi.python.org/pypi/celery
:PyPI: ``celery``
:docs: http://docs.celeryproject.org

``kombu``
Expand All @@ -928,7 +923,7 @@ Messaging library.
:git: https://github.com/celery/kombu
:CI: http://travis-ci.org/#!/celery/kombu
:Windows-CI: https://ci.appveyor.com/project/ask/kombu
:PyPI: http://pypi.python.org/pypi/kombu
:PyPI: ``kombu``
:docs: https://kombu.readthedocs.io

``amqp``
Expand All @@ -939,7 +934,7 @@ Python AMQP 0.9.1 client.
:git: https://github.com/celery/py-amqp
:CI: http://travis-ci.org/#!/celery/py-amqp
:Windows-CI: https://ci.appveyor.com/project/ask/py-amqp
:PyPI: http://pypi.python.org/pypi/amqp
:PyPI: ``amqp``
:docs: https://amqp.readthedocs.io

``vine``
Expand All @@ -950,7 +945,7 @@ Promise/deferred implementation.
:git: https://github.com/celery/vine/
:CI: http://travis-ci.org/#!/celery/vine/
:Windows-CI: https://ci.appveyor.com/project/ask/vine
:PyPI: http://pypi.python.org/pypi/vine
:PyPI: ``vine``
:docs: https://vine.readthedocs.io

``billiard``
Expand All @@ -962,23 +957,23 @@ that'll eventually be merged into the Python stdlib.
:git: https://github.com/celery/billiard
:CI: http://travis-ci.org/#!/celery/billiard/
:Windows-CI: https://ci.appveyor.com/project/ask/billiard
:PyPI: http://pypi.python.org/pypi/billiard
:PyPI: ``billiard``

``librabbitmq``
---------------

Very fast Python AMQP client written in C.

:git: https://github.com/celery/librabbitmq
:PyPI: http://pypi.python.org/pypi/librabbitmq
:PyPI: ``librabbitmq``

``django-celery``
-----------------

Django <-> Celery Integration.

:git: https://github.com/celery/django-celery
:PyPI: http://pypi.python.org/pypi/django-celery
:PyPI: ``django-celery``
:docs: http://docs.celeryproject.org/en/latest/django

``cell``
Expand All @@ -987,15 +982,15 @@ Django <-> Celery Integration.
Actor library.

:git: https://github.com/celery/cell
:PyPI: http://pypi.python.org/pypi/cell
:PyPI: ``cell``

``cyme``
--------

Distributed Celery Instance manager.

:git: https://github.com/celery/cyme
:PyPI: http://pypi.python.org/pypi/cyme
:PyPI: ``cyme``
:docs: https://cyme.readthedocs.io/


Expand All @@ -1005,39 +1000,39 @@ Deprecated
- ``Flask-Celery``

:git: https://github.com/ask/Flask-Celery
:PyPI: http://pypi.python.org/pypi/Flask-Celery
:PyPI: ``Flask-Celery``

- ``celerymon``

:git: https://github.com/celery/celerymon
:PyPI: http://pypi.python.org/pypi/celerymon
:PyPI: ``celerymon``

- ``carrot``

:git: https://github.com/ask/carrot
:PyPI: http://pypi.python.org/pypi/carrot
:PyPI: ``carrot``

- ``ghettoq``

:git: https://github.com/ask/ghettoq
:PyPI: http://pypi.python.org/pypi/ghettoq
:PyPI: ``ghettoq``

- ``kombu-sqlalchemy``

:git: https://github.com/ask/kombu-sqlalchemy
:PyPI: http://pypi.python.org/pypi/kombu-sqlalchemy
:PyPI: ``kombu-sqlalchemy``

- ``django-kombu``

:git: https://github.com/ask/django-kombu
:PyPI: http://pypi.python.org/pypi/django-kombu
:PyPI: ``django-kombu``

- ``pylibrabbitmq``

Old name for ``librabbitmq``.

:git: ``None``
:PyPI: http://pypi.python.org/pypi/pylibrabbitmq
:PyPI: ``pylibrabbitmq``

.. _release-procedure:

Expand Down
10 changes: 3 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,11 @@ Installation
You can install Celery either via the Python Package Index (PyPI)
or from source.

To install using `pip`,:
To install using ``pip``:
::

$ pip install -U Celery

To install using `easy_install`,:
::

$ easy_install -U Celery

.. _bundles:

Bundles
Expand Down Expand Up @@ -322,7 +317,8 @@ Transports and Backends
Downloading and installing from source
--------------------------------------

Download the latest version of Celery from
Download the latest version of Celery from PyPI:

http://pypi.python.org/pypi/celery/

You can install it by doing the following,:
Expand Down
2 changes: 1 addition & 1 deletion celery/tests/tasks/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def test_regular_task(self):
consumer, sresult, self.mytask.name, name='Elaine M. Benes',
)

# With eta.
# With ETA.
presult2 = self.mytask.apply_async(
kwargs=dict(name='George Costanza'),
eta=self.now() + timedelta(days=1),
Expand Down
2 changes: 1 addition & 1 deletion celery/tests/worker/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ def test_on_timer_tick(self):
xargs = self.comp_logger.debug.call_args[0]
fmt, arg = xargs[0], xargs[1]
self.assertEqual(30.0, arg)
self.assertIn('Next eta %s secs', fmt)
self.assertIn('Next ETA %s secs', fmt)

def test_process_task(self):
worker = self.worker
Expand Down
2 changes: 1 addition & 1 deletion celery/worker/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def on_timer_error(self, exc):
logger.error('Timer error: %r', exc, exc_info=True)

def on_timer_tick(self, delay):
logger.debug('Timer wake-up! Next eta %s secs.', delay)
logger.debug('Timer wake-up! Next ETA %s secs.', delay)


class Hub(bootsteps.StartStopStep):
Expand Down
4 changes: 2 additions & 2 deletions celery/worker/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def __init__(self, message, on_ack=noop,
eta = maybe_iso8601(eta)
except (AttributeError, ValueError, TypeError) as exc:
raise InvalidTaskError(
'invalid eta value {0!r}: {1}'.format(eta, exc))
'invalid ETA value {0!r}: {1}'.format(eta, exc))
self.eta = maybe_make_aware(eta, self.tzlocal)
else:
self.eta = None
Expand Down Expand Up @@ -405,7 +405,7 @@ def info(self, safe=False):
def __str__(self):
return ' '.join([
self.humaninfo(),
' eta:[{0}]'.format(self.eta) if self.eta else '',
' ETA:[{0}]'.format(self.eta) if self.eta else '',
' expires:[{0}]'.format(self.expires) if self.expires else '',
])

Expand Down
2 changes: 1 addition & 1 deletion celery/worker/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def task_message_handler(message, body, ack, reject, callbacks,
else:
eta = to_timestamp(req.eta, timezone.local)
except OverflowError as exc:
error("Couldn't convert eta %s to timestamp: %r. Task: %r",
error("Couldn't convert ETA %r to timestamp: %r. Task: %r",
req.eta, exc, req.info(safe=True), exc_info=True)
req.acknowledge()
else:
Expand Down
Loading

0 comments on commit 9591b3c

Please sign in to comment.