Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.18 KB

SETUP_GUIDE.md

File metadata and controls

56 lines (40 loc) · 1.18 KB

Setup Guide

STEP 1 - Install pip

python -m pip install --upgrade pip

STEP 2 - Install virtualenv

(to isolate the versioning of the dependencies so they don't clash with global variables)

python -m pip install --user virtualenv

STEP 3 - Create a Virtual Environment

python -m venv .venv

STEP 4 - Activate the Virtual Environment

.venv/Scripts/Activate
# FOR MAC:
.venv/bin/activate

STEP 5 - Install Dependencies

# Ensure that you are in the project root directory
# (directory containing the README file)
python -m pip install .
python -m pip install -r tests/requirements.txt

STEP 6 - Initialize the Database

# To initialise and EMPTY database
python -m flask --app solar_offset init-db

# To populate the database with the given test data
python -m flask --app solar_offset init-db .\tests\data.sql

# You can select another sql file to populate the database with different data
# For guidance on the database tables and columns, see the `solar_offset/schema.sql` file

STEP 7 - Run the Web Application Development Server

python -m flask --app solar_offset run -h localhost --port 8000