https://github.com/jbkahn/space-apps-2014
Spacet Challenge for NASA Space Apps 2014
https://github.com/jbkahn/space-apps-2014
Last synced: about 1 year ago
JSON representation
Spacet Challenge for NASA Space Apps 2014
- Host: GitHub
- URL: https://github.com/jbkahn/space-apps-2014
- Owner: JBKahn
- Created: 2014-04-11T22:58:50.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-04-14T04:23:46.000Z (about 12 years ago)
- Last Synced: 2025-03-02T00:28:27.908Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 31.8 MB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
NASA Space apps 2014: SpaceT Challenge, Team Insight
====================================================
[Spaceapps Challenge Project Insight](https://2014.spaceappschallenge.org/project/insight-/)
InSight is a voice and motion activated data visualization platform and companion application for heads up display. Aggregating information from biometric sensors, location, and external data such as oxygen and radiation, InSight enhances the experience of being in outer space by providing contextual information about your surroundings via augmented reality.
Setup
=====
Install your front-end libraries with the Node Package Manager and Grunt/Bower:
$ npm install -g bower
$ bower install
$ npm install -g grunt-cli
$ grunt
Make python virtual environment
0. Ensure you have both python and pip installed.
1. `pip install virtualenv`.
2. `pip install virtualenvwrapper` and [setup required variables](http://virtualenvwrapper.readthedocs.org/en/latest/install.html).
3. go to the project directory.
4. `mkvirtualenv spacet -a (project-directory) -r ./requirements.txt`. (You can use `pip install -r ./requirements.txt` to install the project requirements at any time).
5. Use `workon spacet` at any time to get back into the virtual environment.
Start the app
$ python manage.py runserver 8000
Navigate to the website
It's located at `http://localhost:8000/`
Requirements
============
* python 2.7
* Ruby and the sass gem
* pip
* NodeJs
Running The Tests
=================
`nosetests --with-progressive`
Pre-Commit Hook
===============
Place this in project_directory/.git/hooks/pre-commit (make sure it's executable)
```bash
#!/bin/bash
export TERM=xterm-256color
flake8=$(which flake8)
if [ -z "$flake8" ]; then
$echo "You must install flake8; sudo pip install flake8"
exit 1
fi
FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -e '\.py$')
# Check for print statements
if [ -n "$FILES" ]; then
printf "\e[32mChecking files for print violations\n\033[0m"
grep -n -E -v "^#" $FILES | grep -E "[^\"']\bprint[\"' ]+"
fi
# Check for ipdb and pdb imports/usage
if [ -n "$FILES" ]; then
printf "\e[32mChecking files for pdb violations\n\033[0m"
grep --exclude=\*pre-commit -n -E "import.*i?pdb|i?pdb\." $PYTHON_FILES
fi
# Auto-check for pep8
if [ -n "$FILES" ]; then
printf "\e[32mChecking Python files for flake8 violations\n\033[0m"
flake8 --ignore=E501 $FILES
RETVAL=$?
fi
# Run nosetests
nosetests --with-progressive
PASSED=$?
exit $RETVAL && $PASSED
```
Post-Checkout Hook
==================
Place this in project_directory/.git/hooks/post-checkout (make sure it's executable)
```bash
#!/bin/bash
export TERM=xterm-256color
# Start from the repository root
cd ./$(git rev-parse --show-cdup)
printf "\e[32mRemoving .pyc and empty directories...\n\033[0m"
find . -name "*.pyc" -delete
find . -type d -empty -delete
```