www.anyway.co.il - Crowd-sourced road hazard reporting website.
Feel free to contribute to the project. It is currently hosted on Heroku: http://anyway.herokuapp.com
To report bugs and feature requests, please open an issue on GitHub.
- We try to follow the process of other Hasadna projects, e.g. Open-Knesset
- Fork this repository on GitHub
git clone https://github.com/*you*/anyway- Add the main repository as your upstream remote:
git remote add upstream https://github.com/hasadna/anyway - Get updates whenever you start working:
git pull upstream master - Push to your fork when you've committed your changes and tested them:
git push, and make a pull request from your fork on GitHub
sudo apt-get install pip libpq-dev
sudo easy_install pip setuptools- Install postgresql:
brew install postgresql(after installing brew)
sudo pip install virtualenvwrapper- Add to your
~/.bash_profileor./bashrc:source /usr/local/bin/virtualenvwrapper.sh mkvirtualenv anywaycd anywaypip install -r requirements.txtworkon anyway(each time you start working)
- Install Python 2.7
- Install setuptools & pip(package manager) and update PATH to python and python/scripts directories (e.g.
PATH=%PATH%;C:\Python27\Scripts) - Install VC2008 Express (alt: mingw)
- Install GitHub for windows and get the code
cdto the anyway directorypip install -r requirements.txt- If any package fails to install, download it from here and install it using
pip install <package>. If this fails, you might have to download thewin32package, even if you are on a 64-bit platform.
- Define connection string:
- bash:
export DATABASE_URL='sqlite:///local.db' - windows shell:
set DATABASE_URL="sqlite:///local.db"
- First time, create tables:
python models.py - Extract the example accidents file into
/static/data/lms(or ask permission and get the complete accidents file). - Populate the data (markers etc.):
python process.py - Run app:
python main.py(or:foreman startif you installed the Heroku toolbelt) - Browse to http://127.0.0.1:5000
Most of us use PyCharm for development.
- Create an account on Heroku
- Follow the quickstart instructions. On step #4, read the Python introduction
- Create an app, e.g. anyway-you
- Sign up for free tier ClearDB (MySQL). Note that you'll have to enter your credit card details to be eligible for the free MySQL usage.
- Deploy your git repo to heroku
- Load the database with our data:
- Tweak your Heroku app configurations, by removing
?reconnect=truefrom your CLEARDB config (if you have several apps, specify the relevant one with the option--app <anyway-mydev>for all following heroku commands): heroku config:set DATABASE_URL=$(heroku config:get DATABASE_URL | cut -d '?' -f 1)- Create tables:
heroku run ./models.py - Populate data:
heroku run ./process.py
- Tweak your Heroku app configurations, by removing
- Browse to http://anyway-*you*.herokuapp.com