[Mpuls-commits] r854 - wasko/branches/2.0/waskaweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jan 26 09:48:41 CET 2010
Author: torsten
Date: 2010-01-26 09:48:41 +0100 (Tue, 26 Jan 2010)
New Revision: 854
Modified:
wasko/branches/2.0/waskaweb/lib/evaluation.py
Log:
* waskaweb/lib/evaluation.py: Removed unused imports: AgencyBundle from
model.agency; parseSearchOptions from controllers.case_overview;
AVGKIND2TEXT, SUMKIND2TEXT from model.logbook; AgencySearch from
lib.search. Cleanup of imports
Modified: wasko/branches/2.0/waskaweb/lib/evaluation.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/evaluation.py 2010-01-26 08:39:45 UTC (rev 853)
+++ wasko/branches/2.0/waskaweb/lib/evaluation.py 2010-01-26 08:48:41 UTC (rev 854)
@@ -23,21 +23,18 @@
# the Bundesministerium fuer Familie, Senioren, Frauen und Jugend and
# European Social Fund resources.
-import psycopg2
-import codecs
-import waskaweb.lib.helpers as h
-from waskaweb.lib.base import _, c, session
import sys
import traceback
-from datetime import datetime
-
+import codecs
import cStringIO as StringIO
-from waskaweb.model.logbook import KIND2TEXT, AVGKIND2TEXT, SUMKIND2TEXT
+import psycopg2
+
+from waskaweb.lib.helpers import formatNumber, timedelta_in_minutes
+from waskaweb.lib.base import _, c, session
from waskaweb.lib.db import db
-from waskaweb.lib.search import AgencySearch
from waskaweb.lib.sql_helper import where_ids
-from waskaweb.controllers.case_overview import parseSearchOptions
+from waskaweb.model.logbook import KIND2TEXT, SUMKIND2TEXT
class Evaluation:
def __init__(self, compressed_ids=None):
@@ -180,7 +177,7 @@
count += 1
unique_cases.append(row[3])
- duration = int(h.timedelta_in_minutes(row[0]))
+ duration = int(timedelta_in_minutes(row[0]))
num = row[1]
type = str(row[2])
@@ -211,17 +208,17 @@
divisor = 1
result['avg_cat1'][0] = count
- result['avg_cat1'][1] = h.formatNumber(float(result['sum_cat1'][1] / divisor))
+ result['avg_cat1'][1] = formatNumber(float(result['sum_cat1'][1] / divisor))
result['avg_cat2'][0] = count
- result['avg_cat2'][1] = h.formatNumber(float(result['sum_cat2'][1] / divisor))
+ result['avg_cat2'][1] = formatNumber(float(result['sum_cat2'][1] / divisor))
result['avg_cat3'][0] = count
- result['avg_cat3'][1] = h.formatNumber(float(result['sum_cat3'][1] / divisor))
+ result['avg_cat3'][1] = formatNumber(float(result['sum_cat3'][1] / divisor))
result['avg_cat4'][0] = count
- result['avg_cat4'][1] = h.formatNumber(float(result['sum_cat4'][1] / divisor))
+ result['avg_cat4'][1] = formatNumber(float(result['sum_cat4'][1] / divisor))
result['avg_cat5'][0] = count
- result['avg_cat5'][1] = h.formatNumber(float(result['sum_cat5'][1] / divisor))
+ result['avg_cat5'][1] = formatNumber(float(result['sum_cat5'][1] / divisor))
result['avg_all'][0] = count
- result['avg_all'][1] = h.formatNumber(float(result['sum_all'][1] / divisor))
+ result['avg_all'][1] = formatNumber(float(result['sum_all'][1] / divisor))
return result
except StandardError, e:
More information about the Mpuls-commits
mailing list