Commit 91751451f8cfed223f355e6703dcd066e8f7f01b

Authored by Antoine Goutenoir
1 parent 4c862b54
Exists in master

Shift the API to unify the plots.

.travis.yml 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +language: python
  2 +python:
  3 + - "2.7"
  4 + - "3.3"
  5 + - "3.4"
  6 + - "3.5"
  7 + - "pypy"
  8 +# command to install dependencies
  9 +install: "pip install -r requirements.txt"
  10 +# command to run tests
  11 +script: make test
... ...
VERSION
1   -0.1.0-1-g9621b8a
  1 +0.2.0-1-gcae7d69
... ...
flaskr/controllers/main_controller.py
... ... @@ -91,7 +91,7 @@ def estimate():
91 91 return redirect(url_for(
92 92 endpoint=".consult_estimation",
93 93 public_id=estimation.public_id,
94   - format='html'
  94 + extension='html'
95 95 ))
96 96 # return render_template("estimate-debrief.html", form=form)
97 97  
... ... @@ -320,9 +320,10 @@ def compute(): # process the queue of estimation requests
320 320 cities_mean = [cities_mean_dict[k] for k in cities_mean_dict.keys()]
321 321 cities_mean = sorted(cities_mean, key=lambda c: c['footprint'])
322 322  
323   - _results['mean_footprint'] = {
  323 + _results['mean_footprint'] = { # DEPRECATED?
324 324 'cities': cities_mean
325 325 }
  326 + _results['cities'] = cities_mean
326 327  
327 328 _results['total'] = total # DEPRECATED
328 329 _results['footprint'] = total
... ... @@ -422,7 +423,8 @@ def consult_estimation(public_id, extension):
422 423 else:
423 424 return render_template(
424 425 "estimation.html",
425   - estimation=estimation
  426 + estimation=estimation,
  427 + estimation_output=estimation.get_output_dict(),
426 428 )
427 429  
428 430 elif extension in ['yaml', 'yml']:
... ...