Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package YODA for openSUSE:Factory checked in 
at 2022-06-03 14:17:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/YODA (Old)
 and      /work/SRC/openSUSE:Factory/.YODA.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "YODA"

Fri Jun  3 14:17:02 2022 rev:22 rq:980606 version:1.9.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/YODA/YODA.changes        2021-12-12 
00:58:10.326607555 +0100
+++ /work/SRC/openSUSE:Factory/.YODA.new.1548/YODA.changes      2022-06-03 
14:17:14.829361769 +0200
@@ -1,0 +2,11 @@
+Sun May 29 12:47:31 UTC 2022 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Update to version 1.9.5:
+  * Add per-AO double-precision writing if the
+    WriterDoublePrecision annotation is set.
+  * Ensure that default variation +- errors are both positive, for
+    all Scatter types.  Original patch by Jon Butterworth.
+  * Protect against NaNs arising from the YAML parser in
+    error-breakdown calcs.
+
+-------------------------------------------------------------------

Old:
----
  YODA-1.9.4.tar.bz2

New:
----
  YODA-1.9.5.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ YODA.spec ++++++
--- /var/tmp/diff_new_pack.lmr71r/_old  2022-06-03 14:17:15.293362372 +0200
+++ /var/tmp/diff_new_pack.lmr71r/_new  2022-06-03 14:17:15.297362377 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package YODA
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,7 @@
 #
 
 
-%define ver 1.9.4
+%define ver 1.9.5
 %define so_name lib%{name}-%(echo %{ver} | tr '.' '_')
 
 Name:           YODA

++++++ YODA-1.9.4.tar.bz2 -> YODA-1.9.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/ChangeLog new/YODA-1.9.5/ChangeLog
--- old/YODA-1.9.4/ChangeLog    2021-12-02 12:53:26.000000000 +0100
+++ new/YODA-1.9.5/ChangeLog    2022-05-13 15:08:10.000000000 +0200
@@ -1,3 +1,21 @@
+2022-05-13  Andy Buckley  <andy.buck...@cern.ch>
+
+       * Release version 1.9.5
+
+2022-05-13  Chris Gutschow  <chri...@cern.ch>
+
+       * Add per-AO double-precision writing if the WriterDoublePrecision
+       annotation is set.
+
+2022-04-20  Andy Buckley  <andy.buck...@cern.ch>
+
+       * Ensure that default variation +- errors are both positive, for
+       all Scatter types.  Original patch by Jon Butterworth.
+
+2022-03-28  Andy Buckley  <andy.buck...@cern.ch>
+
+       * Protect against NaNs arising from the YAML parser in error-breakdown 
calcs.
+
 2021-12-02  Andy Buckley  <andy.buck...@cern.ch>
 
        * Release version 1.9.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/Makefile.in new/YODA-1.9.5/Makefile.in
--- old/YODA-1.9.4/Makefile.in  2021-12-02 12:53:35.000000000 +0100
+++ new/YODA-1.9.5/Makefile.in  2022-05-13 15:08:24.000000000 +0200
@@ -840,8 +840,8 @@
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
-@WITH_DOXYGEN_FALSE@mostlyclean-local:
 @WITH_DOXYGEN_FALSE@uninstall-local:
+@WITH_DOXYGEN_FALSE@mostlyclean-local:
 clean: clean-recursive
 
 clean-am: clean-generic clean-libtool mostlyclean-am
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/bin/yoda-config 
new/YODA-1.9.5/bin/yoda-config
--- old/YODA-1.9.4/bin/yoda-config      2021-12-02 12:53:39.000000000 +0100
+++ new/YODA-1.9.5/bin/yoda-config      2022-05-13 15:08:28.000000000 +0200
@@ -66,6 +66,6 @@
 
 ## Version
 tmp=$( echo "$*" | egrep -- '--\<version\>')
-test -n "$tmp" && echo 1.9.4 && exit 0
+test -n "$tmp" && echo 1.9.5 && exit 0
 
 echo $OUT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/configure new/YODA-1.9.5/configure
--- old/YODA-1.9.4/configure    2021-12-02 12:53:36.000000000 +0100
+++ new/YODA-1.9.5/configure    2022-05-13 15:08:24.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for YODA 1.9.4.
+# Generated by GNU Autoconf 2.69 for YODA 1.9.5.
 #
 # Report bugs to <y...@projects.hepforge.org>.
 #
@@ -650,8 +650,8 @@
 # Identity of this package.
 PACKAGE_NAME='YODA'
 PACKAGE_TARNAME='YODA'
-PACKAGE_VERSION='1.9.4'
-PACKAGE_STRING='YODA 1.9.4'
+PACKAGE_VERSION='1.9.5'
+PACKAGE_STRING='YODA 1.9.5'
 PACKAGE_BUGREPORT='y...@projects.hepforge.org'
 PACKAGE_URL=''
 
@@ -1443,7 +1443,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures YODA 1.9.4 to adapt to many kinds of systems.
+\`configure' configures YODA 1.9.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1514,7 +1514,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of YODA 1.9.4:";;
+     short | recursive ) echo "Configuration of YODA 1.9.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1639,7 +1639,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-YODA configure 1.9.4
+YODA configure 1.9.5
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2129,7 +2129,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by YODA $as_me 1.9.4, which was
+It was created by YODA $as_me 1.9.5, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3003,7 +3003,7 @@
 
 # Define the identity of the package.
  PACKAGE='YODA'
- VERSION='1.9.4'
+ VERSION='1.9.5'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4474,7 +4474,7 @@
   if test x$SWVERS != x; then
     PROD_NAME=$($SWVERS -productName | cut -f 2 -d:)
   fi
-   if test "$PROD_NAME" = "Mac OS X"; then
+   if test "$PROD_NAME" = "Mac OS X" -o "$PROD_NAME" = "macOS"; then
   WITH_OSX_TRUE=
   WITH_OSX_FALSE='#'
 else
@@ -4482,10 +4482,9 @@
   WITH_OSX_FALSE=
 fi
 
-  if test "$PROD_NAME" = "Mac OS X"; then
-    MACOSX_DEPLOYMENT_TARGET=$($SWVERS -productVersion | cut -f 1,2 -d.)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: MACOSX_DEPLOYMENT_TARGET = 
$MACOSX_DEPLOYMENT_TARGET" >&5
-$as_echo "$as_me: MACOSX_DEPLOYMENT_TARGET = $MACOSX_DEPLOYMENT_TARGET" >&6;}
+  if test "$PROD_NAME" = "Mac OS X" -o "$PROD_NAME" = "macOS"; then
+    #MACOSX_DEPLOYMENT_TARGET=$($SWVERS -productVersion | cut -f 1,2 -d.)
+    #AC_MSG_NOTICE([MACOSX_DEPLOYMENT_TARGET = $MACOSX_DEPLOYMENT_TARGET])
     AM_CXXFLAGS="$AM_CXXFLAGS -Dunix"
     LIBPATHVARNAME="DYLD_LIBRARY_PATH"
   fi
@@ -18802,7 +18801,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by YODA $as_me 1.9.4, which was
+This file was extended by YODA $as_me 1.9.5, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -18868,7 +18867,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-YODA config.status 1.9.4
+YODA config.status 1.9.5
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/configure.ac new/YODA-1.9.5/configure.ac
--- old/YODA-1.9.4/configure.ac 2021-12-02 12:50:58.000000000 +0100
+++ new/YODA-1.9.5/configure.ac 2022-05-13 15:05:12.000000000 +0200
@@ -1,7 +1,7 @@
 ## Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT([YODA],[1.9.4],[y...@projects.hepforge.org],[YODA])
+AC_INIT([YODA],[1.9.5],[y...@projects.hepforge.org],[YODA])
 
 ## Check and block installation into the src/build dir
 if test "$prefix" = "$PWD"; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/include/YODA/Config/YodaConfig.h 
new/YODA-1.9.5/include/YODA/Config/YodaConfig.h
--- old/YODA-1.9.4/include/YODA/Config/YodaConfig.h     2021-12-02 
12:53:39.000000000 +0100
+++ new/YODA-1.9.5/include/YODA/Config/YodaConfig.h     2022-05-13 
15:08:28.000000000 +0200
@@ -10,13 +10,13 @@
 #define YODA_NAME "YODA"
 
 /* Define to the full name and version of this package. */
-#define YODA_STRING "YODA 1.9.4"
+#define YODA_STRING "YODA 1.9.5"
 
 /* Define to the one symbol short name of this package. */
 #define YODA_TARNAME "YODA"
 
 /* Define to the version of this package. */
-#define YODA_VERSION "1.9.4"
+#define YODA_VERSION "1.9.5"
 
 
 #include <string>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/include/YODA/Writer.h 
new/YODA-1.9.5/include/YODA/Writer.h
--- old/YODA-1.9.4/include/YODA/Writer.h        2021-11-01 22:36:09.000000000 
+0100
+++ new/YODA-1.9.5/include/YODA/Writer.h        2022-05-13 14:55:09.000000000 
+0200
@@ -154,6 +154,11 @@
       _precision = precision;
     }
 
+    /// Set precision of numerical quantities for current AO in this writer's 
output.
+    void setAOPrecision(bool needsDP = false) {
+      _aoprecision = needsDP? std::numeric_limits<double>::max_digits10 : 
_precision;
+    }
+
     /// Use libz compression?
     void useCompression(bool compress=true) {
       _compress = compress;
@@ -202,7 +207,7 @@
 
 
     /// Output precision
-    int _precision;
+    int _precision, _aoprecision;
 
     /// Compress the output?
     bool _compress;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/m4/osx.m4 new/YODA-1.9.5/m4/osx.m4
--- old/YODA-1.9.4/m4/osx.m4    2021-03-31 18:54:03.000000000 +0200
+++ new/YODA-1.9.5/m4/osx.m4    2022-02-22 14:10:56.000000000 +0100
@@ -6,10 +6,10 @@
   if test x$SWVERS != x; then
     PROD_NAME=$($SWVERS -productName | cut -f 2 -d:)
   fi
-  AM_CONDITIONAL(WITH_OSX, [test "$PROD_NAME" = "Mac OS X"])
-  if test "$PROD_NAME" = "Mac OS X"; then
-    MACOSX_DEPLOYMENT_TARGET=$($SWVERS -productVersion | cut -f 1,2 -d.)
-    AC_MSG_NOTICE([MACOSX_DEPLOYMENT_TARGET = $MACOSX_DEPLOYMENT_TARGET])
+  AM_CONDITIONAL(WITH_OSX, [test "$PROD_NAME" = "Mac OS X" -o "$PROD_NAME" = 
"macOS"])
+  if test "$PROD_NAME" = "Mac OS X" -o "$PROD_NAME" = "macOS"; then
+    #MACOSX_DEPLOYMENT_TARGET=$($SWVERS -productVersion | cut -f 1,2 -d.)
+    #AC_MSG_NOTICE([MACOSX_DEPLOYMENT_TARGET = $MACOSX_DEPLOYMENT_TARGET])
     AM_CXXFLAGS="$AM_CXXFLAGS -Dunix"
     LIBPATHVARNAME="DYLD_LIBRARY_PATH"
   fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/pyext/Makefile.in 
new/YODA-1.9.5/pyext/Makefile.in
--- old/YODA-1.9.4/pyext/Makefile.in    2021-12-02 12:53:35.000000000 +0100
+++ new/YODA-1.9.5/pyext/Makefile.in    2022-05-13 15:08:24.000000000 +0200
@@ -578,9 +578,9 @@
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
-@ENABLE_PYEXT_FALSE@install-exec-local:
-@ENABLE_PYEXT_FALSE@uninstall-local:
 @ENABLE_PYEXT_FALSE@clean-local:
+@ENABLE_PYEXT_FALSE@uninstall-local:
+@ENABLE_PYEXT_FALSE@install-exec-local:
 clean: clean-recursive
 
 clean-am: clean-generic clean-libtool clean-local mostlyclean-am
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/pyext/yoda/plotting.py 
new/YODA-1.9.5/pyext/yoda/plotting.py
--- old/YODA-1.9.4/pyext/yoda/plotting.py       2021-03-31 18:54:03.000000000 
+0200
+++ new/YODA-1.9.5/pyext/yoda/plotting.py       2022-05-13 14:55:09.000000000 
+0200
@@ -168,8 +168,8 @@
     ## log/lin measures
     # TODO: Dynamic default based on data ranges?
     # TODO: take log axes and preference for round numbers into account in 
setting default axis limits
-    xmeasure = "log" if yoda.util.as_bool(plotkeys.get("logX", False)) else 
"linear"
-    ymeasure = "log" if yoda.util.as_bool(plotkeys.get("logY", False)) else 
"linear"
+    xmeasure = "log" if yoda.util.as_bool(plotkeys.get("logx", False)) else 
"linear"
+    ymeasure = "log" if yoda.util.as_bool(plotkeys.get("logy", False)) else 
"linear"
     ratioymeasure = "log" if yoda.util.as_bool(plotkeys.get("ratiology", 
False)) else "linear"
     axmain.set_xscale(xmeasure)
     axmain.set_yscale(ymeasure)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/pyext/yoda/search.py 
new/YODA-1.9.5/pyext/yoda/search.py
--- old/YODA-1.9.4/pyext/yoda/search.py 2021-03-31 18:54:03.000000000 +0200
+++ new/YODA-1.9.5/pyext/yoda/search.py 2022-01-19 15:16:01.000000000 +0100
@@ -34,12 +34,12 @@
         match = False
         if re_patts:
             for rp in re_patts:
-                if (not search and rp.match(ao.path)) or (search and 
rp.search(ao.path)):
+                if (not search and rp.match(ao.path())) or (search and 
rp.search(ao.path())):
                     match = True
                     break
         if match and re_unpatts:
             for rp in re_unpatts:
-                if (not search and rp.match(ao.path)) or (search and 
rp.search(ao.path)):
+                if (not search and rp.match(ao.path())) or (search and 
rp.search(ao.path())):
                     match = False
                     break
         if match:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/src/Point2D.cc 
new/YODA-1.9.5/src/Point2D.cc
--- old/YODA-1.9.4/src/Point2D.cc       2021-03-31 18:54:03.000000000 +0200
+++ new/YODA-1.9.5/src/Point2D.cc       2022-04-20 17:13:33.000000000 +0200
@@ -5,14 +5,16 @@
 
 
   /// Get error map for direction @a i
-  const std::map< std::string, std::pair<double,double>>& Point2D::errMap() 
const {
+  const std::map<std::string, std::pair<double,double>>& Point2D::errMap() 
const {
     getVariationsFromParent();
     return _ey;
   }
 
 
   void Point2D::getVariationsFromParent() const {
-    if (this->getParent()) this->getParent<Scatter2D>()->parseVariations();
+    if (this->getParent()) {
+      this->getParent<Scatter2D>()->parseVariations();
+    }
   }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/src/ReaderFLAT.cc 
new/YODA-1.9.5/src/ReaderFLAT.cc
--- old/YODA-1.9.4/src/ReaderFLAT.cc    2021-08-13 13:38:40.000000000 +0200
+++ new/YODA-1.9.5/src/ReaderFLAT.cc    2022-05-13 14:55:09.000000000 +0200
@@ -33,7 +33,7 @@
                    SCATTER1D, SCATTER2D, SCATTER3D };
 
     /// State of the parser: line number, line, parser context, and pointer(s) 
to the object currently being assembled
-    unsigned int nline = 0;
+    //unsigned int nline = 0;
     string s;
     Context context = NONE;
     //
@@ -44,7 +44,7 @@
 
     // Loop over all lines of the input file
     while (Utils::getline(stream, s)) {
-      nline += 1;
+      //nline += 1;
 
       // Trim the line
       Utils::itrim(s);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/src/Scatter1D.cc 
new/YODA-1.9.5/src/Scatter1D.cc
--- old/YODA-1.9.4/src/Scatter1D.cc     2021-11-05 12:45:19.000000000 +0100
+++ new/YODA-1.9.5/src/Scatter1D.cc     2022-05-13 14:55:09.000000000 +0200
@@ -42,12 +42,24 @@
         YAML::Node variations = errorBreakdown[thisPointIndex];
         for (const auto& variation : variations) {
           const std::string variationName = variation.first.as<std::string>();
-          double eyp = variation.second["up"].as<double>();
-          double eym = variation.second["dn"].as<double>();
-          thispoint.setXErrs(eym,eyp,variationName);
+          // The empty-name variation is the total and should not be signed
+          double eyp = 0, eym = 0;
+          try {
+            eyp = variation.second["up"].as<double>();
+            //if (variationName.empty()) eyp = fabs(eyp);
+          } catch (...) {
+            eyp = std::numeric_limits<double>::quiet_NaN();
+          }
+          try {
+            eym = variation.second["dn"].as<double>();
+            if (variationName.empty()) eym = fabs(eym);
+          } catch (...) {
+            eym = std::numeric_limits<double>::quiet_NaN();
+          }
+          thispoint.setXErrs(eym, eyp, variationName);
         }
       }
-      this-> _variationsParsed =true;
+      this->_variationsParsed =true;
     }
   }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/src/Scatter2D.cc 
new/YODA-1.9.5/src/Scatter2D.cc
--- old/YODA-1.9.4/src/Scatter2D.cc     2021-11-24 13:40:09.000000000 +0100
+++ new/YODA-1.9.5/src/Scatter2D.cc     2022-05-13 14:55:09.000000000 +0200
@@ -9,6 +9,8 @@
 
 namespace YODA {
 
+  using namespace std;
+
 
   /// Make a Scatter2D representation of a Histo1D
   Scatter2D mkScatter(const Histo1D& h, bool usefocus, bool binwidthdiv,
@@ -193,11 +195,14 @@
 
   // Prepare the variations to be written
   void Scatter2D::writeVariationsToAnnotations() {
+    // If there are no variations to write, exit early
+    if (variations().empty()) return;
+    // There *are* some variations to encode...
     YAML::Emitter em;
     em.SetMapFormat(YAML::Flow);
     em << YAML::BeginMap;
     for (size_t thisPointIndex = 0; thisPointIndex < this->numPoints(); 
++thisPointIndex) {
-      Point2D& thisPoint = this->_points[thisPointIndex];
+      const Point2D& thisPoint = this->_points[thisPointIndex];
       em << YAML::Key << thisPointIndex;
       em << YAML::Value << YAML::BeginMap;
       for (const auto& variation : this->variations()) {
@@ -219,8 +224,8 @@
 
   // Retrieve variations from annotation, parse them as YAML, and update the 
points
   void Scatter2D::parseVariations() {
-    if (this->_variationsParsed) { return; }
-    if (!(this->hasAnnotation("ErrorBreakdown"))) { return; }
+    if (this->_variationsParsed) return;
+    if (!(this->hasAnnotation("ErrorBreakdown"))) return;
     YAML::Node errorBreakdown;
     errorBreakdown = YAML::Load(this->annotation("ErrorBreakdown"));
 
@@ -230,12 +235,24 @@
         YAML::Node variations = errorBreakdown[thisPointIndex];
         for (const auto& variation : variations) {
           const std::string variationName = variation.first.as<std::string>();
-          double eyp = variation.second["up"].as<double>();
-          double eym = variation.second["dn"].as<double>();
-          thispoint.setYErrs(eym,eyp,variationName);
+          // The empty-name variation is the total and should not be signed
+          double eyp = 0, eym = 0;
+          try {
+            eyp = variation.second["up"].as<double>();
+            //if (variationName.empty()) eyp = fabs(eyp);
+          } catch (...) {
+            eyp = std::numeric_limits<double>::quiet_NaN();
+          }
+          try {
+            eym = variation.second["dn"].as<double>();
+            if (variationName.empty()) eym = fabs(eym);
+          } catch (...) {
+            eym = std::numeric_limits<double>::quiet_NaN();
+          }
+          thispoint.setYErrs(eym, eyp, variationName);
         }
       }
-      this-> _variationsParsed =true;
+      this->_variationsParsed =true;
     }
   }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/src/Scatter3D.cc 
new/YODA-1.9.5/src/Scatter3D.cc
--- old/YODA-1.9.4/src/Scatter3D.cc     2021-11-24 13:40:09.000000000 +0100
+++ new/YODA-1.9.5/src/Scatter3D.cc     2022-05-13 14:55:09.000000000 +0200
@@ -168,9 +168,21 @@
         YAML::Node variations = errorBreakdown[thisPointIndex];
         for (const auto& variation : variations) {
           const std::string variationName = variation.first.as<std::string>();
-          double eyp = variation.second["up"].as<double>();
-          double eym = variation.second["dn"].as<double>();
-          thispoint.setZErrs(eym,eyp,variationName);
+          // The empty-name variation is the total and should not be signed
+          double eyp = 0, eym = 0;
+          try {
+            eyp = variation.second["up"].as<double>();
+            //if (variationName.empty()) eyp = fabs(eyp);
+          } catch (...) {
+            eyp = std::numeric_limits<double>::quiet_NaN();
+          }
+          try {
+            eym = variation.second["dn"].as<double>();
+            if (variationName.empty()) eym = fabs(eym);
+          } catch (...) {
+            eym = std::numeric_limits<double>::quiet_NaN();
+          }
+          thispoint.setZErrs(eym, eyp, variationName);
         }
       }
       this->_variationsParsed = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/src/Writer.cc new/YODA-1.9.5/src/Writer.cc
--- old/YODA-1.9.4/src/Writer.cc        2021-08-13 13:38:40.000000000 +0200
+++ new/YODA-1.9.5/src/Writer.cc        2022-05-13 14:55:09.000000000 +0200
@@ -80,6 +80,7 @@
     writeHead(*os);
     bool first = true;
     for (const AnalysisObject* aoptr : aos) {
+      setAOPrecision( aoptr->annotation("WriterDoublePrecision", 0) );
       try {
         if (!first) *os << "\n"; //< blank line between items
         writeBody(*os, aoptr);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/src/WriterFLAT.cc 
new/YODA-1.9.5/src/WriterFLAT.cc
--- old/YODA-1.9.4/src/WriterFLAT.cc    2021-03-31 18:54:03.000000000 +0200
+++ new/YODA-1.9.5/src/WriterFLAT.cc    2022-05-13 14:55:09.000000000 +0200
@@ -29,7 +29,7 @@
   }
 
   void WriterFLAT::_writeAnnotations(std::ostream& os, const AnalysisObject& 
ao) {
-    os << scientific << setprecision(_precision);
+    os << scientific << setprecision(_aoprecision);
     for (const string& a : ao.annotations()) {
       if (a.empty()) continue;
       if (a == "Type") continue;
@@ -41,7 +41,7 @@
 
   void WriterFLAT::writeCounter(std::ostream& os, const Counter& c) {
     ios_base::fmtflags oldflags = os.flags();
-    os << scientific << showpoint << setprecision(_precision);
+    os << scientific << showpoint << setprecision(_aoprecision);
 
     os << "# BEGIN COUNTER " << c.path() << "\n";
     _writeAnnotations(os, c);
@@ -86,7 +86,7 @@
 
   void WriterFLAT::writeScatter1D(std::ostream& os, const Scatter1D& s) {
     ios_base::fmtflags oldflags = os.flags();
-    os << scientific << showpoint << setprecision(_precision);
+    os << scientific << showpoint << setprecision(_aoprecision);
 
     os << "# BEGIN VALUE " << s.path() << "\n";
     _writeAnnotations(os, s);
@@ -103,7 +103,7 @@
 
   void WriterFLAT::writeScatter2D(std::ostream& os, const Scatter2D& s) {
     ios_base::fmtflags oldflags = os.flags();
-    os << scientific << showpoint << setprecision(_precision);
+    os << scientific << showpoint << setprecision(_aoprecision);
 
     os << "# BEGIN HISTO1D " << s.path() << "\n";
     _writeAnnotations(os, s);
@@ -121,7 +121,7 @@
 
   void WriterFLAT::writeScatter3D(std::ostream& os, const Scatter3D& s) { // , 
bool asHist2D) {
     ios_base::fmtflags oldflags = os.flags();
-    os << scientific << showpoint << setprecision(_precision);
+    os << scientific << showpoint << setprecision(_aoprecision);
 
     os << "# BEGIN HISTO2D " << s.path() << "\n";
     _writeAnnotations(os, s);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/src/WriterYODA.cc 
new/YODA-1.9.5/src/WriterYODA.cc
--- old/YODA-1.9.4/src/WriterYODA.cc    2021-11-01 22:36:09.000000000 +0100
+++ new/YODA-1.9.5/src/WriterYODA.cc    2022-05-13 14:55:09.000000000 +0200
@@ -41,7 +41,7 @@
 
 
   void WriterYODA::_writeAnnotations(std::ostream& os, const AnalysisObject& 
ao) {
-    os << scientific << setprecision(_precision);
+    os << scientific << setprecision(_aoprecision);
     for (const string& a : ao.annotations()) {
       if (a.empty()) continue;
       /// @todo Write out floating point annotations as scientific notation
@@ -57,7 +57,7 @@
 
   void WriterYODA::writeCounter(std::ostream& os, const Counter& c) {
     ios_base::fmtflags oldflags = os.flags();
-    os << scientific << showpoint << setprecision(_precision);
+    os << scientific << showpoint << setprecision(_aoprecision);
 
     os << "BEGIN " << _iotypestr("COUNTER") << " " << c.path() << "\n";
     _writeAnnotations(os, c);
@@ -71,7 +71,7 @@
 
   void WriterYODA::writeHisto1D(std::ostream& os, const Histo1D& h) {
     ios_base::fmtflags oldflags = os.flags();
-    os << scientific << showpoint << setprecision(_precision);
+    os << scientific << showpoint << setprecision(_aoprecision);
 
     os << "BEGIN " << _iotypestr("HISTO1D") << " " << h.path() << "\n";
     _writeAnnotations(os, h);
@@ -110,7 +110,7 @@
 
   void WriterYODA::writeHisto2D(std::ostream& os, const Histo2D& h) {
     ios_base::fmtflags oldflags = os.flags();
-    os << scientific << showpoint << setprecision(_precision);
+    os << scientific << showpoint << setprecision(_aoprecision);
     os << "BEGIN " << _iotypestr("HISTO2D") << " " << h.path() << "\n";
     _writeAnnotations(os, h);
     try {
@@ -163,7 +163,7 @@
 
   void WriterYODA::writeProfile1D(std::ostream& os, const Profile1D& p) {
     ios_base::fmtflags oldflags = os.flags();
-    os << scientific << showpoint << setprecision(_precision);
+    os << scientific << showpoint << setprecision(_aoprecision);
 
     os << "BEGIN " << _iotypestr("PROFILE1D") << " " << p.path() << "\n";
     _writeAnnotations(os, p);
@@ -199,7 +199,7 @@
 
   void WriterYODA::writeProfile2D(std::ostream& os, const Profile2D& p) {
     ios_base::fmtflags oldflags = os.flags();
-    os << scientific << showpoint << setprecision(_precision);
+    os << scientific << showpoint << setprecision(_aoprecision);
 
     os << "BEGIN " << _iotypestr("PROFILE2D") << " " << p.path() << "\n";
     _writeAnnotations(os, p);
@@ -249,7 +249,7 @@
 
   void WriterYODA::writeScatter1D(std::ostream& os, const Scatter1D& s) {
     ios_base::fmtflags oldflags = os.flags();
-    os << scientific << showpoint << setprecision(_precision);
+    os << scientific << showpoint << setprecision(_aoprecision);
 
     // we promised not to modify const s, but we want to add an annotation
     // we did not promise to not modify the *clone* of s...
@@ -278,14 +278,14 @@
 
   void WriterYODA::writeScatter2D(std::ostream& os, const Scatter2D& s) {
     ios_base::fmtflags oldflags = os.flags();
-    os << scientific << showpoint << setprecision(_precision);
+    os << scientific << showpoint << setprecision(_aoprecision);
     os << "BEGIN " << _iotypestr("SCATTER2D") << " " << s.path() << "\n";
 
-    // write annotations
-    // we promised not to modify const s, but we want to add an annotation
-    // we did not promise to not modify the *clone* of s...
-    // judge not, lest ye be judged
-    auto sclone =  s.clone();
+    // Write annotations.
+    // We promised not to modify const s, but we want to add an annotation;
+    // We did not promise to not modify the *clone* of s;
+    // Judge not, lest ye be judged
+    auto sclone = s.clone();
     sclone.writeVariationsToAnnotations();
     _writeAnnotations(os, sclone);
 
@@ -311,7 +311,7 @@
 
   void WriterYODA::writeScatter3D(std::ostream& os, const Scatter3D& s) {
     ios_base::fmtflags oldflags = os.flags();
-    os << scientific << showpoint << setprecision(_precision);
+    os << scientific << showpoint << setprecision(_aoprecision);
     os << "BEGIN " << _iotypestr("SCATTER3D") << " " << s.path() << "\n";
 
     // write annotations
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/tests/Makefile.am 
new/YODA-1.9.5/tests/Makefile.am
--- old/YODA-1.9.4/tests/Makefile.am    2021-11-24 13:46:02.000000000 +0100
+++ new/YODA-1.9.5/tests/Makefile.am    2022-05-13 15:03:33.000000000 +0200
@@ -67,6 +67,7 @@
 #  testscatter3Dmodify
 
 AM_LDFLAGS = -L$(top_builddir)/src -lYODA
+AM_CPPFLAGS += -DYODA_TESTS_SRC="\"$(srcdir)\""
 
 testtraits_SOURCES = TestTraits.cc
 testannotations_SOURCES = TestAnnotations.cc
@@ -131,15 +132,7 @@
 
 testreader.log: testwriter.log
 
-### to make distcheck work on macOS, we need a
-### way to prevent the DYLD_LIBRARY_PATH setting
-### from being removed by system integrity protection
-### when /usr/bin/env is called
-### (same for any other app in /usr/bin)
-###
-if ! WITH_OSX
 TESTS += $(PYTESTS) $(SHTESTS)
-endif
 
 CLEANFILES = \
   h1d.yoda h1d.dat \
@@ -150,7 +143,8 @@
   testwriter1.yoda testwriter2.yoda testwriter2.yoda.gz \
   foo_bar_baz.dat \
   counter.yoda \
-  test.aida
+  test.aida \
+  y2y_3.yoda
 
 if ENABLE_ROOT
   TESTS += test-yoda2root.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/tests/Makefile.in 
new/YODA-1.9.5/tests/Makefile.in
--- old/YODA-1.9.4/tests/Makefile.in    2021-12-02 12:53:35.000000000 +0100
+++ new/YODA-1.9.5/tests/Makefile.in    2022-05-13 15:08:25.000000000 +0200
@@ -106,17 +106,10 @@
        testhisto1Dmodify$(EXEEXT) testprofile1Dcreate$(EXEEXT) \
        testprofile1Dfill$(EXEEXT) testprofile1Dmodify$(EXEEXT) \
        testscatter2Dcreate$(EXEEXT) testscatter2Dmodify$(EXEEXT) \
-       testhisto2Dcreate$(EXEEXT) $(am__append_1) $(am__append_2)
-
-### to make distcheck work on macOS, we need a
-### way to prevent the DYLD_LIBRARY_PATH setting
-### from being removed by system integrity protection
-### when /usr/bin/env is called
-### (same for any other app in /usr/bin)
-###
-@WITH_OSX_FALSE@am__append_1 = $(PYTESTS) $(SHTESTS)
-@ENABLE_ROOT_TRUE@am__append_2 = test-yoda2root.sh
-@ENABLE_ROOT_TRUE@am__append_3 = test1.root
+       testhisto2Dcreate$(EXEEXT) $(PYTESTS) $(SHTESTS) \
+       $(am__append_1)
+@ENABLE_ROOT_TRUE@am__append_1 = test-yoda2root.sh
+@ENABLE_ROOT_TRUE@am__append_2 = test1.root
 subdir = tests
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_zlib.m4 \
@@ -494,7 +487,7 @@
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
-AM_CPPFLAGS = @AM_CPPFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ -DYODA_TESTS_SRC="\"$(srcdir)\""
 AM_CXXFLAGS = @AM_CXXFLAGS@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
@@ -729,7 +722,7 @@
 CLEANFILES = h1d.yoda h1d.dat p1d.yoda p1d.dat h2d.yoda h2d.dat \
        p2d.yoda p2d.dat s1d.yoda s2d.yoda testwriter1.yoda \
        testwriter2.yoda testwriter2.yoda.gz foo_bar_baz.dat \
-       counter.yoda test.aida $(am__append_3)
+       counter.yoda test.aida y2y_3.yoda $(am__append_2)
 all: all-am
 
 .SUFFIXES:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/tests/TestHisto1Db.cc 
new/YODA-1.9.5/tests/TestHisto1Db.cc
--- old/YODA-1.9.4/tests/TestHisto1Db.cc        2021-03-31 18:54:03.000000000 
+0200
+++ new/YODA-1.9.5/tests/TestHisto1Db.cc        2022-05-13 14:35:06.000000000 
+0200
@@ -54,7 +54,9 @@
     }
   }
 
-  vector<AnalysisObject*> hs3 = ReaderYODA::create().read("test.yoda");
+  const string testsrcdir = YODA_TESTS_SRC;
+  cout << "Reading file from tests src dir = " << testsrcdir << endl;
+  vector<AnalysisObject*> hs3 = ReaderYODA::create().read(testsrcdir + 
"/test.yoda");
   for (vector<AnalysisObject*>::const_iterator i = hs3.begin(); i != 
hs3.end(); ++i) {
     cout << (*i)->type() << endl;
     YODA::WriterYODA::write(std::cout, (**i));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/tests/test-io.py 
new/YODA-1.9.5/tests/test-io.py
--- old/YODA-1.9.4/tests/test-io.py     2021-11-24 13:46:02.000000000 +0100
+++ new/YODA-1.9.5/tests/test-io.py     2022-05-13 14:54:09.000000000 +0200
@@ -8,27 +8,34 @@
     #   TypeError: initial_value must be unicode or None, not str
     from StringIO import StringIO
 
-import yoda
+import os
+TESTSRCDIR = os.environ.get("YODA_TESTS_SRC", ".")
+def testsrcpath(fname):
+    return os.path.join(TESTSRCDIR, fname)
 
-aos_ref = yoda.read("test.yoda")
+import yoda
+aos_ref = yoda.read(testsrcpath("test.yoda"))
 
 assert len(aos_ref.keys()) > 0
 print(aos_ref.keys())
 
+ypath = testsrcpath("test.yoda")
+yzpath = ypath + ".gz"
+
 for aos in [
-        yoda.read(open("test.yoda", "r")),
-        yoda.read(StringIO(open("test.yoda", "r").read())),
-        yoda.readYODA("test.yoda"),
-        yoda.readYODA(open("test.yoda", "r")),
-        yoda.readYODA(StringIO(open("test.yoda", "r").read())),
+        yoda.read(open(ypath, "r")),
+        yoda.read(StringIO(open(ypath, "r").read())),
+        yoda.readYODA(ypath),
+        yoda.readYODA(open(ypath, "r")),
+        yoda.readYODA(StringIO(open(ypath, "r").read())),
 
         # Compressed
-        yoda.read("test.yoda.gz"),
-        yoda.read(open("test.yoda.gz", "rb")),
-        yoda.read(BytesIO(open("test.yoda.gz", "rb").read())),
-        yoda.readYODA("test.yoda.gz"),
-        yoda.readYODA(open("test.yoda.gz", "rb")),
-        yoda.readYODA(BytesIO(open("test.yoda.gz", "rb").read())),
+        yoda.read(yzpath),
+        yoda.read(open(yzpath, "rb")),
+        yoda.read(BytesIO(open(yzpath, "rb").read())),
+        yoda.readYODA(yzpath),
+        yoda.readYODA(open(yzpath, "rb")),
+        yoda.readYODA(BytesIO(open(yzpath, "rb").read())),
 ]:
     print(aos.keys())
     assert set(aos.keys()) == set(aos_ref.keys())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/tests/test-s2d.py 
new/YODA-1.9.5/tests/test-s2d.py
--- old/YODA-1.9.4/tests/test-s2d.py    2021-11-24 13:46:02.000000000 +0100
+++ new/YODA-1.9.5/tests/test-s2d.py    2022-05-13 14:55:09.000000000 +0200
@@ -7,10 +7,10 @@
 s.addPoint(10, 5, (0.1,0.2), [0.5,0.5])
 
 # check setting error sources
-s.point(0).setYErrs(0.3, "syst1")
-s.point(0).setYErrs(0.4, "syst2")
-s.point(1).setYErrs(0.5, "syst1")
-s.point(1).setYErrs(1.2, "syst2")
+s.point(0).setYErrs(-0.3, 0.3, "syst1")
+s.point(0).setYErrs(-0.4, 0.3, "syst2")
+s.point(1).setYErrs(-0.5, 0.5, "syst1")
+s.point(1).setYErrs(-1.2, 1.2, "syst2")
 print(s)
 
 # check setting total uncertainty from sources
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/yoda.pc new/YODA-1.9.5/yoda.pc
--- old/YODA-1.9.4/yoda.pc      2021-12-02 12:53:39.000000000 +0100
+++ new/YODA-1.9.5/yoda.pc      2022-05-13 15:08:28.000000000 +0200
@@ -7,7 +7,6 @@
 Name: yoda
 Description: YODA data analysis library
 URL: https://yoda.hepforge.org
-Version: 1.9.4
+Version: 1.9.5
 Libs: -L${exec_prefix}/lib -lYODA
 Cflags: -I${prefix}/include
-#-I@BOOST_CPPFLAGS@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/YODA-1.9.4/yoda.pc.in new/YODA-1.9.5/yoda.pc.in
--- old/YODA-1.9.4/yoda.pc.in   2021-03-31 18:54:03.000000000 +0200
+++ new/YODA-1.9.5/yoda.pc.in   2022-05-13 14:55:09.000000000 +0200
@@ -10,4 +10,3 @@
 Version: @VERSION@
 Libs: -L@libdir@ -lYODA
 Cflags: -I@includedir@
-#-I@BOOST_CPPFLAGS@

Reply via email to