Add requirements for easier setup and tox.ini

Signed-off-by: Pablo Iranzo Gómez <Pablo.Iranzo@gmail.com>
This commit is contained in:
Pablo Iranzo Gómez 2020-03-27 11:16:00 +01:00
parent 950bbfbabd
commit 82e06a1be6
No known key found for this signature in database
GPG key ID: 034823665BD8E1E4
3 changed files with 25 additions and 0 deletions

2
requirements.txt Normal file
View file

@ -0,0 +1,2 @@
python-telegram-bot
coloredlogs

19
tox.ini Normal file
View file

@ -0,0 +1,19 @@
[tox]
minversion = 2.0
envlist = py3, flake8
skipsdist = True
[testenv]
basepython = python3
passenv = CI TRAVIS TRAVIS_*
usedevelop = False
deps = -r{toxinidir}/requirements.txt
setenv = LANGUAGE=en
whitelist_externals = sh
commands =
/usr/bin/find . -type f -name "*.pyc" -delete
ostestr {posargs}
[testenv:velasco]
commands = ./velasco.sh

4
velasco.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
[ -f .token] && . .token || echo "Configure token in .token as 'export TOKEN=...'" && exit 1
[ -f .uid ] && . .uid || echo "Configure UID in .uid as 'export UID=...'" && exit 1
python velasco.py ${TOKEN} ${UID} | tee -a velasco.log