Skip to content

Telegram bot designed for calculating income tax for England, Northern Ireland and Wales.

License

Notifications You must be signed in to change notification settings

Zirochkaa/income-tax

Repository files navigation

pytest

Income tax

This repository contains pet project - telegram bot designed for calculating income tax for England, Northern Ireland and Wales :)

Link to the working telegram bot here - @income_tax_uk_bot (currently shut down).

Run project locally

  1. Setup and activate your local python environment. Here are few guides on how to do it.
  2. Install requirements:
    pip install -r requirements-local.txt
  3. Create .env file:
    cp app/.env.template app/.env
  4. Obtain Telegram Bot Token by creating Telegram Bot. Here (Obtain Your Bot Token section) is a guide on how to do it. Update TELEGRAM_BOT_TOKEN in .env file.
  5. This app uses a webhook approach to processing bot updates. In order to do it your localhost has to be put on the internet. You can achieve this by using ngrok. You need to install it and run:
    ./ngrok http 8000
    After running above command you will see something like this:
image

You will need to copy Forwarding part (for example, on the screenshot it will be https://03d2-146-70-181-35.ngrok-free.app) and update APP_BASE_URL in .env file.

  1. It's time to run application:
    uvicorn app.run:app --reload
  2. Go to 127.0.0.1:8000 in your web browser.

Tests

To run tests use following command:

pytest tests/

If you want to check code coverage use following command:

pytest --cov-config=.coveragerc --cov=app tests/

About

Telegram bot designed for calculating income tax for England, Northern Ireland and Wales.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages