def idfreader1(fname, iddfile, conv=True, commdct=None, block=None): """read idf file and reutrn bunches""" versiontuple = iddversiontuple(iddfile) # import pdbdb; pdb.set_trace() block, data, commdct = readidf.readdatacommdct1(fname, iddfile=iddfile, commdct=commdct, block=block) if conv: convertallfields(data, commdct) # fill gaps in idd ddtt, dtls = data.dt, data.dtls if versiontuple < (8, ): skiplist = ["TABLE:MULTIVARIABLELOOKUP"] else: skiplist = None nofirstfields = iddgaps.missingkeys_standard(commdct, dtls, skiplist=skiplist) iddgaps.missingkeys_nonstandard(commdct, dtls, nofirstfields) bunchdt = makebunches(data, commdct) # TODO : add functions here. # - addfunctions(dtls, bunchdt) # - return bunchdt, block, data, commdct
def idfreader1(fname, iddfile, conv=True, commdct=None, block=None): """read idf file and reutrn bunches""" versiontuple = iddversiontuple(iddfile) # import pdbdb; pdb.set_trace() block, data, commdct = readidf.readdatacommdct1( fname, iddfile=iddfile, commdct=commdct, block=block) if conv: convertallfields(data, commdct) # fill gaps in idd ddtt, dtls = data.dt, data.dtls if versiontuple < (8, ): skiplist = ["TABLE:MULTIVARIABLELOOKUP"] else: skiplist = None nofirstfields = iddgaps.missingkeys_standard( commdct, dtls, skiplist=skiplist) iddgaps.missingkeys_nonstandard(commdct, dtls, nofirstfields) bunchdt = makebunches(data, commdct) # TODO : add functions here. # - addfunctions(dtls, bunchdt) # - return bunchdt, block, data, commdct
def idfreader(fname, iddfile, conv=True): """read idf file and return bunches""" data, commdct, idd_index = readidf.readdatacommdct(fname, iddfile=iddfile) if conv: convertallfields(data, commdct) # fill gaps in idd ddtt, dtls = data.dt, data.dtls # skiplist = ["TABLE:MULTIVARIABLELOOKUP"] nofirstfields = iddgaps.missingkeys_standard( commdct, dtls, skiplist=["TABLE:MULTIVARIABLELOOKUP"]) iddgaps.missingkeys_nonstandard(None, commdct, dtls, nofirstfields) bunchdt = makebunches(data, commdct) return bunchdt, data, commdct, idd_index
def idfreader1( fname, # type: str iddfile, # type: str theidf, # type: IDF conv=True, # type: Optional[bool] commdct=None, # type: List[List[Dict[str, Any]]] block=None, # type: Optional[List] ): # type: (...) -> Tuple[Dict[str, Any], Optional[List[Any]], Any, List[List[Dict[str, Any]]], Any, Any] """Read idf file and return bunches. :param fname: Name of the IDF file to read. :param iddfile: Name of the IDD file to use to interpret the IDF. :param conv: If True, convert strings to floats and integers where marked in the IDD. Defaults to None. :param commdct: Descriptions of IDF fields from the IDD. Defaults to None. :param block: EnergyPlus field ID names of the IDF from the IDD. Defaults to None. :returns: bunchdt Dict of lists of idf_MSequence objects in the IDF. :returns: block EnergyPlus field ID names of the IDF from the IDD. :returns data: Eplusdata object containing representions of IDF objects. :returns: commdct List of names of IDF objects. :returns: idd_index A pair of dicts used for fast lookups of names of groups of objects. :returns: versiontuple Version of EnergyPlus from the IDD. """ versiontuple = iddversiontuple(iddfile) block, data, commdct, idd_index = readdatacommdct1(fname, iddfile=iddfile, commdct=commdct, block=block) if conv: convertallfields(data, commdct) # fill gaps in idd if versiontuple < (8, ): skiplist = ["TABLE:MULTIVARIABLELOOKUP"] # type: Optional[List[str]] else: skiplist = None nofirstfields = iddgaps.missingkeys_standard(commdct, data.dtls, skiplist=skiplist) iddgaps.missingkeys_nonstandard(block, commdct, data.dtls, nofirstfields) bunchdt = makebunches(data, commdct, theidf) return bunchdt, block, data, commdct, idd_index, versiontuple
def idfreader1(fname, iddfile, theidf, conv=True, commdct=None, block=None): """read idf file and return bunches""" versiontuple = iddversiontuple(iddfile) block, data, commdct, idd_index = readidf.readdatacommdct1(fname, iddfile=iddfile, commdct=commdct, block=block) if conv: convertallfields(data, commdct) # fill gaps in idd ddtt, dtls = data.dt, data.dtls if versiontuple < (8, ): skiplist = ["TABLE:MULTIVARIABLELOOKUP"] else: skiplist = None nofirstfields = iddgaps.missingkeys_standard(commdct, dtls, skiplist=skiplist) iddgaps.missingkeys_nonstandard(commdct, dtls, nofirstfields) # bunchdt = makebunches(data, commdct) bunchdt = makebunches(data, commdct, theidf) return bunchdt, block, data, commdct, idd_index