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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from benjaoming/setup-impro
More impro, fixing python 3.4
- Loading branch information
Showing
17 changed files
with
171 additions
and
54 deletions.
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 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} |