MyMood-Alexa / MyMood

0 stars 1 forks source link

MyMood

Project Details

My Mood is an interactive Alexa application that a user can talk about their day with. The goal of this application is to improve, assess, and get help for the user's mental state.

Features

MyMood has three main features:

Components


Components Overview Figure

The following is a list of components relevant to MyMood:

On-Boarding Guide

Development Team Guidelines

Scrum Process

Developer Guidelines

One exception is that we prefer

if(...) {
    ...
}
else {
    ...
}

over

if(...) {
    ...
} else {
    ...
}

Environment Setup Instructions

Python Environment

  1. Download and Install Anaconda and Spyder
  2. Using the Anaconda Prompt:

    Check that Python 3.x is installed with python --version

    Use: conda install python=3.6 and conda update python if it isn't

    Install Flask-Ask framework with conda install -c anaconda flask on the Anaconda Prompt

DynamoDB

  1. Follow instructions to set up AWS CLI
  2. Install boto3 on anaconda with:
    conda install -c anaconda boto3
  3. Follow instructions to configure boto3
  4. Run create_table() from database.py
  5. DynamoDB commands can be found here

Google Places API

  1. For local testing, get a Google Places API key here
  2. Create a config file in your local mymood repository named 'config.py'
  3. Insert your API key in config.py as API_KEY='YOUR_KEY'

Local Testing

  1. Download ngrok

  2. Run main.py on Spyder

  3. Without stopping main.py, run ngrok.exe and enter 'ngrok http 5000'

  4. Copy the forwarding endpoint, which looks something like https://4986f389.ngrok.io. Make sure it's the https endpoint

  5. Go to Alexa Developer Console and under Build > Endpoint, paste the ngrok https endpoint in default region. Select 'My development endpoint is a subdomain of a domain...' and click 'Save Endpoints'


    Ngrok Endpoint in Alexa Skill Console

  6. Test through the Developer Console or with your Alexa

  7. Terminate main.py and ngrok when you have finished testing

Useful GitHub Commands

Setting Up the Local Repository

  1. Fork organization’s master repository at https://github.com/MyMood-Alexa/MyMood to your own GitHub
  2. git clone https://github.com/<your_github_id>/MyMood
  3. git remote -v should show 2 origin links
  4. git remote add upstream https://github.com/MyMood-Alexa/MyMood
  5. git remote -v should show 2 origin links and 2 upstream links

Pull Request Workflow

  1. git commit -m "<waffle_issue_header>" to add your changes to a commit, or git commit --amend --no-edit to amend your topmost commit without adding another commit. Use git rebase -i to correct an even older commit.
  2. git pull --rebase upstream master to get the latest source code from the master repository while putting your commits on top
  3. git push to push to your forked repository, or git push upstream <your_local_branch>:<remote_branch> to push to your branch on the master repository
  4. Submit pull request:
    • If needed to fulfill a subtask: Add “required by #” to pull review description
    • If needed to fix a bug: Add “closes #” to pull review description
    • Attach testing screenshots to your pull review description
  5. Address any feedback regarding your pull request and retest if needed. When your pull review has received at least 2 approvals, it can be rebased and merged

Waffle management