def test_get_manyvariables(): """py.test for get_manyvariables""" data = ( ("./eplussql_test/eplussql.sql", [6, 7], [None, None]), # fname, ReportVariableDataDictionaryIndices, funcs ) for fname, ReportVariableDataDictionaryIndices, funcs in data: cursor = eplussql.getcursor(fname) thevars = [] for ind, func in zip(ReportVariableDataDictionaryIndices, funcs): thevars.append(eplussql.get_variables(cursor, ind, func)) matrix = mycsv.transpose2d(thevars) result = eplussql.get_manyvariables(cursor, ReportVariableDataDictionaryIndices, funcs) assert result == matrix
def comfort_fromsql(cursor, dbtId, tzoneId): """docstring for comfort_fromsql""" inmat = eplussql.get_manyvariables(cursor, [dbtId, tzoneId]) outmat = comfort.comfort_matrix2(inmat, comfort.comfort_lower) return outmat
def comfort_fromsql(cursor, etrows, tzoneId, windinc, comforttype): """docstring for comfort_fromsql""" roomtemps = eplussql.get_manyvariables(cursor, [tzoneId]) inmat = [et + rm for et, rm in zip(etrows, roomtemps)] outmat = comfort.comfort_matrix(inmat, comfort.comfortET, limit=comforttype, windinc=windinc) return outmat
def comfort_fromsql(cursor, dbtId, tzoneId, windinc, comforttype): """docstring for comfort_fromsql""" inmat = eplussql.get_manyvariables(cursor, [dbtId, tzoneId]) outmat = comfort.comfort_matrix(inmat, comfort.comfort, limit=comforttype, windinc=windinc) return outmat