Coder Social home page Coder Social logo

trendingtechnology / vaxfinder-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vaccine-hunters-canada/vaxfinder-backend

0.0 1.0 0.0 347 KB

Backend for the Vaccine Hunters Finder tool.

License: Other

Python 99.34% Dockerfile 0.66%

vaxfinder-backend's Introduction

๐Ÿ’‰ ๐Ÿ” VaxFinder - Backend

The backend for the Vaccine Hunters Finder tool.

Development

Prerequisites

  1. Python 3.8
  2. Poetry: A tool for dependency management and packaging.
  3. Access to VaxFinder's Microsoft SQL Server database hosted on Azure. Please message Patrick or Evan for access.

Installation

  1. Install the unixODBC library if you are on a linux environment as it's required for pyodbc (hence aioodbc). You can install it using your package manager, for example:

    $ sudo apt-get install unixodbc
    $ sudo apt-get install unixodbc-dev
  2. Install Microsoft ODBC Driver 17 for SQL Server: Windows | Mac | Linux

  3. Set up a VSCode MyPy Language Server (Optional)

    On macOS or Linux:

    $ python -m venv ~/.mypyls
    $ ~/.mypyls/bin/pip install "https://github.com/matangover/mypyls/archive/master.zip#egg=mypyls[default-mypy]"

    On Windows:

    $ python -m venv %USERPROFILE%\.mypyls
    $ %USERPROFILE%\.mypyls\Scripts\pip install "https://github.com/matangover/mypyls/archive/master.zip#egg=mypyls[default-mypy]"

    Install the mypy extension in VS Code (or reload the window if the extension is already installed).

  4. Install all python dependencies with Poetry.

    $ poetry install

Running the Server

  1. Spawn a shell within a virtual environment.

    $ poetry shell

    All python dependencies should be installed within the virtual environment from the previous step.

  2. Run the server on port 8007 from the root of the project within the shell.

    $ DB_URL={DATABASE_URL} python -m app.main

Pre-commit Hooks

Pre-commit hooks helps identify simple issues in code before it's committed into Git. At the moment, isort and black are the only hooks that are set up.

Install the git hook scripts

$ pre-commit install

Temporarily Disabling hooks

It's possible to disable hooks temporarily, but it isn't recommended.

$ SKIP=isort,black git commit -m <message>

Environments

Production

Please note that the production environment is currently not stable. โš ๏ธ

The production environment, deployed after a staging build of the main branch is manually approved, can be accessed here: https://vax-availability-api.azurewebsites.net.

Staging

The staging environment, which is automatically deployed from the main branch, can be accessed here: https://vax-availability-api-staging.azurewebsites.net.

vaxfinder-backend's People

Contributors

alvintangz avatar egamble01 avatar jman005 avatar pleckey avatar rayraykay avatar sayonb avatar

Watchers

 avatar

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.