Bot for SysBlok ("Системный Блокъ") editorial processes automatization.
- You might need to set up
ru_RU.UTF-8locale. To do that, runsudo locale-gen "ru_RU.UTF-8"sudo dpkg-reconfigure locales
- Create a testing bot through BotFather and obtain the token.
- Create
config_override.jsonin the same directory and put sensitive tokens there (you can copypaste fromconfig.jsonfirst). Do not pushconfig_override.jsonto the repo!- Run
export INFRA_HOST=<SYSBLOK_INFRA_HOST>, putting in the actual URL - Run
sh get_keys.sh. This will downloadconfig_override.jsonandconfig_gs.jsonto your folder.
- Run
- Replace
YOUR_CHAT_ID,YOUR_USERNAMEandBOT_TOKENwith appropriate values pip install -e .pip install -r requirements.txtpre-commit install- If access to Telegram servers is restricted by your internet provider: install and run any VPN service
python3 app.py
- Fork the repo.
- Clone your forked repo to your local workspace.
- Create a branch from
dev. You'll need to do it for every new feature or bugfix. - Write code in your local repo.
- Run pre-checks locally and write tests (if applicable).
- Create a pull request from your branch to
devand ask for relevant approval. It is not strictly necessary to get an approval, but please do that. - Merge into
devbranch after approval. This merge triggers tests checks, test docker push and updating of a test bot (not yet). - When
devbranch is stable, manually tested and tests are green, commits go fromdevtomaster. If checks are successful, production bot will update. See Github Actions tab to check CI status.
pycodestyle --max-line-length=100 .checks pep8 compliance.pytestruns tests.