mhwkb/ocdaction

Name: ocdaction

Owner: Mental Health GitHub Group

Description: OCD Action App - A collaborative, youth­led project aiming to make use of digital technology to provide mental health support to children & adolescents suffering with anxiety.

Forked from: womenhackfornonprofits/ocdaction

Created: 2017-10-26 06:17:24.0

Updated: 2018-05-21 16:32:21.0

Pushed: 2018-05-21 16:32:19.0

Homepage: http://staging-ocdaction.herokuapp.com/

Size: 1517

Language: CSS

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

OCD Action

Content

  1. Description
  2. Setup
  3. Contributing

Description

A collaborative, youth­led project aiming to make use of digital technology to provide mental health support to children & adolescents suffering with anxiety.

More Info

Tech

Setup

Tools
  1. Terminal: iTerm2 (MacOSX), Terminator (Linux) or use your preffered one.
  2. Text Editor: Sublime Text or you preffered one.
Dev Enviroment Setup
  1. Install Git

  2. Install virtualenv:

  3. Install virtualenvwrapper: `sudo pip install virtualenvwrapper`

    If you are on OS X El Capitan, you might get the following error:

    stalling six-1.4.1:
    Exception:
    Traceback (most recent call last):
    ...
    OSError: [Errno 1] Operation not permitted: '/var/folders/7x/h9sy5ff95bl45569k5km9g5m0000gn/T/pip-aWCOxi-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
    

    If that happens, re-run the command with the flag --ignore-installed six

  4. Source the virtualenvwrapper:

    TE**: To help do this automatically on every new shell you open add the line above to your `.bash_profile` or  `.bashrc`
    
  5. Create a new env for the project:

  6. Get the code:

  7. Go inside the ocdaction directory:

  8. Activate the virtual enviroment:

    s will now ensure anything you install is within this enviroment.
    
  9. You will need to have Postgres installed and up and running. You can onstall it via:

    • Homebrew `brew install postgresql`
    • OR Download the Postgress App
  10. Make sure the Postgres Server is up and running:

    • If using the App simply start the server from there
    • If using command line: brew services start postgresql
  11. Install the requirements:

    s will get all the dependencies.
    
  12. Create a database locally for the project to run:

  13. Go inside frontend folder:

  14. Install all the dependencies:

    s will get all the dependencies
    
Running the project locally
  1. Go inside the django app directory:

  2. Run django server:

  3. The project is now running on http://127.0.0.1:8000/, go to that address in your browser.

  4. You may see a message that you have unapplied migrations, when you see this simply run the command below which will create any tables and fields in the database:

  5. To run tests, run `pytest` from within the app directory. This will run all tests within that directory and subfolders.

Front End changes
  1. Make css and javascript changes in the `frontend` folder
  2. Make any HTML changes in the Django templates located in ocdaction/templates
  3. Use grunt watch in the frontend folder to build, watch and copy all the required files automatically into the Django static folder.
Deploying to Heroku
  1. Create a Heroku Account
  2. Get added to the app in the Heroku Dashboard
  3. Download Heroku toolbelt: wget -qO- https://toolbelt.heroku.com/install.sh | sh
  4. In the terminal heroku login
  5. Within you project directory heroku git:remote -a staging-ocdaction
  6. Once you are ready to deploy, from master branch you can run git push heroku master make sure you have commited all the changes before running this and the git status is clean.
  7. Go to https://staging-ocdaction.herokuapp.com/ to view the live site.

Contributing

Please follow a few guidelines in order to contribute to the project set out in the Contributing file


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.