From d1f9fa0ce4aae4600b860325c07540f0998ba312 Mon Sep 17 00:00:00 2001
From: Chi Lung Cheng <chi.lung.cheng@cern.ch>
Date: Sat, 25 Feb 2023 00:07:10 +0100
Subject: [PATCH 1/4] do not require asimov_types to be int

---
 quickstats/clis/core.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/quickstats/clis/core.py b/quickstats/clis/core.py
index 079cffc4..2e4d5cc5 100644
--- a/quickstats/clis/core.py
+++ b/quickstats/clis/core.py
@@ -458,7 +458,10 @@ def generate_standard_asimov(**kwargs):
     from quickstats.utils.string_utils import split_str
     outname = kwargs.pop('outname')
     asimov_types = kwargs.pop('asimov_types')
-    asimov_types = split_str(asimov_types, sep=",", cast=int)
+    try:
+        asimov_types = split_str(asimov_types, sep=",", cast=int)
+    except:
+        asimov_types = split_str(asimov_types, sep=",")
     fix_param = kwargs.pop('fix_param')
     profile_param = kwargs.pop('profile_param')
     snapshot_name = kwargs.pop('snapshot_name')
-- 
GitLab


From 5fd197ff3b33322233584ebfbe77311fcce687fe Mon Sep 17 00:00:00 2001
From: Chi Lung Cheng <chi.lung.cheng@cern.ch>
Date: Sat, 25 Feb 2023 00:07:33 +0100
Subject: [PATCH 2/4] import ROOT anyways

---
 quickstats/interface/root/roofit_extension.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/quickstats/interface/root/roofit_extension.py b/quickstats/interface/root/roofit_extension.py
index 4c7c30f8..1d658012 100644
--- a/quickstats/interface/root/roofit_extension.py
+++ b/quickstats/interface/root/roofit_extension.py
@@ -52,8 +52,8 @@ def convert_argsets(*argsets, fmt:str="argset", to_str:bool=False):
         
 def pair_constraints(constraint_pdfs:"ROOT.RooArgSet", nuisance_parameters:"ROOT.RooArgSet",
                      global_observables:"ROOT.RooArgSet", fmt:str="list", to_str:bool=False, sort:bool=False):
+    import ROOT
     if sort:
-        import ROOT
         ROOT.RooArgSet.sort(constraint_pdfs)
     paired_constraints = ROOT.RooFitExt.pairConstraints(constraint_pdfs, nuisance_parameters, global_observables)
     paired_pdfs  = paired_constraints.pdfs
-- 
GitLab


From 39b38fd3bc7cd7dde06723f5b902473c439af2d2 Mon Sep 17 00:00:00 2001
From: Chi Lung Cheng <chi.lung.cheng@cern.ch>
Date: Sat, 25 Feb 2023 00:07:50 +0100
Subject: [PATCH 3/4] use argset instead of arglist when pairing constraints

---
 quickstats/components/extended_model.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/quickstats/components/extended_model.py b/quickstats/components/extended_model.py
index 1028fe33..5d94ab7d 100644
--- a/quickstats/components/extended_model.py
+++ b/quickstats/components/extended_model.py
@@ -546,7 +546,7 @@ class ExtendedModel(AbstractObject):
         return unconstrained_nuis
     
     def set_constrained_nuisance_parameters_to_nominal(self, set_constant:bool=False):
-        constrain_pdf, constrained_nuis, _ = self.pair_constraints(fmt="arglist", sort=False)
+        constrain_pdf, constrained_nuis, _ = self.pair_constraints(fmt="argset", sort=False)
         for pdf, nuis in zip(constrain_pdf, constrained_nuis):
             pdf_class = pdf.ClassName()
             if pdf_class in ["RooGaussian", "RooBifurGauss"]:
-- 
GitLab


From 5679621c3ad484b6434a1d02e149a355f0c8bdfa Mon Sep 17 00:00:00 2001
From: Chi Lung Cheng <chi.lung.cheng@cern.ch>
Date: Sat, 25 Feb 2023 00:09:56 +0100
Subject: [PATCH 4/4] update version

---
 quickstats/_version.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/quickstats/_version.py b/quickstats/_version.py
index b88a80bd..6cf3b00c 100644
--- a/quickstats/_version.py
+++ b/quickstats/_version.py
@@ -1 +1 @@
-__version__ = "0.6.7.6"
+__version__ = "0.6.7.7"
-- 
GitLab