blob: 05a27ee4dfc7fb20c0cd7a7102b9d31a31c5f9d8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# RIT COVID Poller
## Endpoints
- `/api/v0/latest` - retrieve the current state of the dashboard in JSON format
- `/api/v0/history` - retrieve all the prior states of the dashboard
## Setup
Locally running this application should be pretty simple.
1. (optional) Use a virtualenv
* Why use a venv? It isolates your dependencies and helps prevent version conflicts with other projects or system dependencies.
1. `python3 -m venv venv` will create a venv in a directory named venv
2. `source ./venv/bin/activate` will activate the venv
2. Install dependencies
* `pip install -r requirements.txt`
3. Run the app
* `gunicorn poller:APP --bind=localhost:5000`
3.5. Scream because the database won't work because that's hard and I wrote this really poorly (rewrite soon(tm))
4. Visit localhost:5000 in your web browser.
## Linting
This demo uses pylint.
Travis CI will automatically run pylint on commits and PRs, but you can also run pylint manually, using `pylint poller`.
The pylint_quotes plugin is loaded by [the pylintrc](./.pylintrc) and will ensure standardised quotation mark formats.
|