From 5ef505837a7af6f5ac4c30f6060f7bc85c7ec244 Mon Sep 17 00:00:00 2001 From: Goutte Date: Mon, 9 Oct 2017 15:50:20 +0200 Subject: [PATCH] Clean up. --- README.md | 9 +++++++++ requirements.txt | 8 ++++++-- web/run.py | 2 +- web/static/js/swapp.js | 2 +- web/static/js/swapp.ls | 4 ++-- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 476ceec..56e8455 100644 --- a/README.md +++ b/README.md @@ -44,3 +44,12 @@ python web/run.py ``` Then, browse [localhost:5000](http://localhost:5000). + +## Troubleshoot + +### Installing scipy + +Getting `MemoryErrors` ? +Try with the `--no-cache-dir` option. + +`pip install scipy --no-cache-dir` diff --git a/requirements.txt b/requirements.txt index b35837f..fdc0dab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,8 @@ ## The following requirements were originally generated with `pip freeze`. +# yum install lapack +# yum install lapack-devel + ## MAIN DEPENDENCIES @@ -22,6 +25,7 @@ pyparsing==2.2.0 packaging==16.8 six==1.10.0 Werkzeug==0.12 +Cython==0.27.1 ## FILE FORMATS @@ -29,10 +33,10 @@ Werkzeug==0.12 PyYAML==3.12 netCDF4==1.2.7 h5py==2.3.1 -# We only use pycdf from spacepy. -spacepy==0.1.* # spacepy does not like recent numpy versions (1.7 looks ok) numpy==1.7.* +# We only use pycdf from spacepy. +spacepy==0.1.* ## WEIRD STUFF diff --git a/web/run.py b/web/run.py index 4d00417..d47e9a4 100755 --- a/web/run.py +++ b/web/run.py @@ -401,7 +401,7 @@ def retrieve_amda_netcdf(orbiter, what, started_at, stopped_at): log.debug("Unzipping '%s'..." % local_gzip_file) success = True try: - with gzip.open(local_gzip_file, 'rb') as f: + with gzip.open(local_gzip_file) as f: file_content = f.read() with open(local_netc_file, 'w+b') as g: g.write(file_content) diff --git a/web/static/js/swapp.js b/web/static/js/swapp.js index 4de8c0d..95b6013 100644 --- a/web/static/js/swapp.js +++ b/web/static/js/swapp.js @@ -408,7 +408,7 @@ this.setStartAndStop(started_at, stopped_at); formatted_started_at = started_at.format(); formatted_stopped_at = stopped_at.format(); - if (!this.is_invalid && (this.started_at <= started_at && started_at <= this.stopped_at) && (this.started_at <= stopped_at && stopped_at <= this.stopped_at)) { + if ((this.started_at <= started_at && started_at <= this.stopped_at) && (this.started_at <= stopped_at && stopped_at <= this.stopped_at)) { console.info("Resizing the temporal domain from " + formatted_started_at + " to " + formatted_stopped_at + " without fetching new data…"); this.time_series.forEach(function(ts){ if (!ts.visible) { diff --git a/web/static/js/swapp.ls b/web/static/js/swapp.ls index 9d96e57..b9b3ed2 100644 --- a/web/static/js/swapp.ls +++ b/web/static/js/swapp.ls @@ -312,8 +312,8 @@ https://gitlab.irap.omp.eu/CDPP/SPACEWEATHERONLINE formatted_started_at = started_at.format() formatted_stopped_at = stopped_at.format() - if (not @is_invalid) and - (@started_at <= started_at <= @stopped_at) and +# if (not @is_invalid) and + if (@started_at <= started_at <= @stopped_at) and (@started_at <= stopped_at <= @stopped_at) then console.info "Resizing the temporal domain from #{formatted_started_at} to #{formatted_stopped_at} without fetching new data…" # We first resize the hidden time series and only afterwards we resize -- libgit2 0.21.2