This repository has been archived by the owner on Apr 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
[WIP] More impro #8
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6b12175
Add pre commit hooks (copied from Kolibri)
benjaoming aa6eb43
Add tox support and gather coverage
benjaoming dcc9b88
Add Travis support
benjaoming 2b2c8cf
Add enum34 dependency
benjaoming af17a11
Translate README to rst (using pandoc)
benjaoming a21cb78
Use README.rst for setup.py
benjaoming 9637b3b
Additional requirements missing in setup.py
benjaoming 866b9e9
Python 2+3 import of queue
benjaoming ce3a089
Add missing __init__.py files
benjaoming d448d61
Wrapping up non-finished Py2 compatibility for this PR
benjaoming File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
- repo: git://github.com/pre-commit/pre-commit-hooks | ||
sha: a11d9314b22d8f8c7556443875b731ef05965464 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: flake8 | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- repo: git://github.com/FalconSocial/pre-commit-python-sorter | ||
sha: 5991d2aea26858d3c3538e0b4e09255b6b99413e | ||
hooks: | ||
- id: python-import-sorter | ||
args: | ||
- --silent-overwrite | ||
- repo: git://github.com/pre-commit/mirrors-eslint | ||
sha: v3.14.0 | ||
hooks: | ||
- id: eslint | ||
additional_dependencies: [ 'eslint', 'eslint-plugin-html', 'eslint-config-airbnb', 'eslint-plugin-import', 'eslint-plugin-jsx-a11y'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Config file for automatic testing at travis-ci.org | ||
|
||
language: python | ||
|
||
sudo: false | ||
|
||
matrix: | ||
include: | ||
- python: "2.7" | ||
env: | ||
- TOX_ENV=py27 | ||
- python: "3.4" | ||
env: | ||
- TOX_ENV=py34 | ||
- python: "3.5" | ||
env: | ||
- TOX_ENV=py35 | ||
- python: "pypy" | ||
env: | ||
- TOX_ENV=pypypy | ||
|
||
before_install: | ||
- pip install -U pip | ||
- pip install tox | ||
|
||
# command to run tests, e.g. python setup.py test | ||
script: | ||
- tox -e $TOX_ENV | ||
|
||
after_success: | ||
- codecov | ||
|
||
notifications: | ||
slack: | ||
secure: RH3xqTkkoA2TATYo7onoLlAlw5t7Bek3HqN/e48e1mj3nazTUs05k12e9Cj7I/y7rBu4b1g0Fl4nJ/DOJRD/81o2ML8OAqu4Ngfg149EQysvgHki20CY1LMph0aS5HSACL1yvp8VvDmmpF0F8YGh99ZMeV3qdp0t3AVWSQVIQgVOEjUSPklsf25ikCOqzTRCz90Dp5aIlDUuXtubTATaKQiLfqW8rc/S7Q/JLepmZau5ANFz8cHXn750y6EvEREIE/0gBwH6OWOa1qWCavJPc4z9953zX7rhI85f0eaHVYQ0ojeXJjQG4MOu5kP13tkaLppe1On3fBZLPpeF791EJwgcmEFUd8hDsomfHcxXhHf7+LPwbGjelGr8iY/2ZIWuILY17FmnWyruWyusrHpA1YKBFwjqgo7E06uzwVj9npxbc+WEHuBxTDdaeFYjYRLORvOeJ9y3n+rNs2c9gCvwuq3MzhMWT+KsrrngAibns1Fz/I1YZAY3voipmabeXVLqbLvb8f8xBmwwK14ba0tGMHfnnCfivlruS49qLwpMjASEPY3H8lKyROX94aaWj+B1Fld2kX0L5GN3xkVoT1aJOgOxCF9c7w9Kf1aTcf/T4bfEzjPNf3ZH3rwy/b3YABbQAEdV8SLdrD02+CIYNPzv3/U1y3rmTSg0wLT2elumhv8= |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
barbequeue | ||
========== | ||
|
||
A self-contained pure python messaging and task queue system, with | ||
optional non-Python dependencies | ||
|
||
Installation | ||
============ | ||
|
||
Requirements | ||
------------ | ||
|
||
The base installation requires either Python 2.7, or 3.4+. | ||
|
||
Goals | ||
===== | ||
|
||
1. Work on Windows 7 and above. | ||
2. Work on Python 2.7 and 3. | ||
3. Should the least amount of dependencies for the minimal use case. To | ||
use other backends and services (Django, Google PubSub etc.) will | ||
require more dependencies. | ||
|
||
Problems with current pure python task queues | ||
--------------------------------------------- | ||
|
||
1. Does not work with Windows out of the box. | ||
2. Does not support progress tracking. | ||
|
||
Design | ||
====== | ||
|
||
Barbequeue (or bbq for short) will be built as a layer on top of a | ||
messaging system. By allowing the messaging system to have multiple | ||
backends, from a simple in-process and in-memory function, to a database | ||
backend, to a full blown global messaging service like Amazon SQS, bbq | ||
can scale up or change its features based on the application's | ||
requirements. | ||
|
||
Out of the box, bbq.messaging supports the following backends: | ||
|
||
1. asyncio (lowest resources used, available on 3.4+) | ||
2. socketserver (recommended for Windows machines, allows for | ||
multi-machine task delegation) | ||
|
||
You can install additional bbq plugins to support the following | ||
backends: | ||
|
||
1. Google Pub/Sub (TODO) | ||
2. Amazon SQS (TODO) | ||
|
||
for bbq.queue, there are the following task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,6 @@ py==1.4.33 | |
pyparsing==2.2.0 | ||
pytest==3.0.7 | ||
pytest-mock==1.6.0 | ||
pytest-cov | ||
six==1.10.0 | ||
enum34>=1.1,<2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
Everything in this module should have a Python 3 interface, but should be | ||
compatible with Python 2 | ||
""" | ||
|
||
import sys | ||
import threading | ||
|
||
# Because "Queue" was renamed to "queue" in Py3. | ||
is_py2 = sys.version[0] == '2' | ||
if is_py2: | ||
import Queue as queue # noqa @UnusedImport | ||
else: | ||
import queue as queue # noqa @UnusedImport @Reimport | ||
|
||
if is_py2: | ||
Event = threading._Event | ||
else: | ||
Event = threading.Event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[tox] | ||
envlist = py{27,34,35,pypy} | ||
|
||
[testenv] | ||
usedevelop = True | ||
setenv = | ||
PYTHONPATH = {toxinidir} | ||
basepython = | ||
py27: python2.7 | ||
py34: python3.4 | ||
py35: python3.5 | ||
pypypy: pypy | ||
deps = | ||
-r{toxinidir}/requirements.txt | ||
commands = | ||
py.test --cov=src/barbequeue --color=no {posargs} | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.