/api

Official API for the NIMBUS Voice Assistant accessible via HTTP REST protocol.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

api

GitHub repo size GitHub code size in bytes GitHub closed issues GitHub closed pull requests

Official API for the NIMBUS Voice Assistant accessible via HTTP REST protocol.

🚧 This API is still in-development, so expect the endpoints to be constantly changing until finalized.

GitHub Actions Status

Deploy To Staging Server

Run Tests

Python PEP8 Style Check

Python Pyre Type Annotation Check

Documentation

Dev Environment Setup

Prerequisites

  1. Python 3.6.9

  2. pip 9.0.1

Database Configuration

Create a file called config.json that should include at least the following details of a MySQL database:

{
    ...
    "mysql": {
        "host": "HOSTNAME",
        "port": "PORT e.g. 3306",
        "user": "USERNAME",
        "password": "PASSWORD",
        "database": "DATABASE",
        ...
    }
    ...
}

You can also use config_SAMPLE.json as a reference

Contact anyone on the Data Team to get connection details for the Nimbus database

Install

pip3 install -r requirements.txt

Run the API server

python3 nimbus_api.py

Run in the background

python3 nimbus_api.py&

Run the tests

pytest

Python PEP8 Style Standards

Run the format script to automatically make our code look nice

./format.sh

Sometimes the format script is not enough, so run lint to manually style our code

./lint.sh

Deployment

What we use

A Linux server (e.g. Ubuntu 18.04.3 LTS) with open firewall at tcp:5000 for Flask, tcp:80 for http and tcp:443 for https and tcp:22 for ssh and tcp:3306 for mysql

See this documentation of the database deployment process

Contributing

GitHub issues

Have a look at the v1.0 project board for TODOs!

If you are new to programming, then filter for the good first issue label

Pull requests are welcome.

For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GNU GPLv3

Authors and acknowledgment

Michael Fekadu

John Waidhofer

Miles Aikens

Daniel DeFoe

Taylor Nguyen

Adam Perlin

Simon Ibssa

Kush Upadhyay

Ben Dahlgren

Tyler Campanile

Steven Bradley