Skip to content

Commit

Permalink
Restructure project (#2)
Browse files Browse the repository at this point in the history
* Restructure the project

* Add very basic smoke check

* Fix app launch
  • Loading branch information
DaniruKun committed Nov 29, 2019
1 parent 28667f1 commit 00939a1
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 9 deletions.
8 changes: 3 additions & 5 deletions .travis.yml
@@ -1,9 +1,7 @@
language: python
python:
- "3.6" # current default Python on Travis CI
# command to install dependencies
- "3.6"
install:
- pip install -r requirements.txt
# command to run tests
#script:
# - pytest
script:
- python -m pytest
2 changes: 1 addition & 1 deletion Procfile
@@ -1 +1 @@
worker: python3 app.py
worker: python3 -m main.py
3 changes: 3 additions & 0 deletions main.py
@@ -0,0 +1,3 @@
from opencv_bot import app

app.main()
1 change: 1 addition & 0 deletions opencv_bot/__init__.py
@@ -0,0 +1 @@
from opencv_bot import app
6 changes: 3 additions & 3 deletions app.py → opencv_bot/app.py
Expand Up @@ -4,9 +4,9 @@
import re
import telegram
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
from utils.imgproc import (hsv, grey, red, green, blue, hue, sat, val,
get_blur, get_sharp, norm, get_sobel, histeq,
get_dft, get_rotated, get_threshold)
from opencv_bot.utils.imgproc import (hsv, grey, red, green, blue, hue, sat, val,
get_blur, get_sharp, norm, get_sobel, histeq,
get_dft, get_rotated, get_threshold)

# OpenCV bot auth token
TOKEN = os.environ["TELEGRAM_TOKEN"]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions requirements.txt
@@ -1,11 +1,21 @@
attrs==19.3.0
certifi==2019.9.11
cffi==1.13.1
cryptography==2.8
future==0.18.2
gunicorn==19.9.0
importlib-metadata==0.23
more-itertools==7.2.0
numpy==1.17.3
opencv-python-headless==3.4.6.27
packaging==19.2
pluggy==0.13.1
py==1.8.0
pycparser==2.19
pyparsing==2.4.5
pytest==5.3.1
python-telegram-bot==12.2.0
six==1.12.0
tornado==6.0.3
wcwidth==0.1.7
zipp==0.6.0
File renamed without changes.
3 changes: 3 additions & 0 deletions test/test_smoke.py
@@ -0,0 +1,3 @@
from opencv_bot import app

assert 1 == 1

0 comments on commit 00939a1

Please sign in to comment.