diff --git a/.travis/travis_install.sh b/.travis/travis_install.sh index 197b501..ffb8538 100755 --- a/.travis/travis_install.sh +++ b/.travis/travis_install.sh @@ -11,6 +11,7 @@ section_end "install.base.requirements" section "install.cesium.requirements" +pip install -e git://github.com/cesium-ml/cesium.git#egg=cesium pip install --retries 3 -r requirements.txt pip list section_end "install.cesium.requirements" diff --git a/README.md b/README.md index f46ea7b..7ba22d8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/cesium-ml/cesium_web.svg?branch=master)](https://travis-ci.org/cesium-ml/cesium_web) -## About +## About Web frontend for the [`cesium` library](https://github.com/cesium-ml/cesium). Within the browser, users can upload time series data data, extract features, fit a model, and generate predictions for new data. @@ -25,36 +25,26 @@ The easiest way to try the web app is to run it through Docker: ``` ## Running the app locally -1. Install the following dependencies: - -- supervisor -- nginx -- postgresql (including libpq-dev on Debian) -- npm - -### MacOS -Using [Homebrew](http://brew.sh/): - -`brew install supervisor nginx postregsql node` - -### Linux -On Debian or Ubuntu: -``` -sudo apt-get install nginx supervisor postgresql libpq-dev npm nodejs-legacy -``` - -2. Install Python dependencies: `pip install -r requirements.txt` -3. On Linux, it may be necessary to configure your database permissions: at the end of your `pg_hba.conf` (typically in `/etc/postgresql/9.5/main`), add the following lines: - -``` -local all postgres peer -local cesium cesium trust -local cesium_test cesium trust -``` -and restart `postgresl` (`sudo service postgresql restart`). - -4. Initialize the database with `make db_init` -5. Run `make` to start the server and install additional dependencies, and navigate to `localhost:5000`. +1. Install the following dependencies: Supervisor, NGINX, PostgreSQL, Node.JS. + 1. On macOS: + 1. Using [Homebrew](http://brew.sh/): `brew install supervisor nginx postgresql node` + 2. Start the postgresql server: + - to start automatically at login: `brew services start postgresql` + - to start manually: `pg_ctl -D /usr/local/var/postgres start` + 2. On Linux: + 1. Using `apt-get`: `sudo apt-get install nginx supervisor postgresql libpq-dev npm nodejs-legacy` + 2. It may be necessary to configure your database permissions: at the end of your `pg_hba.conf` (typically in `/etc/postgresql/9.5/main`), add the following lines: + + ``` + local all postgres peer + local cesium cesium trust + local cesium_test cesium trust + ``` + and restart `postgresl` (`sudo service postgresql restart`). + +2. Install Python and JavaScript dependencies with `make_dependencies` +3. Initialize the database with `make db_init` +4. Run `make` to start the server and navigate to `localhost:5000` ## Dev Tips To execute the test suite: @@ -72,6 +62,8 @@ Debugging: - Run `make debug` to start webserver in debug mode - Run `make attach` to attach to output of webserver, e.g. for use with `pdb.set_trace()` +NOTE: Requires Python 3.5 or later. + ## Standards To ensure that JavaScript & JSX code conforms with industry style recommendations, after adding or modifying any .js or .jsx files, run ESLint with diff --git a/requirements.txt b/requirements.txt index a762365..69a04ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ --e git://github.com/cesium-ml/cesium.git#egg=cesium +cesium>=0.8.0 netCDF4 peewee>=2.8.3 psycopg2 diff --git a/tools/install_deps.py b/tools/install_deps.py index 5e27f32..15d9386 100755 --- a/tools/install_deps.py +++ b/tools/install_deps.py @@ -32,7 +32,6 @@ except ImportError: print(("Development dependency '{}' unfulfilled. " "Installing requirements.").format(dep)) - subprocess.call("pip install -r {}".format(req_file).split()) - sys.exit(0) - + p = subprocess.call("pip install -r {}".format(req_file).split()) + sys.exit(p) print('Dependencies from {} verified.'.format(req_file))