# notifications-debug-tools

## Pre-requirements
`python3.11` is recommended, but this code should run on any version above `3.7`


## Installation
1. Create virtual environment using your favorite tool like `virtualenv` or `pyenv`
2. Install requirements `pip install -r requirements.txt`
3. Run `cp .env.sample .env`
4. Populate `.env` file with corresponding values


## Usage
`./ndt.py` is an entry point for all commands.

For now the next commands are available:
1. `check_subscriptions` - check vendors/subaccounts user is subscribed
2. `check_emails` - check all notification emails that been sent to specified emails

More information about available commands and parameters is available in `help` message.
e.g. `./ndt.py -h` or `./ndt.py check_subscriptions -h`

### Example usage
```bash
./ndt.py check_subscriptions label_analytics_digest --email=user.email@example.com
```

## Contributing
1. Install [pre-commit](https://pre-commit.com/#installation)
2. ~~Install git hook by running `pre-commit install`~~ (As long it's not in separate repo we don't really want to install git hook)
3. Run `pre-commit run --files ./src/* ndt.py` before commit anything
4. Enjoy your contribution!
