/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes
DybDbi::test_rationalize::CfDict Class Reference

List of all members.

Public Member Functions

def __init__
def __call__
def __repr__
def __str__

Public Attributes

 srcd
 tgtd
 seqno
 nk

Detailed Description

Definition at line 8 of file test_rationalize.py.


Constructor & Destructor Documentation

def DybDbi::test_rationalize::CfDict::__init__ (   self,
  seqno,
  srcd,
  tgtd 
)

Definition at line 9 of file test_rationalize.py.

00010                                             :
00011         list.__init__(self) 
00012 
00013         sk = set(srcd.keys())
00014         tk = set(tgtd.keys())
00015         ik = sk.intersection(tk)
00016         nk = tuple([seqno]+map(len,(sk,tk,ik))) 
00017 
00018         assert len(sk) == len(tk) == len(ik), ("expect fully overlapped", nk )
00019 
00020         self.srcd = srcd
00021         self.tgtd = tgtd
00022         self.seqno = seqno 
00023         self.nk = nk
00024         self(ik)


Member Function Documentation

def DybDbi::test_rationalize::CfDict::__call__ (   self,
  ks 
)
compare target rows to source rows, excluding the 'SensorId' which is used for the association

#. despite the name "tr.sensorid" name is actually a feeChannelId 

Definition at line 25 of file test_rationalize.py.

00026                           :
00027         """ 
00028         compare target rows to source rows, excluding the 'SensorId' which is used for the association
00029 
00030         #. despite the name "tr.sensorid" name is actually a feeChannelId 
00031         """
00032         for i,k in enumerate(ks):
00033             sr = self.srcd[k]         
00034             tr = self.tgtd[k]         
00035             td = tr.asdict
00036             sd = sr.asdict
00037             del td['SensorId']
00038             del sd['SensorId']
00039             if td != sd:
00040                 self.append(" i %s feeChannelId %s sensorId %s mismatch\nsrc:%s\ntgt:%s" % ( i,tr.sensorid.asString(),sr.sensorid.asString(), sd, td ))

def DybDbi::test_rationalize::CfDict::__repr__ (   self)

Definition at line 41 of file test_rationalize.py.

00042                       :
00043         return "%s seqno %s keys %s payload mismatches %s " % ( self.__class__.__name__, self.seqno, repr(self.nk), len(self) ) 

def DybDbi::test_rationalize::CfDict::__str__ (   self)

Definition at line 44 of file test_rationalize.py.

00045                      :
00046         return "\n".join( [repr(self)] + self[0:5] + ["..."] + self[-5:] ) 
00047 
00048 


Member Data Documentation

Definition at line 9 of file test_rationalize.py.

Definition at line 9 of file test_rationalize.py.

Definition at line 9 of file test_rationalize.py.

Definition at line 9 of file test_rationalize.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:57:24 for DybDbi by doxygen 1.7.4