Wakabi - a telegram bot to learn new English words.
Bot can find definitions for unknown words, extract unfamiliar words from subtitles (.srt
)
and provide you with repetition trainings
- Clone
git
repo:
git clone https://github.com/WinnerOK/wakabi.git
cd wakabi
- If you don't have
Poetry
installed run:
make poetry-download
- Initialize poetry and install
pre-commit
hooks:
make install
make pre-commit-install
- Run formatters, linters, and tests. Make sure there is no errors.
make format lint test
Makefile
contains a lot of functions for faster development.
1. Download and remove Poetry
To download and install Poetry run:
make poetry-download
To uninstall
make poetry-remove
2. Install all dependencies and pre-commit hooks
Install requirements:
make install
Pre-commit hooks could be installed after git init
via
make pre-commit-install
3. Codestyle
Automatic formatting uses pyupgrade
, isort
and black
.
make codestyle
# or use synonym
make format
Codestyle checks only, without rewriting files:
make check-codestyle
Note:
check-codestyle
usesisort
,black
anddarglint
library
Update all dev libraries to the latest version using one comand
make update-dev-deps
4. Code security
make check-security
This command identifies security issues with Safety
and Bandit
.
make check-security
To validate pyproject.toml
use
make check-poetry
5. Linting and type checks
Run static linting with pylint
and mypy
:
make static-lint
6. Tests with coverage
Run pytest
make test
7. All linters
Of course there is a command to rule run all linters in one:
make lint
the same as:
make test && make check-codestyle && make static-lint && make check-safety
8. Docker
make docker-build
which is equivalent to:
make docker-build VERSION=latest
Remove docker image with
make docker-remove
More information about docker.
9. Cleanup
Delete pycache files
make pycache-remove
Remove package build
make build-remove
Delete .DS_STORE files
make dsstore-remove
Remove .mypycache
make mypycache-remove
Or to remove all above run:
make cleanup
This project was generated with python-package-template