New solar-app repo using Python3/Flask
virtualenv is a tool to create isolated Python environments. For development in this project, the use of a new virtualenv is highly recommended.
$ sudo pip install virtualenvThe following instructions are targetted for Unix's bash shell. Be sure to create the virtual environment outside the repository.
$ virtualenv -p python3 venv # create a python virtual environment named 'venv' using python3
$ source venv/bin/activate # activate (or enter) the virtual environment
$ deactivate # deactivate (or leave) the virtual environmentpip-tools is a set of command line tools built around pip that install, manage, update, and synchronize Python packages.
Run the following inside the correct Python environment (typically a virtual environment).
$ pip install --upgrade pip # ensure pip>=6.1
$ pip install pip-toolsDependencies are specified inside requirements.in. To build or update the requirements.txt list, run the following command inside the desired Python environment.
$ pip-compile requirements.inGiven that the dependencies listed in requirements.txt are up-to-date, run the following command to synchronize the current environment's packages with the requirements.
$ pip-syncCreate a database (with the name solar) on a local postgres database.
Configure your settings with secret and database credentials.
$ cp app/settings.py.example app/settings.py
$ vim app/settings.pySet up tables (with SQLAlchemy) and import data (TODO)
$ python manage.py createdb$ python manage.py runserver