Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

minerva-schools/cs162-minerva-grades

Repository files navigation

Welcome to CS162 Final Project

Run Virtual Environment

If you use an IDE, it should create the virtual environment for you. Skip to 'Run Application'

Virtual environment is a key component in ensuring that the application is configured in the right environment

Requirements
  • Python 3
  • Pip 3
$ brew install python3

Pip3 is installed with Python3

Installation

To install virtualenv via pip run:

$ pip3 install virtualenv
Usage

Creation of virtualenv:

$ virtualenv -p python3 venv

If the above code does not work, you could also do

$ python3 -m venv venv

To activate the virtualenv:

$ source venv/bin/activate

Or, if you are using Windows - reference source:

$ venv\Scripts\activate

To deactivate the virtualenv (after you finished working):

$ deactivate

Install dependencies in virtual environment:

$ pip3 install -r requirements.txt

Environment Variables

All environment variables are stored within the .env file and loaded with dotenv package.

Never commit your local settings to the Github repository!

Run Application

Start the server by running:

$ python3 -m flask run

Unit Tests

To run the unit tests use the following commands:

$ python3 -m venv venv_unit
$ source venv_unit/bin/activate
$ pip install -r requirements-unit.txt
$ pytest unit_test

Integration Tests

Start by running the web server in a separate terminal.

Now run the integration tests using the following commands:

$ python3 -m venv venv_integration
$ source venv_integration/bin/actvate
$ pip3 install -r requirements-integration.txt
$ pytest integration_test

Deployment

We will use Heroku as a tool to deploy your project, and it is FREE

We added Procfile to help you deploy your repo easier, but you may need to follow these steps to successfully deploy the project

  1. You need to have admin permission to be able to add and deploy your repo to Heroku (Please ask your professor for permission)
  2. You need to create a database for your website. We recommend you use Heroku Postgres
  3. You may need to add environment variables to deploy successfully - Resource

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published