Giter Site home page Giter Site logo

polaris's Introduction

Polaris

BPL Account Holders enrolment API

configurations

  • create a local.env file in the root directory
  • add your configurations based on the environmental variables required in polaris.core.config.Settings or use the file in local/local.env.example as template

running

  • poetry install

api run

  • poetry run python asgi.py or poetry run uvicorn asgi:app --port=8000

api run + prometheus metrics

  • PROMETHEUS_MULTIPROC_DIR=/tmp gunicorn --workers=2 --worker-class=uvicorn.workers.UvicornWorker --bind=0.0.0.0:8000 --bind=0.0.0.0:9100 asgi:app

task worker (rq)

  • OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES poetry run python -m polaris.core.cli task-worker
  • this worker deals with async tasks, for example activating pending account holders and executing the HTTP callback to the enrolling party

Running the command with the above environment variable is a work around for this issue. It's a mac only issue to do with os.fork()'ing which rq.Worker utilises.

cron scheduler (apscheduler)

  • poetry run python -m polaris.core.cli cron-scheduler
  • schedules regular tasks, for example processing pending rewards that need converting

unittest

  • create a Settings.POSTGRES_DB + _test database in postgres
  • poetry run pytest tests

polaris's People

Contributors

lupusinfabula avatar davefelce avatar lewejuice avatar cpriorbink avatar sperrygrove avatar haffi96 avatar cpressland avatar twinchester avatar thenu97 avatar renovate[bot] avatar christianprior avatar backwardspy avatar

Watchers

 avatar  avatar  avatar Kashim Aziz avatar

polaris's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency Jinja2 to v3.1.4
  • Update dependency babel to v2.15.0
  • Update dependency fastapi-prometheus-metrics to ^0.3.0
  • Update dependency refurb to v1.28.0
  • Update dependency requests to v2.32.3
  • Update dependency rq to v1.16.2
  • Update dependency ruff to ^0.4.0
  • Update dependency sentry-sdk to v1.45.0
  • Update dependency tenacity to v8.3.0
  • Update dependency typer to ^0.12.0
  • Update dependency ujson to v5.10.0
  • Update dependency uvicorn to ^0.30.0
  • Update ghcr.io/binkhq/python Docker tag to v3.12
  • Update actions/checkout action to v4
  • Update actions/setup-python action to v5
  • Update dependency black to v24
  • Update dependency certifi to v2024
  • Update dependency cosmos-message-lib to v2
  • Update dependency cryptography to v42
  • Update dependency deepdiff to v7
  • Update dependency email-validator to v2
  • Update dependency gunicorn to v22
  • Update dependency hiredis to v2
  • Update dependency pydantic to v2
  • Update dependency pytest to v8
  • Update dependency pytest-cov to v5
  • Update dependency redis to v5
  • Update dependency refurb to v2
  • Update dependency retry-tasks-lib to v3
  • Update dependency sentry-sdk to v2
  • Update dependency sqlalchemy to v2
  • Update dependency testfixtures to v8
  • Update dependency tzdata to v2024
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

dockerfile
Dockerfile
  • ghcr.io/binkhq/python 3.10
github-actions
.github/workflows/build.yaml
  • binkhq/actions v1
  • binkhq/actions v1
.github/workflows/test.yaml
  • actions/checkout v3
  • actions/setup-python v4
pep621
pyproject.toml
  • poetry-core >=1.0.0
poetry
pyproject.toml
  • python >=3.10,<3.12
  • fastapi ^0.95.0
  • uvicorn ^0.18.3
  • sqlalchemy ^1.4.41
  • ujson ^5.4.0
  • email-validator ^1.2.1
  • psycopg2-binary ^2.9.3
  • asyncpg ^0.26.0
  • alembic ^1.8.1
  • pydantic ^1.10.2
  • azure-identity ^1.10.0
  • azure-keyvault ^4.2.0
  • prettyprinter ^0.18.0
  • PyYAML ^6.0
  • prometheus-client ==0.12.0
  • blinker ^1.5
  • gunicorn ^20.1.0
  • requests ^2.28.1
  • sentry-sdk ^1.17.0
  • tenacity ^8.0.1
  • typer ^0.6.1
  • rq ^1.11.0
  • redis ^4.5.3
  • hiredis ^1.0.2
  • Jinja2 ^3.1.2
  • azure-storage-blob ==12.8.1
  • APScheduler ^3.9.1
  • retry-tasks-lib ^2.2.1
  • cosmos-message-lib ^1.3.0
  • fastapi-prometheus-metrics ^0.2.7
  • babel ^2.11.0
  • certifi ^2023.7.22
  • cryptography ^41.0.2
  • tzdata ^2023.4
  • pytest ^7.1.3
  • pytest-asyncio ^0.19.0
  • pytest-cov ^3.0.0
  • black ^22.8.0
  • isort ^5.10.1
  • mypy ^1.2.0
  • ipython ^8.5.0
  • xenon ^0.9.0
  • httpretty ^1.1.4
  • pytest-mock ^3.8.2
  • testfixtures ^7.0.0
  • deepdiff ^5.8.1
  • SQLAlchemy-Utils ^0.38.3
  • ruff ^0.0.262
  • refurb ^1.15.0
  • httpx ^0.24.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.