cd web
yarn start
RIOT_API_KEY={APIKEY}
DISCORD_TOKEN={TOKEN}
pip3 install -r requirements.txt
npx nodemon --exec python3 bot.py
python3 bot-main.py
black
as auto formatter.black
; pip3 install blackPython › Formatting: Provider
in vscode setting to be black
....
"editor.defaultFormatter": "ms-python.python"
}
pylint
on pre-push
and enable on pre-commit
, please run following command:pre-commit uninstall --hook-type pre-push
pre-commit install --hook-type pre-commit
After above command, if .git/hooks/pre-commit file has been created, then your pre-commit should work as expected.
LOCAL_BOT_PREFIX= ""
to .env with desired prefix between the double quotes$ psql postgres
postgres=# CREATE USER admin_bot WITH SUPERUSER PASSWORD 'test';
postgres=# CREATE DATABASE bot_dev OWNER admin_bot;
SQLAlchemy
and psycopg2
SQLAlchemy
, psycopg2
if you haven't from step 3
.DB_URL='postgresql://admin_bot:test@localhost/bot_dev'
into .env fileInstall alembic if not installed yet from step 3
pip3 install alembic
For first time, after install, run
alembic upgrade head
To genearte new migration;
alembic revision -m "create account table"
This will create new migration file under /alembic/versions. Fill in the file.
To apply migration;
alembic upgrade head
Make sure you update the models reference in db/models/ to represent newly added schema
To revert one migration;
alembic downgrade -1
To revert all migration;
alembic downgrade base
Pydash https://pydash.readthedocs.io/en/latest/index.html
riotwatcher https://riot-watcher.readthedocs.io/en/latest/