Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[flake8]
max-line-length=100
application_import_names=snekbox
application_import_names=snekbox,config,logs
ignore=P102,B311,W503,E226,S311
exclude=__pycache__, venv, .venv, tests
import-order-style=pycharm
8 changes: 7 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,23 @@ flask-sockets = "*"
gevent = "==1.2.2"
gevent-websocket = "*"
gunicorn = "*"
"flake8" = "*"
pytest = "*"
pytest-cov = "*"
pytest-dependency = "*"
pre-commit = "*"
flake8 = "*"
flake8-bugbear = "*"
flake8-import-order = "*"
flake8-tidy-imports = "*"
flake8-todo = "*"
flake8-string-format = "*"

[requires]
python_version = "3.6"

[scripts]
lint = "flake8"
precommit = "pre-commit install"
test = "py.test tests --cov . --cov-report term-missing -v"
report = "py.test tests --cov . --cov-report=html"
snekbox = "python snekbox.py"
Expand Down
314 changes: 184 additions & 130 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

import docker
from docker.errors import NotFound
# import traceback


def autodiscover():
Expand Down
11 changes: 5 additions & 6 deletions rmq.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import pika
import time
import traceback

import pika
from pika.exceptions import ConnectionClosed

from config import USERNAME
from config import PASSWORD
from config import EXCHANGE
from config import EXCHANGE_TYPE
from config import HOST
from config import PASSWORD
from config import PORT
from config import EXCHANGE_TYPE
from config import QUEUE
from config import ROUTING_KEY
from config import EXCHANGE

from config import USERNAME
from logs import log


Expand Down
2 changes: 1 addition & 1 deletion snekbox.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import multiprocessing
import subprocess
import os
import subprocess
import sys

from rmq import Rmq
Expand Down
8 changes: 3 additions & 5 deletions snekweb.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import traceback
import threading
import logging
import json
import logging
import threading
import traceback

from flask import Flask
from flask import render_template
from flask_sockets import Sockets


from rmq import Rmq

# Load app
Expand Down