No description
This repository has been archived on 2026-04-20. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Python 99%
  • HTML 0.9%
Find a file
backwardspy d49d4ba4e9
feat: remove commas from earn amounts
commas will still be present when formatting with a currency symbol, but when just the raw amount is requested then no separators will be added.
2024-04-08 17:21:18 +01:00
.github/workflows Modernise CI 2024-01-18 12:39:45 +00:00
admin BPL-1058-Make-retailer-inactive 2023-05-02 17:04:42 +01:00
alembic BPL-1054 Remove EmailTemplate.template_id unique constraint 2023-04-13 11:54:54 +01:00
cosmos feat: remove commas from earn amounts 2024-04-08 17:21:18 +01:00
data_gen Update data_gen db_uri for psycopg3 2023-04-04 09:44:28 +01:00
scripts BPL-955: CI workflow to autogenerate erd 2023-03-14 09:41:26 +00:00
tests BPL-1058-Make-retailer-inactive 2023-05-02 17:04:42 +01:00
.coveragerc BPL-1020 email refactor 2023-03-30 17:32:43 +01:00
.dockerignore Add combined models and skeleton FastAPI apps + cli + essentials 2022-11-23 15:52:04 +00:00
.gitignore Upgrade SQLAlchemy to version 2.x 2023-04-04 09:33:58 +01:00
alembic.ini A merged models file and an enrolment endpoint 2022-11-25 18:15:58 +00:00
Dockerfile Modernise CI 2024-01-18 12:39:45 +00:00
poetry.lock chore: improve dev bootstrap process 2024-04-08 17:20:41 +01:00
pyproject.toml chore: improve dev bootstrap process 2024-04-08 17:20:41 +01:00
README.md fix: main sentry-sdk package to include flask extra 2023-02-28 17:38:25 +05:00
style.sh BPL-913 campaign and reward actions 2023-03-01 17:12:55 +02:00

Bink Provided Loyalty 2.0

Setup

  • CREATE DATABASE cosmos;
  • poetry install
  • To include admin dependencies, poetry install -E admin
  • To include all dependencies (including admin, dev, test):
    • poetry install --all-extras
  • create a local.env file in the root directory (below)

Example local.env

REDIS_URL=redis://localhost:6379/0
POSTGRES_PASSWORD=postgres
LOG_FORMATTER=brief
SQL_DEBUG=True

Data generation (bestla)

poetry run bestla --password postgres -B --retailer trenette --max-val 100 --add-fetch-types --refund-window 10 -c trenette-campaign -L STAMPS

Running APIs

Accounts API

poetry run cosmos api --port 8000 --reload accounts

Transactions API

poetry run cosmos api --port 8000 --reload transactions

Admin Panel

poetry run python admin/wsgi.py

Testing

Checking unit test coverage

Run pytest with cov-report

pytest --verbose --cov cosmos --cov-report html

Then open the html report

open htmlcov/index.html