This is a Telegram bot that summarizes chats. It can give you the gist of the last N messages within the chat.
.env
file based on .env.template
. It's suggested to use the python build tool, Rye. Installation guides can be found on their site.
After Rye is installed, you run the following:
rye sync
rye run dev
rye run stop
You can run the application as a docker containers with the following.
docker-compose up -d --build
This will build the images for you then run them in a detached mode. If you do not need to build the images, you can use the following command.
docker-compose up -d
Use the following command to build the image
docker build . -t <tag-the-image>
main.py
rye run redis
main.py
This project contains tests. We use Pytest for the testing framework. Tests can be run 2 ways:
rye run tests
This executes the Rye test script.
pytest -n auto tests --spec
Runs Pytest in a parallel mode. Note: We create atom tests that facilitate this. Meaning, our practice is not writing tests that share state, or depending on the results from other tests.
The application requires a Redis cache to store messages.
docker-compose up -d
will spin up a cache for you. But if you
decide to use a different version, you'll have to get
the images from Redis' official Docker hub.