[yoda-svn] yoda: yodadiff output format tweaks

YODA Mercurial yoda at projects.hepforge.org
Wed Mar 9 10:45:02 GMT 2016


details:   https://yoda.hepforge.org/hg/yoda/rev/c322bdbb2a76
branches:  release-1-5
changeset: 1223:c322bdbb2a76
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Mar 09 10:34:56 2016 +0000
description:
yodadiff output format tweaks

diffs (32 lines):

--- a/bin/yodadiff	Tue Mar 08 22:46:05 2016 +0000
+++ b/bin/yodadiff	Wed Mar 09 10:34:56 2016 +0000
@@ -74,6 +74,7 @@
         print "Data objects with path '%s' have different types (%s and %s) in %s and %s" % \
               (path, str(type(ao1)), str(type(ao2)), filenames[0], filenames[1])
         continue
+
     ## Convert to scatter representations
     try:
         s1 = ao1.mkScatter()
@@ -83,17 +84,18 @@
 
     ## Check for compatible dimensionalities (should already be ok, but just making sure)
     if s1.dim != s2.dim:
-        print "Warning: data objects with path '%s' have different scatter dimensions (%d and %d) in %s and %s" % \
+        print "Data objects with path '%s' have different scatter dimensions (%d and %d) in %s and %s" % \
               (path, s1.dim, s2.dim, filenames[0], filenames[1])
         continue
+
     ## Compare the numbers of points/bins
     if s1.numPoints != s2.numPoints:
-        print "Warning: data objects with path '%s' have different numbers of points (%d and %d) in %s and %s" % \
+        print "Data objects with path '%s' have different numbers of points (%d and %d) in %s and %s" % \
               (path, s1.numPoints, s2.numPoints, filenames[0], filenames[1])
         continue
 
     ## Compare the numeric values of each point
-    premsg = "\nData points differ for data objects with path '%s' in %s and %s:\n" % (path, filenames[0], filenames[1])
+    premsg = "Data points differ for data objects with path '%s' in %s and %s:\n" % (path, filenames[0], filenames[1])
     msgs = []
     for i, (p1, p2) in enumerate(zip(s1.points, s2.points)):
         # TODO: do this more nicely when point.val(int) and point.err(int) are mapped into Python


More information about the yoda-svn mailing list