On Sat, Nov 29, 2014 at 02:11:48PM +0100, Michael Banck wrote:
> Hi,
> 
> On Wed, Nov 26, 2014 at 11:57:41PM +0100, Michael Banck wrote:
> > On Wed, Nov 26, 2014 at 05:47:57PM -0500, Yaroslav Halchenko wrote:
> > > Upload it without delay, and let's hope none off those  doesn't veil
> > > the actual problem in the code :-) 
> > 
> > OK, I will sponsor that upload as well tomorrow.
> 
> Unfortunately, I did not get around to that yet, but was looking now.
> 
> The problem is: As -1.1 has already been uploaded and accepted in the
> archive, what we need is -1.2 patch on top of that with a new changelog
> and everything.
> 
> Tomasz, I will try to extract that from your two NMU diffs later today
> if you don't get around sending a new patch until then.

I've uploaded the attached debdiff now.


Michael
diff -Nru statsmodels-0.4.2/debian/changelog statsmodels-0.4.2/debian/changelog
--- statsmodels-0.4.2/debian/changelog  2014-11-23 18:56:37.000000000 +0100
+++ statsmodels-0.4.2/debian/changelog  2014-11-29 16:33:12.000000000 +0100
@@ -1,3 +1,15 @@
+statsmodels (0.4.2-1.2) testing; urgency=medium
+
+  * Non-maintainer upload, incorporating changes by Tomasz Buchert.
+  * debian/patches/scipy-rvs-interface.patch: Removed again and ...
+  * debian/patches/testsuite-fixes.patch: ... folded into this patch, just
+    raising a nose.SkipTest() for the problematic test case.
+  * debian/patches/testsuite-fixes.patch: Amended for test_discrete.py, also
+    skipping this test case via raising a nose.SkipTest(), as it leads to a
+    FTBFS error on i386 (Closes: #768695).
+ 
+ -- Michael Banck <mba...@debian.org>  Sat, 29 Nov 2014 16:19:51 +0100
+
 statsmodels (0.4.2-1.1) testing; urgency=medium
 
   * Non-maintainer upload.
diff -Nru statsmodels-0.4.2/debian/patches/scipy-rvs-interface.patch 
statsmodels-0.4.2/debian/patches/scipy-rvs-interface.patch
--- statsmodels-0.4.2/debian/patches/scipy-rvs-interface.patch  2014-11-23 
18:56:37.000000000 +0100
+++ statsmodels-0.4.2/debian/patches/scipy-rvs-interface.patch  1970-01-01 
01:00:00.000000000 +0100
@@ -1,128 +0,0 @@
-Description: remove tests that use uncompatible scipy interface
- The tests use an "rvs" method which has an incompatible
- interface. We remove these failing tests altogether.
-
---- statsmodels-0.4.2.orig/statsmodels/sandbox/tests/test_gam.py
-+++ statsmodels-0.4.2/statsmodels/sandbox/tests/test_gam.py
-@@ -187,121 +187,3 @@ class TestAdditiveModel(BaseAM, CheckAM)
-         const = res_gam.alpha + sum([ss.params[1] for ss in m.smoothers])
-         #print const, slopes
-         res1.params = np.array([const] + slopes)
--
--
--class BaseGAM(BaseAM, CheckGAM):
--
--    def init(self):
--        nobs = self.nobs
--        y_true, x, exog = self.y_true, self.x, self.exog
--        if not hasattr(self, 'scale'):
--            scale = 1
--        else:
--            scale = self.scale
--
--        f = self.family
--
--        self.mu_true = mu_true = f.link.inverse(y_true)
--
--        np.random.seed(8765993)
--        #y_obs = np.asarray([stats.poisson.rvs(p) for p in mu], float)
--        y_obs = self.rvs(mu_true, scale=scale, size=nobs) #this should work
--        m = GAM(y_obs, x, family=f)  #TODO: y_obs is twice __init__ and fit
--        m.fit(y_obs, maxiter=100)
--        res_gam = m.results
--        self.res_gam = res_gam   #attached for debugging
--        self.mod_gam = m   #attached for debugging
--
--        res_glm = GLM(y_obs, exog, family=f).fit()
--
--        #Note: there still are some naming inconsistencies
--        self.res1 = res1 = Dummy() #for gam model
--        #res2 = Dummy() #for benchmark
--        self.res2 = res2 = res_glm  #reuse existing glm results, will add 
additional
--
--        #eta in GLM terminology
--        res2.y_pred = res_glm.model.predict(res_glm.params, exog, linear=True)
--        res1.y_pred = res_gam.predict(x)
--        res1.y_predshort = res_gam.predict(x[:10]) #, linear=True)
--
--        #mu
--        res2.mu_pred = res_glm.model.predict(res_glm.params, exog, 
linear=False)
--        res1.mu_pred = res_gam.mu
--
--        #parameters
--        slopes = [i for ss in m.smoothers for i in ss.params[1:]]
--        const = res_gam.alpha + sum([ss.params[1] for ss in m.smoothers])
--        res1.params = np.array([const] + slopes)
--
--
--class TestGAMPoisson(BaseGAM):
--
--    def __init__(self):
--        super(self.__class__, self).__init__() #initialize DGP
--
--        self.family =  family.Poisson()
--        self.rvs = stats.poisson.rvs
--
--        self.init()
--
--class TestGAMBinomial(BaseGAM):
--
--    def __init__(self):
--        super(self.__class__, self).__init__() #initialize DGP
--
--        self.family =  family.Binomial()
--        self.rvs = stats.bernoulli.rvs
--
--        self.init()
--
--class _estGAMGaussianLogLink(BaseGAM):
--    #test failure, but maybe precision issue, not far off
--    #>>> np.mean(np.abs(tt.res2.mu_pred - tt.mu_true))
--    #0.80409736263199649
--    #>>> np.mean(np.abs(tt.res2.mu_pred - tt.mu_true))/tt.mu_true.mean()
--    #0.023258245077813208
--    #>>> np.mean((tt.res2.mu_pred - tt.mu_true)**2)/tt.mu_true.mean()
--    #0.022989403735692578
--
--    def __init__(self):
--        super(self.__class__, self).__init__() #initialize DGP
--
--        self.family =  family.Gaussian(links.log)
--        self.rvs = stats.norm.rvs
--        self.scale = 5
--
--        self.init()
--
--
--class TestGAMGamma(BaseGAM):
--
--    def __init__(self):
--        super(self.__class__, self).__init__() #initialize DGP
--
--        self.family =  family.Gamma(links.log)
--        self.rvs = stats.gamma.rvs
--
--        self.init()
--
--class _estGAMNegativeBinomial(BaseGAM):
--    #rvs generation doesn't work, nbinom needs 2 parameters
--
--    def __init__(self):
--        super(self.__class__, self).__init__() #initialize DGP
--
--        self.family =  family.NegativeBinomial()
--        self.rvs = stats.nbinom.rvs
--
--        self.init()
--
--if __name__ == '__main__':
--    t1 = TestAdditiveModel()
--    t1.test_predict()
--    t1.test_params()
--
--    for tt in [TestGAMPoisson, TestGAMBinomial, TestGAMGamma,
--               _estGAMGaussianLogLink]: #, TestGAMNegativeBinomial]:
--        tt = tt()
--        tt.test_predict()
--        tt.test_params()
--        tt.test_mu
diff -Nru statsmodels-0.4.2/debian/patches/series 
statsmodels-0.4.2/debian/patches/series
--- statsmodels-0.4.2/debian/patches/series     2014-11-23 18:56:37.000000000 
+0100
+++ statsmodels-0.4.2/debian/patches/series     2014-11-29 16:40:05.000000000 
+0100
@@ -1,3 +1,2 @@
 sphinx-ipython.patch
-scipy-rvs-interface.patch
 testsuite-fixes.patch
diff -Nru statsmodels-0.4.2/debian/patches/testsuite-fixes.patch 
statsmodels-0.4.2/debian/patches/testsuite-fixes.patch
--- statsmodels-0.4.2/debian/patches/testsuite-fixes.patch      2014-11-23 
18:56:37.000000000 +0100
+++ statsmodels-0.4.2/debian/patches/testsuite-fixes.patch      2014-11-29 
14:08:36.000000000 +0100
@@ -1,17 +1,22 @@
 Description: Fix various testsuite problems
  The testsuite depends on version-specific functionality
- of various dependencies like numpy, scipy. This patches fixes
+ of various dependencies like numpy or scipy. This patch fixes
  problems caused by versions in jessie release of these dependencies.
  .
  statsmodels/tools/tools.py:
-     => unexisting attribute in numpy object
+   => unexisting attribute in numpy object
  statsmodels/sandbox/distributions/tests/testtransf.py:
  statsmodels/tsa/filters/tests/test_filters.py:
-     => scipy interface incompatibilities
+   => scipy interface incompatibilities
  statsmodels/tsa/base/tests/test_datetools.py:
-     => DateRange class is not present in jessie pandas
+   => DateRange class is not present in jessie pandas
  statsmodels/sandbox/distributions/extras.py:
-     => a mistake fixed in newer releases of statsmodels
+   => a mistake fixed in newer releases of statsmodels
+ statsmodels/sandbox/tests/test_gam.py:
+   => incompatible scipy interface for rvs method
+ statsmodels/discrete/tests/test_discrete.py:
+   => failures due to differences between architectures, see
+      https://github.com/statsmodels/statsmodels/commit/ca701e7a
 
 --- a/statsmodels/tools/tools.py
 +++ b/statsmodels/tools/tools.py
@@ -55,14 +60,13 @@
          assert_almost_equal(self.res1.B, self.res2.B, DECIMAL_4)
 --- a/statsmodels/tsa/vector_ar/tests/test_var.py
 +++ b/statsmodels/tsa/vector_ar/tests/test_var.py
-@@ -502,7 +502,7 @@
- def have_pandas():
-     try:
-         import pandas as _
--        return True
-+        return hasattr(_, "DateRange")
-     except ImportError:
-         return False
+@@ -494,6 +494,7 @@
+ resultspath = basepath + '/tsa/vector_ar/tests/results/'
+ 
+ def get_lutkepohl_data(name='e2'):
++    raise nose.SkipTest("Skipped because of missing DateRange")
+     lut_data = basepath + '/tsa/vector_ar/data/'
+     path = lut_data + '%s.dat' % name
  
 --- a/statsmodels/tsa/base/tests/test_datetools.py
 +++ b/statsmodels/tsa/base/tests/test_datetools.py
@@ -130,3 +134,32 @@
              extradoc = '''
  Skewed T distribution by Azzalini, A. & Capitanio, A. (2003)_
  
+--- a/statsmodels/sandbox/tests/test_gam.py
++++ b/statsmodels/sandbox/tests/test_gam.py
+@@ -85,7 +85,7 @@
+ from statsmodels.genmod.families import family, links
+ from statsmodels.genmod.generalized_linear_model import GLM
+ from statsmodels.regression.linear_model import OLS
+-
++import nose
+ 
+ class Dummy(object):
+     pass
+@@ -192,6 +192,7 @@
+ class BaseGAM(BaseAM, CheckGAM):
+ 
+     def init(self):
++        raise nose.SkipTest("Incompatible scipy interface")
+         nobs = self.nobs
+         y_true, x, exog = self.y_true, self.x, self.exog
+         if not hasattr(self, 'scale'):
+--- a/statsmodels/discrete/tests/test_discrete.py
++++ b/statsmodels/discrete/tests/test_discrete.py
+@@ -244,6 +244,7 @@
+ class TestProbitCG(CheckModelResults):
+     @classmethod
+     def setupClass(cls):
++        raise SkipTest("This method does not converge on some architectures")
+         if iswindows:   # does this work with classmethod?
+             raise SkipTest("fmin_cg sometimes fails to converge on windows")
+         data = sm.datasets.spector.load()

Reply via email to