[yoda-svn] yoda: 5 new changesets

YODA Mercurial yoda at projects.hepforge.org
Wed Nov 22 15:00:02 GMT 2017


details:   https://yoda.hepforge.org/hg/yoda/rev/bd4810ca058f
branches:  
changeset: 1432:bd4810ca058f
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Wed Nov 22 14:20:13 2017 +0000
description:
More Py3 fixes

details:   https://yoda.hepforge.org/hg/yoda/rev/adc7ce2a4701
branches:  
changeset: 1433:adc7ce2a4701
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Wed Nov 22 14:46:12 2017 +0000
description:
Fix yodaplot for headless use.

details:   https://yoda.hepforge.org/hg/yoda/rev/5c3130ad1f09
branches:  
changeset: 1434:5c3130ad1f09
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Wed Nov 22 14:46:59 2017 +0000
description:
Distcheck fix

details:   https://yoda.hepforge.org/hg/yoda/rev/22f7eeaccde3
branches:  
changeset: 1435:22f7eeaccde3
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Wed Nov 22 14:48:00 2017 +0000
description:
Modify IO.pyx once more. Should finally cover Py2 and Py3 now.

details:   https://yoda.hepforge.org/hg/yoda/rev/db05f2dd7d6c
branches:  
changeset: 1436:db05f2dd7d6c
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Wed Nov 22 14:54:20 2017 +0000
description:
Distcheck fix

diffs (truncated from 23969 to 50 lines):

--- a/bin/yodacmp	Tue Nov 21 14:10:10 2017 +0000
+++ b/bin/yodacmp	Wed Nov 22 14:54:20 2017 +0000
@@ -122,7 +122,8 @@
     ## Apply path pattern match discarding from dict
     opts.PATHPATTERNS = [re.compile(r) for r in opts.PATHPATTERNS] if opts.PATHPATTERNS else []
     opts.PATHUNPATTERNS = [re.compile(r) for r in opts.PATHUNPATTERNS] if opts.PATHUNPATTERNS else []
-    for path in aolists.keys():
+    keylist = list(aolists.keys())
+    for path in keylist: # can't modify for-loop target in loop
         useThis = True
         if opts.PATHPATTERNS:
             useThis = False
@@ -266,8 +267,8 @@
     # if opts.STYLE == "bw":
     #     LINECOLORS = [0.9, 0.5, 0.3]
 
-    c = index % len(LINECOLORS)
-    s = index / len(LINECOLORS)
+    c = index %  len(LINECOLORS)
+    s = index // len(LINECOLORS)
 
     if not ao.hasAnnotation("LineStyle"):
         ao.setAnnotation("LineStyle", "%s" % LINESTYLES[s])
--- a/bin/yodadiff	Tue Nov 21 14:10:10 2017 +0000
+++ b/bin/yodadiff	Wed Nov 22 14:54:20 2017 +0000
@@ -19,16 +19,20 @@
 
 if len(filenames) != 2:
     print("ERROR! Please supply *two* YODA files for comparison")
-    sys.exit(1)
+    sys.exit(7)
 
 ## Get data objects
 aodict1 = yoda.read(filenames[0])
 aodict2 = yoda.read(filenames[1])
 
+CLEAN = True
+
 ## Check number of data objects in each file
 if len(aodict1) != len(aodict2):
+    CLEAN = False
     print("Different numbers of data objects in %s and %s" % tuple(filenames[:2]))
 elif list(aodict1.keys()) != list(aodict2.keys()):
+    CLEAN = False
     print("Different data object paths in %s and %s" % tuple(filenames[:2]))
 
 ## A slightly tolerant numerical comparison function
@@ -65,16 +69,19 @@
     ## Get the object in file #1
     ao1 = aodict1.get(path, None)


More information about the yoda-svn mailing list