Import statsmodels_0.10.2-2.debian.tar.xz
authorRebecca N. Palmer <rebecca_palmer@zoho.com>
Tue, 28 Jan 2020 22:29:29 +0000 (22:29 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Tue, 28 Jan 2020 22:29:29 +0000 (22:29 +0000)
[dgit import tarball statsmodels 0.10.2-2 statsmodels_0.10.2-2.debian.tar.xz]

39 files changed:
README.source [new file with mode: 0644]
changelog [new file with mode: 0644]
control [new file with mode: 0644]
copyright [new file with mode: 0644]
datasets/Rdatasets.R [new file with mode: 0644]
datasets/prepopulate_cache.py [new file with mode: 0755]
datasets/rst.sh [new file with mode: 0755]
docs [new file with mode: 0644]
gbp.conf [new file with mode: 0644]
patches/944054_flaky_tests.patch [new file with mode: 0644]
patches/cache_security.patch [new file with mode: 0644]
patches/i386_loosen_test_tolerances.patch [new file with mode: 0644]
patches/link_security2.patch [new file with mode: 0644]
patches/privacy.patch [new file with mode: 0644]
patches/python3_shebangs.patch [new file with mode: 0644]
patches/scipy13_compat.patch [new file with mode: 0644]
patches/series [new file with mode: 0644]
patches/show_cvxopt_error.patch [new file with mode: 0644]
patches/sphinx_autosummary.patch [new file with mode: 0644]
patches/sphinx_ignore_errors.patch [new file with mode: 0644]
patches/subprocess_use_same_pyver.patch [new file with mode: 0644]
patches/up5253_gee_offset.patch [new file with mode: 0644]
patches/up_reduce_test_precision [new file with mode: 0644]
patches/use-cached-datasets [new file with mode: 0644]
patches/use-system-inventory [new file with mode: 0644]
patches/use_available_data.patch [new file with mode: 0644]
patches/use_tmp_path.patch [new file with mode: 0644]
patches/xfail_kalman_armhf.patch [new file with mode: 0644]
python-statsmodels-doc.doc-base [new file with mode: 0644]
python-statsmodels-doc.docs [new file with mode: 0644]
python-statsmodels-doc.examples [new file with mode: 0644]
python-statsmodels-doc.links [new file with mode: 0644]
python-statsmodels-doc.maintscript [new file with mode: 0644]
rules [new file with mode: 0755]
source/format [new file with mode: 0644]
source/lintian-overrides [new file with mode: 0644]
tests/control [new file with mode: 0644]
upstream/metadata [new file with mode: 0644]
watch [new file with mode: 0644]

diff --git a/README.source b/README.source
new file mode 100644 (file)
index 0000000..cf4b917
--- /dev/null
@@ -0,0 +1,11 @@
+This repository includes the upstream Git history.
+
+Setting up the second remote (once per clone):
+git remote add upstream https://github.com/statsmodels/statsmodels
+
+Importing a new upstream version:
+git fetch upstream
+gbp import-orig --upstream-branch=master --uscan --pristine-tar "--upstream-vcs-tag=v%(version)s" --debian-branch=debian
+
+Remember that the source package the buildds see isn't a Git repo:
+we (unlike upstream) can't use git as a clean command during the build. 
\ No newline at end of file
diff --git a/changelog b/changelog
new file mode 100644 (file)
index 0000000..dedd619
--- /dev/null
+++ b/changelog
@@ -0,0 +1,671 @@
+statsmodels (0.10.2-2) unstable; urgency=medium
+
+  * Docs: don't fail the build on no-network exceptions.  Closes: #950087.
+  * Remove #945501 cleanup code: not worth the risk in (future) stable.
+  * Bump Standards-Version to 4.5.0 (no changes needed).
+  * Include offset and exposure in GEE fittedvalues (upstream bug 5253).
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Tue, 28 Jan 2020 22:29:29 +0000
+
+statsmodels (0.10.2-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Drop patches applied upstream, refresh others.
+  * Use symlink_to_dir for documentation move,
+    and clean up old files.  Closes: #945501.
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Tue, 03 Dec 2019 21:23:04 +0000
+
+statsmodels (0.10.1-5) unstable; urgency=medium
+
+  * No-change upload to unstable.  Closes: #934870, #931540.
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Sun, 10 Nov 2019 16:32:41 +0000
+
+statsmodels (0.10.1-4) experimental; urgency=medium
+
+  * Xfail another actual failure
+    and a few other similar tests as #924036.
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Sat, 09 Nov 2019 22:31:23 +0000
+
+statsmodels (0.10.1-3) experimental; urgency=medium
+
+  * Xfail another (intermittent?) instance of #924036.
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Sat, 09 Nov 2019 09:51:35 +0000
+
+statsmodels (0.10.1-2) experimental; urgency=medium
+
+  * Fail the build on test failures.
+  * Xfail or loosen tolerances on some tests.
+    Together, the above Closes: #944054.
+  * Use correct Python version for test_lazy_imports.
+  * Xfail more tests affected by #924036.
+  * Documentation build: fix errors loading pre-cached data,
+    load autosummary.
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Fri, 08 Nov 2019 22:27:02 +0000
+
+statsmodels (0.10.1-1) experimental; urgency=medium
+
+  * New upstream release.
+  * Upload to experimental, as this might be an API break
+    (see #931540).
+  * Simplify gbp.conf, import both tarball and upstream git,
+    and document this in README.source.
+  * Drop patches no longer needed, refresh others.
+  * Don't map r-cran-cardata to car: upstream now use the new name.
+  * Drop Python 2 packages (see #934870).
+  * Use Python 3 shebangs.
+  * Don't use setup.py clean, as upstream have disabled it.
+  * Use http(s)_proxy instead of a patch to block test downloads.
+  * Run build-time tests with the paths they expect.
+  * Update d/copyright.
+  * Don't install setup.cfg.
+  * Don't write to the source tree during tests.
+  * Bump Standards-Version to 4.4.1 (no changes needed).
+  * Reproducibility: fix date replacement bug, use UTC time.
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Sat, 02 Nov 2019 16:56:50 +0000
+
+statsmodels (0.9.0-6) unstable; urgency=medium
+
+  * Don't change global pickle settings,
+    as this can break unrelated code.
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Fri, 20 Sep 2019 19:23:49 +0100
+
+statsmodels (0.9.0-5) unstable; urgency=medium
+
+  * Update import paths to be compatible with scipy 1.3.
+  * Xfail another KalmanFilter test on armhf (#924036).
+  * Mark -lib packages Multi-Arch: same.
+  * Delete unused patches, document patches upstream status.
+  * Upload to unstable.
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Sun, 15 Sep 2019 21:50:15 +0100
+
+statsmodels (0.9.0-4) experimental; urgency=medium
+
+  * Loosen singularity detection threshold of VAR model.
+  * Make KalmanFilter warning (#924036) work on multiarch arm64/armhf
+    and xfail some more related tests.
+  * Adapt TestLagmat.test_unknown_trim to work with newer numpy.
+  * Loosen TestMultivariateVARUnivariate tolerances on i386.
+  * Xfail TestHoltWinters.test_forecast (like upstream).
+    Together, the above Closes: #938949.
+  * Use Breaks+Replaces for examples move to -doc.  Closes: #938995.
+  * Remove no longer needed s390x xfails/warning.
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Sat, 14 Sep 2019 10:38:33 +0100
+
+statsmodels (0.9.0-3) experimental; urgency=medium
+
+  * Upload to experimental, as 0.9 is an API break (see #931540).
+  * Merge 0.8.0-9 packaging into 0.9.  Drop patches no longer needed,
+    refresh others.
+  * Revert "Disable KalmanFilter on armhf" as it never actually
+    worked (see #924036 / LP#1819227).  Instead,
+    warn on use and xfail the tests.
+  * Add self to Uploaders.
+  * Tests now use pytest: add build-dependencies, adapt autopkgtest.
+  * Remove test skips that are no longer needed.
+  * Change s390x test skips to xfails (to check whether they are
+    still needed), and warn if l1_cvxopt_cp is used on s390x.
+  * Fix issues due to newer versions of dependencies:
+    - AnovaRM column order
+    - various issues within test code
+  * Fix midrule bug in LaTeX summary output.
+  * Clean up stray whitespace.
+  * Fix typos.
+  * Clarify -lib description.
+  * Use https in links, and update Homepage.
+  * Update and sort d/copyright.
+  * Bump Standards-Version to 4.4.0 (no changes needed).
+  * Give a more useful error if cvxopt is not available.
+  * Use debhelper-compat.
+  * Move examples to the -doc package.
+  * Remove obsolete symlink, add symlinks to ease finding docs.
+  * Strip timestamps and build paths for reproducibility.
+  * Deduplicate documentation images.
+  * Fix/improve nocheck/nodoc dependency marking.
+  * Categorize build-dependencies.
+  * Make -doc Suggest the Python 3 version.
+  * Run the R-using examples.
+  * Use data from R packages for building examples, instead of
+    embedding a copy.  Modify one example to not need r-cran-count.
+  * Set Rules-Requires-Root: no.
+  * Remove outdated cythonized-files.
+  * Don't use pickle for get_rdataset caching, as it is a security hole
+    if the cache is shared.  (This invalidates existing cached data;
+    it will automatically be re-downloaded if needed.)
+  * Warn that load_pickle is for trusted files only.
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Fri, 30 Aug 2019 07:48:41 +0100
+
+statsmodels (0.8.0-9) unstable; urgency=medium
+
+  * Team upload.
+  * Disable KalmanFilter on armhf, as it gives wrong results
+    (and probably always has).
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Sat, 02 Mar 2019 14:59:35 +0000
+
+statsmodels (0.8.0-8) unstable; urgency=medium
+
+  * Team upload.
+  * Remove outdated information from description.
+  * Use sphinx.ext.mathjax rather than no-longer-existing pngmath.
+    This also fixes equation display  Closes: #687301
+  * Fix spelling.
+  * Fix remote -> local requirejs substitution.
+  * Use text instead of fetching a logo.
+  * Make dataset caching work in Python 3.
+  * Extend use_cached_datasets to build more of the examples.
+  * Fix path and data layout exceptions in examples.
+  * Re-enable build-time tests, and clean up files they leave behind.
+  * Use upstream tests as autopkgtest.
+  * Move metadata to d/u/metadata, update and extend it.
+  * Update d/copyright.
+  * Fix exceptions due to newer versions of dependencies:
+    - "no attribute 'chisqprob'" in discrete_model
+    - "shape mismatch...could not be broadcast" in imputation
+    - "ufunc 'gammaln' not supported" in discrete_model
+    - "object arrays are not supported" in tsa.statespace
+    - "module 'pandas' has no attribute 'ols'" in tsa.vector_ar
+    - various IndexErrors in KaplanMeier  Closes: #860449
+    - "unexpected keyword argument 'format'" in datasets.co2
+    - UnicodeDecodeError in parse_lutkepohl_data
+    - various issues within test and example code
+  * Backport the following from experimental:
+
+  [ Julian Taylor ]
+  * Use python3 also for fold_toc.py
+  * Use fixed locale for documentation build
+
+  [ Andreas Tille ]
+  * hardening=+all
+  * Use libjs-mathjax
+  * Extend description of -doc package
+  * Remove matplotlib.sphinxext.only_directives option which is
+    not used.  Closes: #917754
+  * Do not try to access remote locations on buildtime test
+    Closes: #882641
+
+ -- Rebecca N. Palmer <rebecca_palmer@zoho.com>  Fri, 01 Mar 2019 22:49:09 +0000
+
+statsmodels (0.9.0-2) experimental; urgency=medium
+
+  * Team upload.
+  * Version 0.9 closes: #880245
+  * Remove matplotlib.sphinxext.only_directives option which is not used
+    Closes: #917754
+  * Do not try to access remote locations on buildtime test
+    Closes: #882641
+  * debhelper 12
+
+ -- Andreas Tille <tille@debian.org>  Wed, 13 Feb 2019 09:27:21 +0100
+
+statsmodels (0.9.0-1) experimental; urgency=medium
+
+  [ Andreas Tille ]
+  * Team upload.
+  * Fix watch file (do not report development tags)
+  * debhelper 11
+  * Standards-Version: 4.2.1
+  * New Build-Depends / Recommends: python*-colorama
+  * Drop useless get-orig-source target
+  * Fix permissions
+  * hardening=+all
+  * Use libjs-mathjax
+
+  [ Julian Taylor ]
+  * adapt use-python3-for-doc-build to also use python3 for fold_toc.py
+
+ -- Andreas Tille <tille@debian.org>  Sun, 28 Oct 2018 18:56:40 +0100
+
+statsmodels (0.8.0-7) unstable; urgency=medium
+
+  * Team upload
+  * Use pybuild --print build_dir to fix FTBFS with
+    dh-python >= 3.20180313 (Closes: #894572)
+  * Update Vcs-* URIs for move to salsa.debian.org
+  * Remove ancient Python version fields
+
+ -- Graham Inggs <ginggs@debian.org>  Wed, 27 Jun 2018 17:02:07 +0000
+
+statsmodels (0.8.0-6) unstable; urgency=medium
+
+  * Build the architecture dependent files before building documentation
+  * Add myself to uploaders.
+
+ -- Diane Trout <diane@ghic.org>  Fri, 29 Sep 2017 22:17:33 -0700
+
+statsmodels (0.8.0-5) unstable; urgency=medium
+
+  * Team Upload
+
+  [ Diane Trout ]
+  * add sphinx-common to Build-Depends which fixes a FTBFS caused by
+    Sphinxdoc.pm not being present when building binary only packages.
+  * Split dh_auto_build-arch and dh_auto_build-indep targets so we only
+    build the docs once.
+
+ -- Diane Trout <diane@ghic.org>  Fri, 29 Sep 2017 16:48:20 -0700
+
+statsmodels (0.8.0-4) unstable; urgency=medium
+
+  * Team upload
+
+  [ Diane Trout ]
+  * Add python-dateutil, patsy, tk as build depends
+    Marking nose & tk as !nocheck
+  * Add Python3 support
+    (Closes: #729956) (Closes: #782963) (Closes: #834495)
+  * Update Python 3 build depends, add components necessary to build
+    notebook examples
+  * Lintian warned that Conflicts with version should probably be Breaks
+  * Add use-system-inventory patch to use intersphinx inventory files from
+    other Debian doc packages.
+    Added those packages to the -doc package suggests list
+  * Let dh_sphinxdoc manage jquery dependencies.
+    Add libjs-requirejs for building notebooks.
+  * Use Python 3 for documentation building, and enable building notebook
+    examples as jupyter components are now available in stable.
+  * Extend a python3-statsmodels-lib description to make lintian happier
+  * Cleanup more files that might be generated during build
+  * Exclude test_sarimax test_structural test_dynamic_factor test_varmax
+    from unit testing
+    Closes: #873512
+  * add patch use-cached-datasets, and cache all of the get_rdataset
+    datasets in debian/datasets/. This is needed so the documentation will
+    build without network access.
+  * Document data files needed for documentation in debian/README.source
+
+  [ Andreas Tille ]
+  * Standards-Version: 4.1.0 (no changes needed)
+  * Add remark about documenting R data to debian/README.source
+  * Updating d/copyright
+  * DEP3
+
+ -- Diane Trout <diane@ghic.org>  Tue, 26 Sep 2017 23:55:47 -0700
+
+statsmodels (0.8.0-3) unstable; urgency=medium
+
+  * Team upload.
+  * d/rules: do not run the testsuite when only building arch:all packages.
+    (Closes: #872603)
+  * d/copyright: use https form for the copyright-format URL.
+  * d/control:
+    + promote the package to priority optional, per policy 4.0.1.
+    + bump Standards-Version to 4.0.1.
+
+ -- Sébastien Villemot <sebastien@debian.org>  Sat, 19 Aug 2017 11:42:08 +0200
+
+statsmodels (0.8.0-2) unstable; urgency=medium
+
+  * Team upload.
+
+  [ Sébastien Villemot ]
+  * Upload to unstable
+  * d/rules: fix logic of {build,binary}-indep for building doc.
+  * d/control:
+    + add missing build-dependency on dh-python.
+    + promote python-pandas to a Depends. It is really needed if one wants to
+      import statsmodels (and otherwise autopkgtest fails).
+
+  [ Andreas Tille ]
+  * d/p/skip_tests_failing_due_to_panda_issue.patch: new patch, removes tests
+    from test suite that fail because of pandas and can not easily be fixed.
+  * d/p/fix_numdocpy_issue.patch: new patch, fixes other issue with numpydoc.
+    (Closes: #868977)
+
+  [ Yaroslav Halchenko ]
+  * Bump to debhelper compat level 9.
+
+ -- Sébastien Villemot <sebastien@debian.org>  Fri, 18 Aug 2017 22:40:39 +0200
+
+statsmodels (0.8.0-1) experimental; urgency=medium
+
+  * Fresh upstream release resolving various compatibility issues etc
+    - absborbs some of previously carried patches (dropped from quilt):
+      fix_wrong_index_type.patch
+      workaround_panda_readtable_bug.patch
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Wed, 08 Feb 2017 13:08:38 -0500
+
+statsmodels (0.8.0~rc1+git59-gef47cd9-5) unstable; urgency=medium
+
+  * Team upload.
+  * Fix test skipping for s390
+
+ -- Ole Streicher <olebole@debian.org>  Mon, 26 Dec 2016 18:33:56 +0100
+
+statsmodels (0.8.0~rc1+git59-gef47cd9-4) unstable; urgency=medium
+
+  * Team upload.
+  * Disable test_smoke_plot_and_repr() and test_pandas() on s390x:
+    probably a matplotlib bug there
+
+ -- Ole Streicher <olebole@debian.org>  Mon, 26 Dec 2016 15:38:06 +0100
+
+statsmodels (0.8.0~rc1+git59-gef47cd9-3) unstable; urgency=medium
+
+  * Work around a Pandas readttable bug to fix (temporary) FTBFS on i386
+
+ -- Ole Streicher <olebole@debian.org>  Mon, 26 Dec 2016 11:46:23 +0100
+
+statsmodels (0.8.0~rc1+git59-gef47cd9-2) unstable; urgency=medium
+
+  * Team upload.
+  * Move package to Debian Science Team maintenance (permission from
+    Yaroslav Halchenko)
+  * Fix index type in `reshape` to be integer. Closes: #848782
+
+ -- Ole Streicher <olebole@debian.org>  Sun, 25 Dec 2016 14:52:31 +0100
+
+statsmodels (0.8.0~rc1+git59-gef47cd9-1) unstable; urgency=medium
+
+  * Fresh upstream rc snapshot which hopefully addresses some
+    outstanding FTBFS etc issues
+  * debian/control
+    - allow for ipython >= 5 as alternative to ipython for now,
+      and also for traitlets explicitly on those newer systems
+      (Closes: #843414)
+    - adjusted vcs-browser (Closes: #843407)
+  * debian/rules
+    - skip test_plot_month test
+      (see https://github.com/statsmodels/statsmodels/issues/3283)
+  * debian/patches/up_3239
+    - to cast index into array before sorting (Closes: #841610)
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Sat, 19 Nov 2016 19:37:43 -0500
+
+statsmodels (0.8.0~rc1+git43-g1ac3f11-1) unstable; urgency=medium
+
+  * Snapshot of a new upstream release candidate
+    - should resolve some failing tests causing FTBFS (Closes: #837232)
+  * debian/patches
+    - all changes* were dropped (upstreamed)
+    + deb_no_nbformat_for_now - since no nbformat, do not generate ipython
+      notebooks for now
+  * debian/control
+    - boost policy to 3.9.8
+    - python-numpydoc to build-depends-indep
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Mon, 19 Sep 2016 09:23:49 -0400
+
+statsmodels (0.6.1-10) UNRELEASED; urgency=medium
+
+  * debian/control
+    - apparently on e.g. 14.04 we have to depend on pandoc, so making it
+      not an alternative to nodejs
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Fri, 29 Apr 2016 09:30:57 -0400
+
+statsmodels (0.6.1-9) neurodebian; urgency=medium
+
+  * CP df820642c16d8486e8b676e07675afbbfd4824d8 to stay compatible with older
+    versions on nose (precise and alike)
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Wed, 27 Apr 2016 22:12:50 -0400
+
+statsmodels (0.6.1-8) unstable; urgency=medium
+
+  * Resolving by skipping the very last standing failing test on s390
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Tue, 26 Apr 2016 21:42:10 -0400
+
+statsmodels (0.6.1-7) unstable; urgency=medium
+
+  * BF: adjusted changeset_3faba6e002641e95a0c6007c826fabb9c423686e.diff to
+    not use kwarg for compat with elderly pandas. Should resolve FTBFS on
+    many platforms still carrying elderly pandas
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Tue, 26 Apr 2016 08:42:12 -0400
+
+statsmodels (0.6.1-6) unstable; urgency=medium
+
+  * debian/patches
+    - picked up a set of patches to hopefully mitigate compatibility issues
+      with elderly pandas available on some platforms
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Mon, 25 Apr 2016 18:32:29 -0400
+
+statsmodels (0.6.1-5) unstable; urgency=medium
+
+  * Fixes for compatibility with recent numpy and pandas
+    (Closes: #807025, #659405)
+  * examples/ were moved out of the module, so now they get manually installed
+    under /usr/share/doc/python-statsmodels/examples (Closes: #752977)
+  * debian/control
+    - policy boosted to 3.9.7
+    - removed obsolete transitional package python-scikits.statsmodels
+  * debian/watch
+    - fixed to use github.com tags directly
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Sun, 24 Apr 2016 18:55:01 -0400
+
+statsmodels (0.6.1-4) unstable; urgency=medium
+
+  * Move ipython-notebook and zmq to build-depends-indep since needed only for
+    documentation building
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Wed, 20 May 2015 17:29:08 -0400
+
+statsmodels (0.6.1-3) unstable; urgency=medium
+
+  * upload to unstable -- jessie is out
+  * debian/control
+    - raised minimal cython version to be used to 0.19
+    - provide Build-Depends-Indep to separate handling for building
+      binary-indep packages, and allow pandoc instead of nodejs
+      for extra robustness (thanks Edmund for the hint) (Closes: #770631)
+  * debian/{control,rules}
+    - Recommend libjs-mathjax and refer to locally installed MathJax.js
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Sun, 17 May 2015 21:12:33 -0400
+
+statsmodels (0.6.1-1) experimental; urgency=medium
+
+  * New upstream release
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Wed, 03 Dec 2014 11:06:18 -0500
+
+statsmodels (0.6.0~rc2-1) unstable; urgency=medium
+
+  * Upstream release candidate
+  * debian/patches
+    - changeset_ee75d978ec4c46b506b5429d4f65fdf38866ec4d.diff redone into
+      deb_use_internal_ipythonsphinx_extensions to facilate building
+      documentation on older systems
+    - up_explicit_path_to_nbgenerate to provide explict path to notebooks
+  * debian/rules
+    - clean up cythonize.dat
+  * debian/control
+    - nodejs was added to build-depends (neccessary for docs building)
+    - boost policy to 3.9.6 (no changes)
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Wed, 22 Oct 2014 19:32:58 -0400
+
+statsmodels (0.5.0+git13-g8e07d34-2) unstable; urgency=medium
+
+  * debian/patches
+    - changeset_ee75d978ec4c46b506b5429d4f65fdf38866ec4d.diff
+      to resolve FTBFS by using packaged ipython provided
+      extensions (Closes: #753232)
+    - up_reduce_test_precision to resolve failing
+      TestRegressionNM.test_ci_beta2 test on 32bit
+  * debian/control
+    - suggest -doc package (Closes: #740348)
+  * debian/rules
+    - exclude testing of the sandbox (let kids do wild things there and
+      mentors keep their hair) -- otherwise test break due to scipy 0.14.0 API
+      breakage (f_gen)
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Wed, 16 Jul 2014 12:03:55 -0400
+
+statsmodels (0.5.0+git13-g8e07d34-1) unstable; urgency=low
+
+  * Fresh snapshot of 0.5.x maintenance branch
+    - resolved failing test causing to FTBFS (Closes: #730727)
+  * debian/control
+    - python-cvxopt added to Build-Depends (testing) and Recommends
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Thu, 28 Nov 2013 20:17:42 -0500
+
+statsmodels (0.5.0-1) unstable; urgency=low
+
+  * Fresh upstream release
+  * debian/rules
+    - assure having $HOME for clean and build operations to avoid crash of
+      matplotlib
+  * debian/control, debian/rules
+    - boost required ipython to 0.13.1 for building documentation
+    - add python-zmq explicitly to build-depends for correct IPython
+      operation
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Thu, 15 Aug 2013 23:45:31 -0400
+
+statsmodels (0.5.0~rc1-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot from v0.4.3-1962-g13bbf88 at v0.4.3-1962-
+    g13bbf88
+    - depends on patsy
+  * debian/control
+    - requires ipython-notebook for building documentation
+      (Build-Depends adjusted)
+    - build for Python >= 2.7 due to absent python 2.6 build of pandas
+      for wheezy (debian/pyversions removed, use field X-Python-Version) now
+      instead
+    - boosted policy to 3.9.4 (no further changes)
+  * debian/copyright
+    - years adjusted
+  * debian/rules
+    - migrate to dh_python2 from dh_pysupport
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Thu, 01 Aug 2013 09:42:43 -0400
+
+statsmodels (0.4.2-1) unstable; urgency=low
+
+  * Fresh upstream release addressing FTBFS across big-endian architectures.
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Fri, 29 Jun 2012 17:26:36 -0400
+
+statsmodels (0.4.1-1) unstable; urgency=low
+
+  * Fresh upstream release
+    - dropped up_versioncomparison_with_rc
+    - require Python >= 2.6
+  * Do fail if unittests fail
+  * Added joblib to build-depends since seems could be used during tests
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Fri, 15 Jun 2012 17:57:17 -0400
+
+statsmodels (0.4.0-2) unstable; urgency=low
+
+  * Removed python-rpy from Recommends to avoid pulling Rtillery with
+    with the default installation of statsmodels and pandas, since rpy apparently
+    is mentioned only in some legacy code
+  * Added patch up_versioncomparison_with_rc to "cherry-pick" 45ee896 for
+    robust version comparison with rc versions of numpy/scipy
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Sun, 13 May 2012 20:40:37 -0400
+
+statsmodels (0.4.0-1) unstable; urgency=low
+
+  * Fresh upstream release
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Tue, 01 May 2012 09:34:58 -0400
+
+statsmodels (0.4.0~rc2+git6-g756f2d0-1) experimental; urgency=low
+
+  * Fresh upstream pre-release
+    - all patches dropped (upstreamed)
+    - scikits. name space is getting deprecated:
+      - python-scikits.statsmodels is provided to ease code transition
+      - python-statsmodels-doc replaces python-scikits.statsmodels-doc
+    - python-statsmodels-lib is introduced to carry arch-dependent
+      extensions
+  * debian/copyright:
+    - entry for statsmodels/stats/libqsturng
+  * debian/watch:
+    - use githubredir.debian.net
+  * debian/{rules,control}
+    - rule cythonize to (re-)cythonize .pyx files so they could be
+      built on older releases
+    - use custom IPython01x available from NeuroDebian on older releases
+      to build documentation
+    - build-depend on python-all-dev now to build extensions
+    - recommend python-joblib
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Wed, 11 Apr 2012 08:30:50 -0400
+
+statsmodels (0.3.1-4) unstable; urgency=low
+
+  * Added patch from Ubuntu: fix_test_discrete.patch.  Thanks Michael Terry for
+    the patch and Gregor Herrmann for the reminder (Closes: #663986, #648845)
+  * upon clean -- remove autogenerated version.py
+  * debian/copyright: adjusted for DEP-5
+  * debian/control: boosted policy to 3.9.3 (no changes)
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Thu, 29 Mar 2012 12:44:27 -0400
+
+statsmodels (0.3.1-3) unstable; urgency=low
+
+  * Few bugfixes:
+    - up_broken_imports
+    - up_doc_fixes
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Sat, 21 Jan 2012 12:07:54 -0500
+
+statsmodels (0.3.1-2) unstable; urgency=low
+
+  * debian/copyright: extended list of copyrights/licenses. Thanks to
+    Luca Falavigna for the thorough review
+  * debian/rules: remove shipped COPYING files due to duplication of
+    debian/copyright
+  * Initial release -- upload to Debian (Closes: #570604)
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Thu, 25 Aug 2011 23:23:37 +0200
+
+statsmodels (0.3.1-1) UNRELEASED; urgency=low
+
+  * Added get-orig-source rule to fetch from github using uscan
+  * Upload to Debian was rejected
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Wed, 24 Aug 2011 23:14:01 +0200
+
+statsmodels (0.3.0-1) neurodebian; urgency=low
+
+  * Upstream release -- upload to Debian proper is pending the removal of
+    WFS dataset (research only restriction)
+  * debian/copyright: expanded to mention copyrights for the included
+    datasets, adjusted BSD-3 license text to use project's name instead
+    of "stock" regents.
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Tue, 19 Jul 2011 22:40:18 -0400
+
+statsmodels (0.3.0~rc2+4-gc78fbe1-1) UNRELEASED; urgency=low
+
+  * Upstream snapshot post RC2:
+    - upstream moved to GIT, Debian packaging repository reinitilized
+      borrowing debian/ branch from previous one (git-bzr imported)
+  * debian/control: boosted policy to 3.9.2 -- no changes
+  * debian/watch: fetch from github
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Thu, 07 Jul 2011 22:43:21 -0400
+
+statsmodels (0.3.0~bzr20110330-1) neurodebian; urgency=low
+
+  * Fresh snapshot of BZR 0.3-devel series
+  * Initial upload to Debian was rejected due to data licensing issues
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Tue, 29 Mar 2011 17:48:04 -0400
+
+statsmodels (0.2.0+bzr1990-1) neurodebian; urgency=low
+
+  * Initial release -- rejected due to full list of copyrights
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Thu, 06 May 2010 23:02:18 -0400
diff --git a/control b/control
new file mode 100644 (file)
index 0000000..aae7512
--- /dev/null
+++ b/control
@@ -0,0 +1,121 @@
+Source: statsmodels
+Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
+Uploaders: Yaroslav Halchenko <debian@onerussian.com>,
+           Michael Hanke <michael.hanke@gmail.com>,
+           Diane Trout <diane@ghic.org>,
+           Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Section: python
+Priority: optional
+Build-Depends: debhelper-compat (= 12),
+               sphinx-common,
+               dh-python (>= 3.20180313~),
+               cython3,
+               python3-all-dev,
+               python3-colorama <!nocheck> <!nodoc>,
+               python3-dateutil <!nocheck> <!nodoc>,
+               python3-cvxopt <!nocheck> <!nodoc>,
+               python3-matplotlib,
+               python3-numpy,
+               python3-nose <!nocheck>,
+               python3-pytest <!nocheck>,
+               python3-pandas,
+               python3-patsy <!nocheck> <!nodoc>,
+               python3-scipy,
+               python3-setuptools,
+               python3-tk <!nocheck> <!nodoc>,
+               python3-joblib <!nocheck> <!nodoc>
+Build-Depends-Indep: ipython3 (>= 5~) <!nodoc> | ipython3-notebook <!nodoc>,
+                     python3-nbconvert <!nodoc>,
+                     python3-jupyter-client <!nodoc>,
+                     python3-ipykernel <!nodoc>,
+                     python3-numpydoc <!nodoc>,
+                     python3-sphinx <!nodoc>,
+                     python3-traitlets <!nodoc> | ipython3-notebook <!nodoc>,
+                     jdupes <!nodoc>,
+# for intersphinx inventories
+                     python-numpy-doc <!nodoc>,
+                     python-patsy-doc <!nodoc>,
+                     python-pandas-doc <!nodoc>,
+                     python3-doc <!nodoc>,
+# for the comparing-with-R examples, and example datasets
+                     r-base-core <!nodoc>,
+                     python3-rpy2 <!nodoc>,
+                     r-cran-cardata <!nodoc>,
+                     r-cran-geepack <!nodoc>,
+                     r-cran-guerry <!nodoc>,
+                     r-cran-lme4 <!nodoc>,
+                     r-cran-mass <!nodoc>,
+                     r-cran-robustbase <!nodoc>,
+                     r-cran-vcd <!nodoc>,
+                     pandoc <!nodoc>
+Standards-Version: 4.5.0
+Rules-Requires-Root: no
+Vcs-Browser: https://salsa.debian.org/science-team/statsmodels
+Vcs-Git: https://salsa.debian.org/science-team/statsmodels.git
+Homepage: https://www.statsmodels.org
+
+Package: python-statsmodels-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends},
+         ${sphinxdoc:Depends},
+         libjs-requirejs,
+         libjs-mathjax
+Suggests: python3-statsmodels,
+          python3-doc,
+          python-numpy-doc,
+          python-patsy-doc,
+          python-pandas-doc,
+          python-scipy-doc
+Breaks: python-scikits-statsmodels-doc,
+        python-scikits.statsmodels-doc,
+        python-statsmodels (<< 0.9.0-3~)
+Replaces: python-scikits-statsmodels-doc,
+          python-scikits.statsmodels-doc,
+          python-statsmodels (<< 0.9.0-3~)
+Description: documentation and examples for statsmodels
+ Statsmodels Python modules are providing classes and functions for
+ the estimation of several categories of statistical models. These
+ currently include linear regression models, OLS, GLS, WLS and GLS
+ with AR(p) errors, generalized linear models for several distribution
+ families and M-estimators for robust linear models. An extensive list
+ of result statistics are available for each estimation problem.
+ .
+ This package contains HTML documentation and example scripts for
+ python-statsmodels.
+
+Package: python3-statsmodels
+Architecture: all
+Depends: ${misc:Depends},
+         ${python3:Depends},
+         python3-numpy,
+         python3-scipy,
+         python3-statsmodels-lib (>= ${source:Version}),
+         python3-patsy,
+         python3-pandas
+Recommends: python3-matplotlib,
+            python3-joblib,
+            python3-colorama,
+            python3-cvxopt
+Suggests: python-statsmodels-doc
+Provides: ${python3:Provides}
+Description: Python3 module for the estimation of statistical models
+ statsmodels Python3 module provides classes and functions for the
+ estimation of several categories of statistical models. These
+ currently include linear regression models, OLS, GLS, WLS and GLS
+ with AR(p) errors, generalized linear models for several distribution
+ families and M-estimators for robust linear models. An extensive list
+ of result statistics are available for each estimation problem.
+
+Package: python3-statsmodels-lib
+Architecture: any
+Multi-Arch: same
+Depends: ${misc:Depends},
+         ${python3:Depends},
+         ${shlibs:Depends},
+         python3-numpy
+Description: Python3 low-level implementations and bindings for statsmodels
+ Statsmodels is a Python module for the estimation of statistical models.
+ .
+ This package contains internal libraries for python3-statsmodels.  Users
+ should not need to install it directly.
diff --git a/copyright b/copyright
new file mode 100644 (file)
index 0000000..e713fd2
--- /dev/null
+++ b/copyright
@@ -0,0 +1,252 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: statsmodels
+Upstream-Contact: pystatsmodels@googlegroups.com
+Source: https://github.com/statsmodels/statsmodels
+
+Files: *
+Copyright: 2006, Jonathan E. Taylor
+           2006-2008, Scipy Developers.
+           2009-2019, Statsmodels Developers.
+License: BSD-3
+
+Files: docs/source/_static/facebox.js
+Copyright: 2007, 2008 Chris Wanstrath <chris@ozmm.org>
+License: MIT
+
+Files: statsmodels/graphics/tsaplots.py
+       statsmodels/sandbox/tsa/example_arma.py
+Copyright: 2002-2012, John D. Hunter and Matplotlib contributors
+           2009-2019, Statsmodels Developers
+License: BSD-3 and matplotlib
+
+Files: docs/sphinxext/*
+Copyright: 2008 Stefan van der Walt <stefan@mentat.za.net>, Pauli Virtanen <pav@iki.fi>
+License: MIT
+
+Files: docs/sphinxext/github.py
+Copyright: 2010 Doug Hellmann
+License: BSD-3
+
+Files: docs/themes/statsmodels/static/nature.css_t
+Copyright: 2007-11 Sphinx Team
+Comment: for a full list, see AUTHORS in the sphinx source package
+License: BSD-2
+
+Files: setup.py
+Copyright: 2009-2012, Brian Granger, Min Ragan-Kelley (from pyzmq)
+           2004 Infrae (from lxml)
+           2008-2013, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
+           2009-2019, Statsmodels Developers
+License: BSD-3
+
+Files: statsmodels/compat/numpy.py
+Copyright: 2005-2015 NumPy Developers
+License: BSD-3
+
+Files: statsmodels/datasets/*
+Copyright: 2007, David Cournapeau <cournape@gmail.com>
+License: BSD-3
+Comment: concerns code parts, corresponding data files license terms
+         described below
+
+Files: statsmodels/datasets/utils.py
+Copyright: 2007-2010, Scikit-Learn Developers
+           2009-2018, Statsmodels Developers
+License: BSD-3
+
+Files: statsmodels/datasets/anes96/anes96.csv
+       statsmodels/datasets/grunfeld/grunfeld.csv
+       statsmodels/datasets/longley/longley.csv
+       statsmodels/datasets/macrodata/macrodata.csv
+       statsmodels/datasets/nile/nile.csv
+       statsmodels/datasets/randhie/randhie.csv
+       statsmodels/datasets/stackloss/stackloss.csv
+       statsmodels/datasets/strikes/strikes.csv
+       statsmodels/datasets/sunspots/sunspots.csv
+Copyright: N/A
+License: public-domain
+
+Files: statsmodels/datasets/ccard/ccard.csv
+Copyright: William Greene
+License: BSD-3
+Comment: Used with express permission of the original author, who retains all rights
+
+Files: statsmodels/datasets/committee/committee.csv
+       statsmodels/datasets/copper/copper.csv
+       statsmodels/datasets/cpunish/cpunish.csv
+       statsmodels/datasets/scotland/scotvote.csv
+       statsmodels/datasets/star98/star98.csv
+Copyright: Jeff Gill
+License: BSD-3
+Comment: Used with express permission of the original author, who retains all rights
+
+Files: statsmodels/datasets/spector/spector.csv
+Copyright: Lee Spector
+License: BSD-3
+Comment: Used with express permission of the original author, who retains all rights
+
+Files: statsmodels/iolib/*
+Copyright: 2007, Joe Presbrey <presbrey@mit.edu>
+           2009-2019, Statsmodels Developers
+License: MIT and BSD-3
+
+Files: statsmodels/sandbox/pca.py
+Copyright: 2008 Erik Tollerud <etolleru@uci.edu>
+License: BSD-3
+
+Files: statsmodels/sandbox/tsa/diffusion2.py
+Copyright: 2008, Attilio Meucci
+License: BSD-2
+
+Files: statsmodels/stats/libqsturng/*
+Copyright: 2011, Roger Lew
+License: BSD-3
+
+Files: debian/*
+Copyright: 2010-2017, Yaroslav Halchenko <debian@onerussian.com>
+           2017-2019 Debian Science Team
+License: BSD-3
+
+Files: debian/datasets/Rdatasets.R
+       debian/datasets/rst.sh
+Copyright: 2012-2019 Vincent Arel-Bundock and contributors
+License: GPL-3
+Comment: from https://vincentarelbundock.github.io/Rdatasets with some changes
+
+
+License: BSD-2
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ .
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the distribution
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+License: BSD-3
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+   a. Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+   b. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+   c. Neither the name of Statsmodels nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+ .
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL STATSMODELS OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ DAMAGE.
+Comment: the parts copied from other packages replace the name "Statsmodels" with "the NumPy Developers", "the Enthought" (scipy), "the copyright holder" (pandas) or "the Scikit-learn Developers ".
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+ .
+ Except as contained in this notice, the name(s) of the above
+ copyright holders shall not be used in advertising or otherwise
+ to promote the sale, use or other dealings in this Software
+ without prior written authorization.
+
+License: matplotlib
+ LICENSE AGREEMENT FOR MATPLOTLIB %(version)s
+ --------------------------------------
+ .
+ 1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and the
+ Individual or Organization ("Licensee") accessing and otherwise using
+ matplotlib software in source or binary form and its associated
+ documentation.
+ .
+ 2. Subject to the terms and conditions of this License Agreement, JDH
+ hereby grants Licensee a nonexclusive, royalty-free, world-wide license
+ to reproduce, analyze, test, perform and/or display publicly, prepare
+ derivative works, distribute, and otherwise use matplotlib %(version)s
+ alone or in any derivative version, provided, however, that JDH's
+ License Agreement and JDH's notice of copyright, i.e., "Copyright (c)
+ 2002-%(year)d John D. Hunter; All Rights Reserved" are retained in
+ matplotlib %(version)s alone or in any derivative version prepared by
+ Licensee.
+ .
+ 3. In the event Licensee prepares a derivative work that is based on or
+ incorporates matplotlib %(version)s or any part thereof, and wants to
+ make the derivative work available to others as provided herein, then
+ Licensee hereby agrees to include in any such work a brief summary of
+ the changes made to matplotlib %(version)s.
+ .
+ 4. JDH is making matplotlib %(version)s available to Licensee on an "AS
+ IS" basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND
+ DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB %(version)s
+ WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
+ .
+ 5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB
+ %(version)s FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
+ LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING
+ MATPLOTLIB %(version)s, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF
+ THE POSSIBILITY THEREOF.
+ .
+ 6. This License Agreement will automatically terminate upon a material
+ breach of its terms and conditions.
+ .
+ 7. Nothing in this License Agreement shall be deemed to create any
+ relationship of agency, partnership, or joint venture between JDH and
+ Licensee. This License Agreement does not grant permission to use JDH
+ trademarks or trade name in a trademark sense to endorse or promote
+ products or services of Licensee, or any third party.
+ .
+ 8. By copying, installing or otherwise using matplotlib %(version)s,
+ Licensee agrees to be bound by the terms and conditions of this License
+ Agreement.
+
+License: public-domain
+  The copyright statements for the datasets are attached to the individual
+ datasets, most datasets are in public domain, and we[statsmodels] don't claim any copyright
+ on any of them.
+Comment: the above is from COPYRIGHTS.txt; factual data may also be inherently uncopyrightable
+
+License: GPL-3
+ see /usr/share/common-licenses/GPL-3
diff --git a/datasets/Rdatasets.R b/datasets/Rdatasets.R
new file mode 100644 (file)
index 0000000..ae25f99
--- /dev/null
@@ -0,0 +1,124 @@
+# Originally from https://github.com/vincentarelbundock/Rdatasets/blob/master/Rdatasets.R
+# License: GPL-3
+# Modified to remove not-in-Debian dependencies --  Rebecca Palmer
+can_do_index=require(R2HTML)
+
+# Data packages
+packages = c("boot", "car", "carData", "cluster", "COUNT", "DAAG", "datasets", 
+             "drc", "Ecdat", "evir", "forecast", "fpp2", "gamclass", "gap", 
+             "geepack", "ggplot2", "Guerry", "HSAUR", "hwde", "ISLR", "KMsurv", 
+             "lattice", "lme4", "lmec", "MASS", "mediation", "mi", "mosaicData", 
+             "multgee", "plm", "plyr", "pscl", "psych", "quantreg", "reshape2", 
+             "robustbase", "rpart", "sandwich", "sem", "Stat2Data", "survival", 
+             "texmex", "vcd", "Zelig", "purrr")
+for(package in packages) {
+    require(package, character.only=TRUE)
+}
+
+# Functions
+get_doc = function(package = 'mi', dataset = 'nlsyV') {
+    help.ref = try(help(eval(dataset), package=eval(package)), silent = TRUE)
+    out = try(utils:::.getHelpFile(help.ref), silent = TRUE)
+    return(out)
+}
+
+get_data = function(package = 'mi', dataset = 'nlsyV') {
+    e = new.env(hash = TRUE, parent = parent.frame(), size = 29L)
+    data(list = dataset, package = package, envir = e)
+    out = e[[dataset]]
+    return(out)
+}
+
+tidy_data = function(dat) {
+    if(class(dat)[1]=='ts'){
+        dat = try(data.frame('time' = time(dat), 'value' = dat), silent = TRUE)
+    } else {
+        dat = try(as.data.frame(dat), silent = TRUE)
+    }
+    if (class(dat)[1] == 'data.frame') {
+        out = dat
+    } else {
+        out = NA
+        class(out) = 'try-error'
+    }
+    return(out)
+}
+
+write_data = function(i) {
+    package = index$Package[i]
+    dataset = index$Item[i]
+    dat = data[[i]]
+    doc = docs[[i]]
+    cat(package, ' -- ', dataset, '\n')
+    try(dir.create('csv'), silent = TRUE)
+    try(dir.create('doc'), silent = TRUE)
+    try(dir.create(paste0('csv/', package)), silent = TRUE)
+    try(dir.create(paste0('doc/', package)), silent = TRUE)
+    fn_csv = paste0('csv/', package, '/', dataset, '.csv')
+    fn_doc = paste0('doc/', package, '/', dataset, '.html')
+    write.csv(data[[i]], file = fn_csv)
+    tools::Rd2HTML(docs[[i]], out = fn_doc)
+}
+
+# Index
+index = data(package=packages)$results[,c(1,3,4)]
+index = data.frame(index, stringsAsFactors=FALSE)
+
+# Extract Data and Docs and exclude non-data.frames and errors
+data = lapply(1:nrow(index), function(i) get_data(index$Package[i], index$Item[i]))
+docs = lapply(1:nrow(index), function(i) get_doc(index$Package[i], index$Item[i]))
+data = lapply(data, tidy_data)
+idx1 = sapply(docs, class) != 'try-error'
+idx2 = sapply(data, class) != 'try-error'
+idx = as.logical(pmin(idx1, idx2))
+data = data[idx]
+docs = docs[idx]
+index = index[idx,]
+
+# remap names to what statsmodels expects
+index$Package[index$Package == "Guerry"] <- "HistData" # the dataset we want is in both
+
+# Write to file
+for (i in 1:nrow(index)) {
+    write_data(i)
+}
+
+# Index
+is.binary <- function(x) {
+    tryCatch(length(unique(na.omit(x))) == 2, 
+             error = function(e) FALSE, silent = TRUE)
+}
+index$Rows = sapply(data, nrow)
+index$Cols = sapply(data, ncol)
+index$n_binary <- sapply(data, function(x) sum(sapply(x, is.binary)))
+index$n_character <- sapply(data, function(x) sum(sapply(x, is.character)))
+index$n_factor <- sapply(data, function(x) sum(sapply(x, is.factor)))
+index$n_logical <- sapply(data, function(x) sum(sapply(x, is.logical)))
+index$n_numeric <- sapply(data, function(x) sum(sapply(x, is.numeric)))
+
+index$CSV = paste('https://raw.github.com/vincentarelbundock/Rdatasets/master/csv/',
+                  index$Package, '/', index$Item, '.csv', sep='')
+index$Doc = paste('https://raw.github.com/vincentarelbundock/Rdatasets/master/doc/',
+                  index$Package, '/', index$Item, '.html', sep='')
+index = index[order(index$Package, index$Item),]
+
+# Index CSV
+write.csv(index, file = 'datasets.csv', row.names = FALSE)
+
+if (!can_do_index){
+    print("Can't create the HTML index, as R2HTML is not installed")
+    q()
+}
+# Index HTML
+index$CSV = paste("<a href='", index$CSV, "'> CSV </a>", sep='')
+index$Doc = paste("<a href='", index$Doc, "'> DOC </a>", sep='')
+unlink('datasets.html')
+rss = '
+<style type="text/css">
+  tr:nth-child(even){
+          background-color: #E5E7E5;
+  }
+</style>
+'
+cat(rss, file='datasets.html')
+HTML(index, file='datasets.html', row.names=FALSE, append=TRUE)
diff --git a/datasets/prepopulate_cache.py b/datasets/prepopulate_cache.py
new file mode 100755 (executable)
index 0000000..a99d91d
--- /dev/null
@@ -0,0 +1,40 @@
+#!/usr/bin/python3
+
+"""Place data from R into the statsmodels cache, as Debian does not allow Internet access during builds"""
+
+import os
+import subprocess
+import glob
+import pickle
+import zlib
+
+buildroot_directory = os.getcwd()
+Rtmp_directory = buildroot_directory + '/build/Rtmp'
+target_directory = buildroot_directory + '/build/datacache'
+os.makedirs(target_directory)
+os.makedirs(Rtmp_directory)
+
+# R packages (datasets) used:
+# car (Duncan, Moore) # now split off as carData
+# COUNT (medpar) # not in Debian, use removed by use_available_data.patch
+# geepack (dietox)
+# HistData (Guerry) # not in Debian, but Guerry is and has the same dataset
+# MASS (epil, Sitka)
+# robustbase (starsCYG)
+# vcd (Arthritis, VisualAcuity)
+
+# duration.rst would use survival (flchain) but that example isn't run during build
+
+# R-using examples use lme4, geepack, robustbase
+
+subprocess.run(['R', 'CMD', 'BATCH', buildroot_directory + '/debian/datasets/Rdatasets.R'], cwd=Rtmp_directory, check=True)
+subprocess.run([buildroot_directory + '/debian/datasets/rst.sh'], cwd=Rtmp_directory + '/doc', check=True)
+
+for fname_in in glob.glob(Rtmp_directory + '/**/*', recursive=True):
+    if os.path.isfile(fname_in):
+        with open(fname_in,'rb') as fd:
+            data = fd.read()
+        fname_out = target_directory + '/raw.githubusercontent.com,vincentarelbundock,Rdatasets,master,' + os.path.relpath('-v2.'.join(fname_in.rsplit('.',1)), start=Rtmp_directory).replace('/',',') + '.zip'
+        data2 = zlib.compress(data)
+        with open(fname_out, 'wb') as fd:
+            fd.write(data2)
diff --git a/datasets/rst.sh b/datasets/rst.sh
new file mode 100755 (executable)
index 0000000..bc73858
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+# IMPORTANT: Run from inside the "doc" directory
+
+# create rst directories if they do not exist
+for d in $(find . -maxdepth 1 -type d)
+do
+    mkdir "$d/rst"
+done
+
+# use pandoc to convert html to rst
+for f in $(find . -name '*.html')
+do
+    old=$(basename -- "$f")
+    new=$"`basename "$f" .html`.rst"
+    dir=$(dirname -- "$f")
+    echo "$f"
+    pandoc -o $dir/rst/$base$new $f 
+done
diff --git a/docs b/docs
new file mode 100644 (file)
index 0000000..07e0db4
--- /dev/null
+++ b/docs
@@ -0,0 +1 @@
+README.*
diff --git a/gbp.conf b/gbp.conf
new file mode 100644 (file)
index 0000000..f28b200
--- /dev/null
+++ b/gbp.conf
@@ -0,0 +1,8 @@
+[DEFAULT]
+# the default branch for upstream sources:
+upstream-branch = master
+# the default branch for the debian patch:
+debian-branch = debian
+# the default tag formats used:
+upstream-vcs-tag = v%(version)s
+debian-tag = debian/%(version)s
diff --git a/patches/944054_flaky_tests.patch b/patches/944054_flaky_tests.patch
new file mode 100644 (file)
index 0000000..b7ecefb
--- /dev/null
@@ -0,0 +1,54 @@
+Description: Xfail or loosen tolerances on flaky tests
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>, Graham Inggs
+Bug-Debian: https://bugs.debian.org/944054
+Forwarded: partially https://github.com/statsmodels/statsmodels/pull/6222
+
+--- statsmodels-0.10.1.orig/statsmodels/base/tests/test_penalized.py
++++ statsmodels-0.10.1/statsmodels/base/tests/test_penalized.py
+@@ -312,6 +312,7 @@ class TestPenalizedPoissonOraclePenalize
+         cls.atol = 1e-3
++@pytest.mark.xfail(reason="flaky convergence, https://bugs.debian.org/944054")
+ class TestPenalizedPoissonOraclePenalized2(CheckPenalizedPoisson):
+     @classmethod
+@@ -340,6 +341,7 @@ class TestPenalizedPoissonOraclePenalize
+         assert_equal(self.res1.bse[self.k_nonzero:], 0)
++@pytest.mark.xfail(reason="flaky convergence, https://bugs.debian.org/944054")
+ class TestPenalizedPoissonOraclePenalized2HC(CheckPenalizedPoisson):
+     @classmethod
+--- statsmodels-0.10.1.orig/statsmodels/stats/tests/test_diagnostic.py
++++ statsmodels-0.10.1/statsmodels/stats/tests/test_diagnostic.py
+@@ -470,7 +470,7 @@ class TestDiagnosticG(object):
+         assert_almost_equal(jt1, jtest[0][3:5], decimal=13)
+         jt2 = smsdia.compare_j(res, res2)
+-        assert_almost_equal(jt2, jtest[1][3:5], decimal=14)
++        assert_almost_equal(jt2, jtest[1][3:5], decimal=13)
+         #Estimate        Std. Error  z value   Pr(>|z|)
+         coxtest = [('fitted(M1) ~ M2', -0.782030488930356, 0.599696502782265,
+@@ -479,7 +479,7 @@ class TestDiagnosticG(object):
+                     -5.727181590258883, 1.021128495098556e-08, '***')]
+         ct1 = smsdia.compare_cox(res, res2)
+-        assert_almost_equal(ct1, coxtest[0][3:5], decimal=13)
++        assert_almost_equal(ct1, coxtest[0][3:5], decimal=12)
+         ct2 = smsdia.compare_cox(res2, res)
+         assert_almost_equal(ct2, coxtest[1][3:5], decimal=12)
+--- statsmodels-0.10.1.orig/statsmodels/tsa/statespace/tests/test_exact_diffuse_filtering.py
++++ statsmodels-0.10.1/statsmodels/tsa/statespace/tests/test_exact_diffuse_filtering.py
+@@ -896,6 +896,7 @@ class TestDFM_Approx(CheckApproximateDif
+     # we can't increase it too much more than this because then we start get
+     # numerical errors (e.g. 1e11 works but 1e12 doesn't pass)
+     approximate_diffuse_variance = 5e10
++    rtol = 1e-6
+ class TestDFM_KFAS(CheckKFASMixin, CheckDFM):
diff --git a/patches/cache_security.patch b/patches/cache_security.patch
new file mode 100644 (file)
index 0000000..fb73692
--- /dev/null
@@ -0,0 +1,43 @@
+Description: Warn that load_pickle() etc are for trusted data only
+
+https://docs.python.org/3/library/pickle.html#restricting-globals
+
+Author: Rebecca N. Palmer
+Forwarded: https://github.com/statsmodels/statsmodels/pull/6162
+
+--- a/statsmodels/base/model.py
++++ b/statsmodels/base/model.py
+@@ -2074,7 +2074,8 @@ class LikelihoodModelResults(Results):
+     @classmethod
+     def load(cls, fname):
+         """
+-        load a pickle, (class method)
++        load a pickle, (class method); use only on trusted files,
++        as unpickling can run arbitrary code.
+         Parameters
+         ----------
+--- a/statsmodels/base/wrapper.py
++++ b/statsmodels/base/wrapper.py
+@@ -73,6 +73,8 @@ class ResultsWrapper(object):
+     @classmethod
+     def load(cls, fname):
++        """Load a pickled instance; use only on trusted files,
++        as unpickling can run arbitrary code."""
+         from statsmodels.iolib.smpickle import load_pickle
+         return load_pickle(fname)
+--- a/statsmodels/iolib/smpickle.py
++++ b/statsmodels/iolib/smpickle.py
+@@ -19,7 +19,9 @@ def save_pickle(obj, fname):
+ def load_pickle(fname):
+     """
+-    Load a previously saved object from file
++    Load a previously saved object; **use only on trusted files**,
++    as unpickling can run arbitrary code.  (i.e. calling this on a
++    malicious file can wipe or take over your system.)
+     Parameters
+     ----------
diff --git a/patches/i386_loosen_test_tolerances.patch b/patches/i386_loosen_test_tolerances.patch
new file mode 100644 (file)
index 0000000..03583a8
--- /dev/null
@@ -0,0 +1,44 @@
+Description: Loosen tolerances on some tests on i386
+
+Failure log
+https://buildd.debian.org/status/fetch.php?pkg=statsmodels&arch=i386&ver=0.9.0-3&stamp=1567157609&raw=0
+
+As it only fails on i386 (not x32) and isn't far over tolerance,
+I suspect different rounding due to x87 excess precision
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Bug-Debian: https://bugs.debian.org/938949
+Forwarded: no
+
+--- a/statsmodels/tsa/statespace/tests/test_smoothing.py
++++ b/statsmodels/tsa/statespace/tests/test_smoothing.py
+@@ -27,8 +27,9 @@ from statsmodels.tsa.statespace.kalman_s
+     SMOOTH_UNIVARIATE)
+ current_path = os.path.dirname(os.path.abspath(__file__))
+-
+-
++import sys
++import glob
++i386_looser_tolerances=len(glob.glob('/usr/lib/i386-*/'))>0 and np.log2(sys.maxsize)<=32
+ class TestStatesAR3(object):
+     @classmethod
+     def setup_class(cls, alternate_timing=False, *args, **kwargs):
+@@ -832,7 +833,7 @@ class TestMultivariateVARUnivariate(obje
+     def test_forecasts_error_cov(self):
+         assert_allclose(
+             self.results.forecasts_error_cov.diagonal(),
+-            self.desired[['F1', 'F2', 'F3']]
++            self.desired[['F1', 'F2', 'F3']],rtol=2e-7 if i386_looser_tolerances else 1e-7
+         )
+     def test_predicted_states(self):
+@@ -886,7 +887,7 @@ class TestMultivariateVARUnivariate(obje
+     def test_smoothed_measurement_disturbance_cov(self):
+         assert_allclose(
+             self.results.smoothed_measurement_disturbance_cov.diagonal(),
+-            self.desired[['Veps1', 'Veps2', 'Veps3']]
++            self.desired[['Veps1', 'Veps2', 'Veps3']],rtol=2e-7 if i386_looser_tolerances else 1e-7
+         )
diff --git a/patches/link_security2.patch b/patches/link_security2.patch
new file mode 100644 (file)
index 0000000..c6ffcd2
--- /dev/null
@@ -0,0 +1,873 @@
+Description: Change some more links to https
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Forwarded: https://github.com/statsmodels/statsmodels/pull/5937
+
+--- a/CONTRIBUTING.rst
++++ b/CONTRIBUTING.rst
+@@ -5,7 +5,7 @@ This page explains how you can contribut
+ by submitting patches, statistical tests, new models, or examples.
+ `statsmodels` is developed on `Github <https://github.com/statsmodels/statsmodels>`_
+-using the `Git <http://git-scm.com/>`_ version control system.
++using the `Git <https://git-scm.com/>`_ version control system.
+ Submitting a Bug Report
+ ~~~~~~~~~~~~~~~~~~~~~~~
+@@ -49,7 +49,7 @@ How to Submit a Pull Request
+ So you want to submit a patch to `statsmodels` but aren't too familiar with github? Here are the steps you need to take.
+ 1. `Fork <https://help.github.com/articles/fork-a-repo>`_ the `statsmodels repository <https://github.com/statsmodels/statsmodels>`_ on Github.
+-2. `Create a new feature branch <http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging>`_. Each branch must be self-contained, with a single new feature or bugfix.
++2. `Create a new feature branch <https://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging>`_. Each branch must be self-contained, with a single new feature or bugfix.
+ 3. Make sure the test suite passes. This includes testing on Python 3. The easiest way to do this is to either enable `Travis-CI <https://travis-ci.org/>`_ on your fork, or to make a pull request and check there.
+ 4. Document your changes by editing the appropriate file in ``docs/source/``. If it is a big, new feature add a note and an example to the latest ``docs/source/release/versionX.X.rst`` file. See older versions for examples. If it's a minor change, it will be included automatically in our relase notes.
+ 5. Add an example. If it is a big, new feature please submit an example notebook by following `these instructions <https://www.statsmodels.org/devel/dev/examples.html>`_.
+@@ -58,7 +58,7 @@ So you want to submit a patch to `statsm
+ Mailing List
+ ~~~~~~~~~~~~
+-Conversations about development take place on the `statsmodels mailing list <http://groups.google.com/group/pystatsmodels?hl=en>`__.
++Conversations about development take place on the `statsmodels mailing list <https://groups.google.com/group/pystatsmodels?hl=en>`__.
+ Learn More
+ ~~~~~~~~~~
+@@ -70,4 +70,4 @@ License
+ ~~~~~~~
+ Statsmodels is released under the
+-`Modified (3-clause) BSD license <http://www.opensource.org/licenses/BSD-3-Clause>`_.
++`Modified (3-clause) BSD license <https://www.opensource.org/licenses/BSD-3-Clause>`_.
+--- a/INSTALL.txt
++++ b/INSTALL.txt
+@@ -23,7 +23,7 @@ patsy >= 0.4.0
+ cython >= 0.24
+-    http://cython.org/
++    https://cython.org/
+     Cython is required if you are building the source from github. However,
+     if you have are building from source distribution archive then the 
+@@ -36,7 +36,7 @@ Optional Dependencies
+ X-12-ARIMA or X-13ARIMA-SEATS
+-    http://www.census.gov/srd/www/x13as/
++    https://www.census.gov/srd/www/x13as/
+     If available, time-series analysis can be conducted using either 
+     X-12-ARIMA or the newer X-13ARIMA-SEATS. You should place the 
+@@ -45,7 +45,7 @@ X-12-ARIMA or X-13ARIMA-SEATS
+ matplotlib >= 1.5
+-    http://matplotlib.org/
++    https://matplotlib.org/
+     Matplotlib is needed for plotting functionality and running many of the 
+     examples.
+@@ -95,7 +95,7 @@ Installing from Source
+ Download and extract the source distribution from PyPI or github
+-    http://pypi.python.org/pypi/statsmodels
++    https://pypi.python.org/pypi/statsmodels
+     https://github.com/statsmodels/statsmodels/tags
+ Or clone the bleeding edge code from our repository on github at
+--- a/README.rst
++++ b/README.rst
+@@ -149,7 +149,7 @@ Discussion and Development
+ Discussions take place on our mailing list.
+-http://groups.google.com/group/pystatsmodels
++https://groups.google.com/group/pystatsmodels
+ We are very interested in feedback about usability and suggestions for
+ improvements.
+--- a/docs/source/_static/mktree.js
++++ b/docs/source/_static/mktree.js
+@@ -4,7 +4,7 @@
+  * Dual licensed under the MIT and GPL licenses.
+  * This basically means you can use this code however you want for
+  * free, but don't claim to have written it yourself!
+- * Donations always accepted: http://www.JavascriptToolbox.com/donate/
++ * Donations always accepted: https://www.JavascriptToolbox.com/donate/
+  *
+  * Please do not link to the .js files on javascripttoolbox.com from
+  * your site. Copy the files locally to your server instead.
+--- a/docs/source/dev/git_notes.rst
++++ b/docs/source/dev/git_notes.rst
+@@ -12,7 +12,7 @@ contribute you will need to `sign up for
+ Version Control and Git
+ -----------------------
+-We use the `Git <http://git-scm.com/>`_ version control system for development.
++We use the `Git <https://git-scm.com/>`_ version control system for development.
+ Git allows many people to work together on the same project.  In a nutshell, it
+ allows you to make changes to the code independent of others who may also be
+ working on the code and allows you to easily contribute your changes to the
+@@ -27,7 +27,7 @@ To learn more about Git, you may want to
+ + `Git documentation (book and videos) <https://git-scm.com/documentation>`_
+ + `Github help pages <https://help.github.com/>`_
+ + `NumPy documentation <https://docs.scipy.org/doc/numpy/dev/index.html>`_
+-+ `Matthew Brett's Pydagogue <http://matthew-brett.github.io/pydagogue/>`_
+++ `Matthew Brett's Pydagogue <https://matthew-brett.github.io/pydagogue/>`_
+ Below, we describe the bare minimum git commands you need to contribute to
+ `statsmodels`.
+@@ -217,7 +217,7 @@ could introduce bugs. However, if you ha
+ be such a concern. One great place to start learning about rebase is
+ :ref:`rebasing without tears <pydagogue:actual-rebase>`.  In particular, `heed
+ the warnings
+-<http://matthew-brett.github.io/pydagogue/rebase_without_tears.html#safety>`__.
++<https://matthew-brett.github.io/pydagogue/rebase_without_tears.html#safety>`__.
+ Namely, **always make a new branch before doing a rebase**. This is good
+ general advice for working with git. I would also add **never use rebase on
+ work that has already been published**. If another developer is using your
+--- a/docs/source/dev/test_notes.rst
++++ b/docs/source/dev/test_notes.rst
+@@ -24,7 +24,7 @@ tests versus an existing statistical pac
+ Introduction to pytest
+ ----------------------
+-Like many packages, statsmodels uses the `pytest testing system <https://docs.pytest.org/en/latest/contents.html>`__ and the convenient extensions in `numpy.testing <http://docs.scipy.org/doc/numpy/reference/routines.testing.html>`__.  Pytest will find any file, directory, function, or class name that starts with ``test`` or ``Test`` (classes only). Test function should start with ``test``, test classes should start with ``Test``. These functions and classes should be placed in files with names beginning with ``test`` in a directory called ``tests``.
++Like many packages, statsmodels uses the `pytest testing system <https://docs.pytest.org/en/latest/contents.html>`__ and the convenient extensions in `numpy.testing <https://docs.scipy.org/doc/numpy/reference/routines.testing.html>`__.  Pytest will find any file, directory, function, or class name that starts with ``test`` or ``Test`` (classes only). Test function should start with ``test``, test classes should start with ``Test``. These functions and classes should be placed in files with names beginning with ``test`` in a directory called ``tests``.
+ .. _run-tests:
+--- a/docs/source/diagnostic.rst
++++ b/docs/source/diagnostic.rst
+@@ -210,7 +210,7 @@ individual outliers and might not be abl
+    - resid_studentized_internal
+    - ess_press
+    - hat_matrix_diag
+-   - cooks_distance - Cook's Distance `Wikipedia <http://en.wikipedia.org/wiki/Cook%27s_distance>`_ (with some other links)
++   - cooks_distance - Cook's Distance `Wikipedia <https://en.wikipedia.org/wiki/Cook%27s_distance>`_ (with some other links)
+    - cov_ratio
+    - dfbetas
+    - dffits
+--- a/docs/source/example_formulas.rst
++++ b/docs/source/example_formulas.rst
+@@ -5,13 +5,13 @@ Fitting models using R-style formulas
+ Since version 0.5.0, ``statsmodels`` allows users to fit statistical
+ models using R-style formulas. Internally, ``statsmodels`` uses the
+-`patsy <http://patsy.readthedocs.io/en/latest/>`_ package to convert formulas and
++`patsy <https://patsy.readthedocs.io/en/latest/>`_ package to convert formulas and
+ data to the matrices that are used in model fitting. The formula
+ framework is quite powerful; this tutorial only scratches the surface. A
+ full description of the formula language can be found in the ``patsy``
+ docs:
+--  `Patsy formula language description <http://patsy.readthedocs.io/en/latest/>`_
++-  `Patsy formula language description <https://patsy.readthedocs.io/en/latest/>`_
+ Loading modules and functions
+ -----------------------------
+@@ -31,7 +31,7 @@ counterparts for most of these models. I
+ accept ``formula`` and ``df`` arguments, whereas upper case ones take
+ ``endog`` and ``exog`` design matrices. ``formula`` accepts a string
+ which describes the model in terms of a ``patsy`` formula. ``df`` takes
+-a `pandas <http://pandas.pydata.org/>`_ data frame.
++a `pandas <https://pandas.pydata.org/>`_ data frame.
+ ``dir(smf)`` will print a list of available models.
+@@ -145,7 +145,7 @@ Define a custom function:
+ Namespaces
+ ----------
+-Notice that all of the above examples use the calling namespace to look for the functions to apply. The namespace used can be controlled via the ``eval_env`` keyword. For example, you may want to give a custom namespace using the :class:`patsy:patsy.EvalEnvironment` or you may want to use a "clean" namespace, which we provide by passing ``eval_func=-1``. The default is to use the caller's namespace. This can have (un)expected consequences, if, for example, someone has a variable names ``C`` in the user namespace or in their data structure passed to ``patsy``, and ``C`` is used in the formula to handle a categorical variable. See the `Patsy API Reference <http://patsy.readthedocs.io/en/latest/API-reference.html>`_ for more information.
++Notice that all of the above examples use the calling namespace to look for the functions to apply. The namespace used can be controlled via the ``eval_env`` keyword. For example, you may want to give a custom namespace using the :class:`patsy:patsy.EvalEnvironment` or you may want to use a "clean" namespace, which we provide by passing ``eval_func=-1``. The default is to use the caller's namespace. This can have (un)expected consequences, if, for example, someone has a variable names ``C`` in the user namespace or in their data structure passed to ``patsy``, and ``C`` is used in the formula to handle a categorical variable. See the `Patsy API Reference <https://patsy.readthedocs.io/en/latest/API-reference.html>`_ for more information.
+ Using formulas with models that do not (yet) support them
+ ---------------------------------------------------------
+--- a/docs/source/gettingstarted.rst
++++ b/docs/source/gettingstarted.rst
+@@ -20,7 +20,7 @@ few modules and functions:
+     import pandas
+     from patsy import dmatrices
+-`pandas <http://pandas.pydata.org/>`_ builds on ``numpy`` arrays to provide
++`pandas <https://pandas.pydata.org/>`_ builds on ``numpy`` arrays to provide
+ rich data structures and data analysis tools. The ``pandas.DataFrame`` function
+ provides labelled arrays of (potentially heterogenous) data, similar to the
+ ``R`` "data.frame". The ``pandas.read_csv`` function can be used to convert a
+@@ -94,7 +94,7 @@ capita (*Lottery*). :math:`X` is :math:`
+ *Literacy* and *Wealth* variables, and 4 region binary variables.
+ The ``patsy`` module provides a convenient function to prepare design matrices
+-using ``R``-like formulas. You can find more information `here <http://patsy.readthedocs.io/en/latest/>`_.
++using ``R``-like formulas. You can find more information `here <https://patsy.readthedocs.io/en/latest/>`_.
+ We use ``patsy``'s ``dmatrices`` function to create design matrices:
+@@ -116,7 +116,7 @@ Notice that ``dmatrices`` has
+ * returned ``pandas`` DataFrames instead of simple numpy arrays. This is useful because DataFrames allow ``statsmodels`` to carry-over meta-data (e.g. variable names) when reporting results.
+ The above behavior can of course be altered. See the `patsy doc pages
+-<http://patsy.readthedocs.io/en/latest/>`_.
++<https://patsy.readthedocs.io/en/latest/>`_.
+ Model fit and summary
+ ---------------------
+--- a/docs/source/imputation.rst
++++ b/docs/source/imputation.rst
+@@ -48,5 +48,5 @@ Implementation Details
+ ----------------------
+ Internally, this function uses
+-`pandas.isnull <http://pandas.pydata.org/pandas-docs/stable/missing_data.html#working-with-missing-data>`_.
++`pandas.isnull <https://pandas.pydata.org/pandas-docs/stable/missing_data.html#working-with-missing-data>`_.
+ Anything that returns True from this function will be treated as missing data.
+--- a/docs/source/install.rst
++++ b/docs/source/install.rst
+@@ -104,11 +104,11 @@ Dependencies
+ The current minimum dependencies are:
+ * `Python <https://www.python.org>`__ >= 2.7, including Python 3.4+
+-* `NumPy <http://www.scipy.org/>`__ >= 1.11
+-* `SciPy <http://www.scipy.org/>`__ >= 0.18
+-* `Pandas <http://pandas.pydata.org/>`__ >= 0.19
++* `NumPy <https://www.scipy.org/>`__ >= 1.11
++* `SciPy <https://www.scipy.org/>`__ >= 0.18
++* `Pandas <https://pandas.pydata.org/>`__ >= 0.19
+ * `Patsy <https://patsy.readthedocs.io/en/latest/>`__ >= 0.4.0
+-* `Cython <http://cython.org/>`__ >= 0.24 is required to build the code from
++* `Cython <https://cython.org/>`__ >= 0.24 is required to build the code from
+   github but not from a source distribution.
+ Given the long release cycle, Statsmodels follows a loose time-based policy for
+@@ -121,14 +121,14 @@ September 2018, when we will update to r
+ Optional Dependencies
+ ---------------------
+-* `Matplotlib <http://matplotlib.org/>`__ >= 1.5 is needed for plotting
++* `Matplotlib <https://matplotlib.org/>`__ >= 1.5 is needed for plotting
+   functions and running many of the examples.
+-* If installed, `X-12-ARIMA <http://www.census.gov/srd/www/x13as/>`__ or
+-  `X-13ARIMA-SEATS <http://www.census.gov/srd/www/x13as/>`__ can be used
++* If installed, `X-12-ARIMA <https://www.census.gov/srd/www/x13as/>`__ or
++  `X-13ARIMA-SEATS <https://www.census.gov/srd/www/x13as/>`__ can be used
+   for time-series analysis.
+ * `pytest <https://docs.pytest.org/en/latest/>`__ is required to run
+   the test suite.
+-* `IPython <http://ipython.org>`__ >= 3.0 is required to build the
++* `IPython <https://ipython.org>`__ >= 3.0 is required to build the
+   docs locally or to use the notebooks.
+ * `joblib <http://pythonhosted.org/joblib/>`__ >= 0.9 can be used to accelerate distributed
+   estimation for certain models.
+--- a/docs/source/release/version0.5.rst
++++ b/docs/source/release/version0.5.rst
+@@ -69,7 +69,7 @@ It is now possible to fit negative binom
+ l1-penalized Discrete Choice Models
+ -----------------------------------
+-A new optimization method has been added to the discrete models, which includes Logit, Probit, MNLogit and Poisson, that makes it possible to estimate the models with an l1, linear, penalization. This shrinks parameters towards zero and can set parameters that are not very different from zero to zero. This is especially useful if there are a large number of explanatory variables and a large associated number of parameters. `CVXOPT <http://cvxopt.org/>`_ is now an optional dependency that can be used for fitting these models.
++A new optimization method has been added to the discrete models, which includes Logit, Probit, MNLogit and Poisson, that makes it possible to estimate the models with an l1, linear, penalization. This shrinks parameters towards zero and can set parameters that are not very different from zero to zero. This is especially useful if there are a large number of explanatory variables and a large associated number of parameters. `CVXOPT <https://cvxopt.org/>`_ is now an optional dependency that can be used for fitting these models.
+ New and Improved Graphics
+ -------------------------
+--- a/docs/source/sandbox.rst
++++ b/docs/source/sandbox.rst
+@@ -43,7 +43,7 @@ Moving Window Statistics
+ Most moving window statistics, like rolling mean, moments (up to 4th order), min,
+ max, mean, and variance, are covered by the functions for `Moving (rolling)
+-statistics/moments <http://pandas.pydata.org/pandas-docs/stable/computation.html#moving-rolling-statistics-moments>`_ in Pandas.
++statistics/moments <https://pandas.pydata.org/pandas-docs/stable/computation.html#moving-rolling-statistics-moments>`_ in Pandas.
+ .. module:: statsmodels.sandbox.tsa
+    :synopsis: Experimental time-series analysis models
+--- a/docs/source/vector_ar.rst
++++ b/docs/source/vector_ar.rst
+@@ -34,7 +34,7 @@ and their lagged values is the *vector a
+ where :math:`A_i` is a :math:`K \times K` coefficient matrix.
+ We follow in large part the methods and notation of `Lutkepohl (2005)
+-<http://www.springer.com/gb/book/9783540401728>`__,
++<https://www.springer.com/gb/book/9783540401728>`__,
+ which we will not develop here.
+ Model fitting
+--- a/docs/themes/statsmodels/sidelinks.html
++++ b/docs/themes/statsmodels/sidelinks.html
+@@ -1,2 +1,2 @@
+ <p><a href="https://twitter.com/statsmodels">Twitter</a>
+-<a href="http://scipystats.blogspot.com/"><img src="{{ pathto('_static/blogger_sm.png', 1) }}" alt="Blog"></a></p>
++<a href="https://scipystats.blogspot.com/"><img src="{{ pathto('_static/blogger_sm.png', 1) }}" alt="Blog"></a></p>
+--- a/examples/notebooks/formulas.ipynb
++++ b/examples/notebooks/formulas.ipynb
+@@ -114,7 +114,7 @@
+    "cell_type": "markdown",
+    "metadata": {},
+    "source": [
+-    "All of the lower case models accept ``formula`` and ``data`` arguments, whereas upper case ones take ``endog`` and ``exog`` design matrices. ``formula`` accepts a string which describes the model in terms of a ``patsy`` formula. ``data`` takes a [pandas](http://pandas.pydata.org/) data frame or any other data structure that defines a ``__getitem__`` for variable names like a structured array or a dictionary of variables. \n",
++    "All of the lower case models accept ``formula`` and ``data`` arguments, whereas upper case ones take ``endog`` and ``exog`` design matrices. ``formula`` accepts a string which describes the model in terms of a ``patsy`` formula. ``data`` takes a [pandas](https://pandas.pydata.org/) data frame or any other data structure that defines a ``__getitem__`` for variable names like a structured array or a dictionary of variables. \n",
+     "\n",
+     "``dir(sm.formula)`` will print a list of available models. \n",
+     "\n",
+--- a/examples/notebooks/generic_mle.ipynb
++++ b/examples/notebooks/generic_mle.ipynb
+@@ -290,7 +290,7 @@
+     "\n",
+     "The [Medpar](https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/doc/COUNT/medpar.html)\n",
+     "dataset is hosted in CSV format at the [Rdatasets repository](https://raw.githubusercontent.com/vincentarelbundock/Rdatasets). We use the ``read_csv``\n",
+-    "function from the [Pandas library](http://pandas.pydata.org) to load the data\n",
++    "function from the [Pandas library](https://pandas.pydata.org) to load the data\n",
+     "in memory. We then print the first few columns: \n"
+    ]
+   },
+--- a/examples/notebooks/statespace_structural_harvey_jaeger.ipynb
++++ b/examples/notebooks/statespace_structural_harvey_jaeger.ipynb
+@@ -164,7 +164,7 @@
+     "\n",
+     "The time frame in the original paper varied across series, but was broadly 1954-1989. Below we use data from the period 1948-2008 for all series. Although the unobserved components approach allows isolating a seasonal component within the model, the series considered in the paper, and here, are already seasonally adjusted.\n",
+     "\n",
+-    "All data series considered here are taken from [Federal Reserve Economic Data (FRED)](https://research.stlouisfed.org/fred2/). Conveniently, the Python library [Pandas](http://pandas.pydata.org/) has the ability to download data from FRED directly."
++    "All data series considered here are taken from [Federal Reserve Economic Data (FRED)](https://research.stlouisfed.org/fred2/). Conveniently, the Python library [Pandas](https://pandas.pydata.org/) has the ability to download data from FRED directly."
+    ]
+   },
+   {
+--- a/examples/python/formulas.py
++++ b/examples/python/formulas.py
+@@ -47,7 +47,7 @@ sm.OLS.from_formula
+ # All of the lower case models accept ``formula`` and ``data`` arguments,
+ # whereas upper case ones take ``endog`` and ``exog`` design matrices.
+ # ``formula`` accepts a string which describes the model in terms of a
+-# ``patsy`` formula. ``data`` takes a [pandas](http://pandas.pydata.org/)
++# ``patsy`` formula. ``data`` takes a [pandas](https://pandas.pydata.org/)
+ # data frame or any other data structure that defines a ``__getitem__`` for
+ # variable names like a structured array or a dictionary of variables.
+ #
+--- a/examples/python/generic_mle.py
++++ b/examples/python/generic_mle.py
+@@ -157,7 +157,7 @@ class NBin(GenericLikelihoodModel):
+ # dataset is hosted in CSV format at the [Rdatasets repository](https://ra
+ # w.githubusercontent.com/vincentarelbundock/Rdatasets). We use the
+ # ``read_csv``
+-# function from the [Pandas library](http://pandas.pydata.org) to load the
++# function from the [Pandas library](https://pandas.pydata.org) to load the
+ # data
+ # in memory. We then print the first few columns:
+ #
+--- a/statsmodels/distributions/edgeworth.py
++++ b/statsmodels/distributions/edgeworth.py
+@@ -148,7 +148,7 @@ class ExpandedNormal(rv_continuous):
+          specification of distributions, Revue de l'Institut Internat.
+          de Statistique. 5: 307 (1938), reprinted in
+          R.A. Fisher, Contributions to Mathematical Statistics. Wiley, 1950.
+-    .. [*] http://en.wikipedia.org/wiki/Edgeworth_series
++    .. [*] https://en.wikipedia.org/wiki/Edgeworth_series
+     .. [*] S. Blinnikov and R. Moessner, Expansions for nearly Gaussian
+         distributions, Astron. Astrophys. Suppl. Ser. 130, 193 (1998)
+--- a/statsmodels/examples/ex_outliers_influence.py
++++ b/statsmodels/examples/ex_outliers_influence.py
+@@ -39,7 +39,7 @@ if __name__ == '__main__':
+     res = res_ols #alias
+-    #http://en.wikipedia.org/wiki/PRESS_statistic
++    #https://en.wikipedia.org/wiki/PRESS_statistic
+     #predicted residuals, leave one out predicted residuals
+     resid_press = res.resid / (1-hh)
+     ess_press = np.dot(resid_press, resid_press)
+@@ -47,7 +47,7 @@ if __name__ == '__main__':
+     sigma2_est = np.sqrt(res.mse_resid) #can be replace by different estimators of sigma
+     sigma_est = np.sqrt(sigma2_est)
+     resid_studentized = res.resid / sigma_est / np.sqrt(1 - hh)
+-    #http://en.wikipedia.org/wiki/DFFITS:
++    #https://en.wikipedia.org/wiki/DFFITS:
+     dffits = resid_studentized * np.sqrt(hh / (1 - hh))
+     nobs, k_vars = res.model.exog.shape
+@@ -56,7 +56,7 @@ if __name__ == '__main__':
+     res_ols.df_modelwc = res_ols.df_model + 1
+     n_params = res.model.exog.shape[1]
+-    #http://en.wikipedia.org/wiki/Cook%27s_distance
++    #https://en.wikipedia.org/wiki/Cook%27s_distance
+     cooks_d = res.resid**2 / sigma2_est / res_ols.df_modelwc * hh / (1 - hh)**2
+     #or
+     #Eubank p.93, 94
+--- a/statsmodels/graphics/functional.py
++++ b/statsmodels/graphics/functional.py
+@@ -452,7 +452,7 @@ def hdrboxplot(data, ncomp=2, alpha=None
+     handles, labels = ax.get_legend_handles_labels()
+     # Proxy artist for fill_between legend entry
+-    # See http://matplotlib.org/1.3.1/users/legend_guide.html
++    # See https://matplotlib.org/1.3.1/users/legend_guide.html
+     plt = _import_mpl()
+     for label, fill_between in zip(['50% HDR', '90% HDR'], fill_betweens):
+         p = plt.Rectangle((0, 0), 1, 1,
+--- a/statsmodels/graphics/plot_grids.py
++++ b/statsmodels/graphics/plot_grids.py
+@@ -4,7 +4,7 @@ Author: Josef Perktold
+ License: BSD-3
+ TODO: update script to use sharex, sharey, and visible=False
+-    see http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label
++    see https://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label
+     for sharex I need to have the ax of the last_row when editing the earlier
+     rows. Or you axes_grid1, imagegrid
+     http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html
+--- a/statsmodels/nonparametric/kde.py
++++ b/statsmodels/nonparametric/kde.py
+@@ -7,7 +7,7 @@ Racine, Jeff. (2008) "Nonparametric Econ
+     Trends in Econometrics: Vol 3: No 1, pp1-88.
+     http://dx.doi.org/10.1561/0800000009
+-http://en.wikipedia.org/wiki/Kernel_%28statistics%29
++https://en.wikipedia.org/wiki/Kernel_%28statistics%29
+ Silverman, B.W.  Density Estimation for Statistics and Data Analysis.
+ """
+--- a/statsmodels/nonparametric/kernel_density.py
++++ b/statsmodels/nonparametric/kernel_density.py
+@@ -214,7 +214,7 @@ class KDEMultivariate(GenericKDE):
+         Notes
+         -----
+-        See http://en.wikipedia.org/wiki/Cumulative_distribution_function
++        See https://en.wikipedia.org/wiki/Cumulative_distribution_function
+         For more details on the estimation see Ref. [5] in module docstring.
+         The multivariate CDF for mixed data (continuous and ordered/unordered
+@@ -392,7 +392,7 @@ class KDEMultivariateConditional(Generic
+     References
+     ----------
+-    .. [1] http://en.wikipedia.org/wiki/Conditional_probability_distribution
++    .. [1] https://en.wikipedia.org/wiki/Conditional_probability_distribution
+     Examples
+     --------
+--- a/statsmodels/regression/linear_model.py
++++ b/statsmodels/regression/linear_model.py
+@@ -1283,7 +1283,7 @@ def yule_walker(X, order=1, method="unbi
+     See, for example:
+-    http://en.wikipedia.org/wiki/Autoregressive_moving_average_model
++    https://en.wikipedia.org/wiki/Autoregressive_moving_average_model
+     Parameters
+     ----------
+--- a/statsmodels/regression/recursive_ls.py
++++ b/statsmodels/regression/recursive_ls.py
+@@ -615,7 +615,7 @@ class RecursiveLSResults(MLEResults):
+                 # Only add CI to legend for the first plot
+                 if i == 0:
+                     # Proxy artist for fill_between legend entry
+-                    # See http://matplotlib.org/1.3.1/users/legend_guide.html
++                    # See https://matplotlib.org/1.3.1/users/legend_guide.html
+                     p = plt.Rectangle((0, 0), 1, 1,
+                                       fc=ci_poly.get_facecolor()[0])
+--- a/statsmodels/sandbox/distributions/extras.py
++++ b/statsmodels/sandbox/distributions/extras.py
+@@ -302,7 +302,7 @@ def pdf_mvsk(mvsk):
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Edgeworth_series
++    https://en.wikipedia.org/wiki/Edgeworth_series
+     Johnson N.L., S. Kotz, N. Balakrishnan: Continuous Univariate
+     Distributions, Volume 1, 2nd ed., p.30
+     """
+@@ -350,7 +350,7 @@ def pdf_moments(cnt):
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Edgeworth_series
++    https://en.wikipedia.org/wiki/Edgeworth_series
+     Johnson N.L., S. Kotz, N. Balakrishnan: Continuous Univariate
+     Distributions, Volume 1, 2nd ed., p.30
+     """
+--- a/statsmodels/sandbox/distributions/otherdist.py
++++ b/statsmodels/sandbox/distributions/otherdist.py
+@@ -8,7 +8,7 @@ Author: Josef Perktold
+ Notes:
+ Compound Poisson has mass point at zero
+-http://en.wikipedia.org/wiki/Compound_Poisson_distribution
++https://en.wikipedia.org/wiki/Compound_Poisson_distribution
+ and would need special treatment
+ need a distribution that has discrete mass points and contiuous range, e.g.
+--- a/statsmodels/sandbox/distributions/sppatch.py
++++ b/statsmodels/sandbox/distributions/sppatch.py
+@@ -78,7 +78,7 @@ def _fitstart_beta(self, x, fixed=None):
+     References
+     ----------
+     for method of moment estimator for known loc and scale
+-    http://en.wikipedia.org/wiki/Beta_distribution#Parameter_estimation
++    https://en.wikipedia.org/wiki/Beta_distribution#Parameter_estimation
+     http://www.itl.nist.gov/div898/handbook/eda/section3/eda366h.htm
+     NIST reference also includes reference to MLE in
+     Johnson, Kotz, and Balakrishan, Volume II, pages 221-235
+@@ -140,7 +140,7 @@ def _fitstart_poisson(self, x, fixed=Non
+     References
+     ----------
+     MLE :
+-    http://en.wikipedia.org/wiki/Poisson_distribution#Maximum_likelihood
++    https://en.wikipedia.org/wiki/Poisson_distribution#Maximum_likelihood
+     '''
+     #todo: separate out this part to be used for other compact support distributions
+--- a/statsmodels/sandbox/regression/kernridgeregress_class.py
++++ b/statsmodels/sandbox/regression/kernridgeregress_class.py
+@@ -33,7 +33,7 @@ class GaussProcess(object):
+     * automatic selection or proposal of smoothing parameters
+     Note: this is different from kernel smoothing regression,
+-       see for example http://en.wikipedia.org/wiki/Kernel_smoother
++       see for example https://en.wikipedia.org/wiki/Kernel_smoother
+     In this version of the kernel ridge regression, the training points
+     are fitted exactly.
+--- a/statsmodels/sandbox/stats/diagnostic.py
++++ b/statsmodels/sandbox/stats/diagnostic.py
+@@ -584,7 +584,7 @@ def het_breuschpagan(resid, exog_het):
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Breusch%E2%80%93Pagan_test
++    https://en.wikipedia.org/wiki/Breusch%E2%80%93Pagan_test
+     Greene 5th edition
+     Breusch, Pagan article
+--- a/statsmodels/sandbox/stats/runs.py
++++ b/statsmodels/sandbox/stats/runs.py
+@@ -469,7 +469,7 @@ def cochrans_q(x):
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Cochran_test
++    https://en.wikipedia.org/wiki/Cochran_test
+     SAS Manual for NPAR TESTS
+     '''
+--- a/statsmodels/sandbox/tsa/varma.py
++++ b/statsmodels/sandbox/tsa/varma.py
+@@ -60,8 +60,8 @@ def VAR(x,B, const=0):
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Vector_Autoregression
+-    http://en.wikipedia.org/wiki/General_matrix_notation_of_a_VAR(p)
++    https://en.wikipedia.org/wiki/Vector_Autoregression
++    https://en.wikipedia.org/wiki/General_matrix_notation_of_a_VAR(p)
+     '''
+     p = B.shape[0]
+     T = x.shape[0]
+--- a/statsmodels/stats/contingency_tables.py
++++ b/statsmodels/stats/contingency_tables.py
+@@ -1383,7 +1383,7 @@ def cochrans_q(x, return_object=True):
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Cochran_test
++    https://en.wikipedia.org/wiki/Cochran_test
+     SAS Manual for NPAR TESTS
+     """
+--- a/statsmodels/stats/inter_rater.py
++++ b/statsmodels/stats/inter_rater.py
+@@ -18,8 +18,8 @@ License: BSD-3
+ References
+ ----------
+ Wikipedia: kappa's initially based on these two pages
+-    http://en.wikipedia.org/wiki/Fleiss%27_kappa
+-    http://en.wikipedia.org/wiki/Cohen's_kappa
++    https://en.wikipedia.org/wiki/Fleiss%27_kappa
++    https://en.wikipedia.org/wiki/Cohen's_kappa
+ SAS-Manual : formulas for cohens_kappa, especially variances
+ see also R package irr
+@@ -226,7 +226,7 @@ def fleiss_kappa(table, method='fleiss')
+     References
+     ----------
+-    Wikipedia http://en.wikipedia.org/wiki/Fleiss%27_kappa
++    Wikipedia https://en.wikipedia.org/wiki/Fleiss%27_kappa
+     Fleiss, Joseph L. 1971. "Measuring Nominal Scale Agreement among Many
+     Raters." Psychological Bulletin 76 (5): 378-82.
+--- a/statsmodels/stats/moment_helpers.py
++++ b/statsmodels/stats/moment_helpers.py
+@@ -114,7 +114,7 @@ def mnc2cum(mnc):
+     """convert non-central moments to cumulants
+     recursive formula produces as many cumulants as moments
+-    http://en.wikipedia.org/wiki/Cumulant#Cumulants_and_moments
++    https://en.wikipedia.org/wiki/Cumulant#Cumulants_and_moments
+     """
+     X = _convert_to_multidim(mnc)
+--- a/statsmodels/stats/outliers_influence.py
++++ b/statsmodels/stats/outliers_influence.py
+@@ -122,7 +122,7 @@ def reset_ramsey(res, degree=5):
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Ramsey_RESET_test
++    https://en.wikipedia.org/wiki/Ramsey_RESET_test
+     """
+     order = degree + 1
+@@ -174,7 +174,7 @@ def variance_inflation_factor(exog, exog
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Variance_inflation_factor
++    https://en.wikipedia.org/wiki/Variance_inflation_factor
+     """
+     k_vars = exog.shape[1]
+@@ -748,7 +748,7 @@ class OLSInfluence(_BaseInfluenceMixin):
+         References
+         ----------
+-        `Wikipedia <http://en.wikipedia.org/wiki/DFFITS>`_
++        `Wikipedia <https://en.wikipedia.org/wiki/DFFITS>`_
+         """
+         # TODO: do I want to use different sigma estimate in
+--- a/statsmodels/stats/proportion.py
++++ b/statsmodels/stats/proportion.py
+@@ -67,7 +67,7 @@ def proportion_confint(count, nobs, alph
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval
++    https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval
+     Brown, Lawrence D.; Cai, T. Tony; DasGupta, Anirban (2001). "Interval
+         Estimation for a Binomial Proportion",
+--- a/statsmodels/tools/eval_measures.py
++++ b/statsmodels/tools/eval_measures.py
+@@ -330,7 +330,7 @@ def aic(llf, nobs, df_modelwc):
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Akaike_information_criterion
++    https://en.wikipedia.org/wiki/Akaike_information_criterion
+     """
+     return -2. * llf + 2. * df_modelwc
+@@ -355,7 +355,7 @@ def aicc(llf, nobs, df_modelwc):
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Akaike_information_criterion#AICc
++    https://en.wikipedia.org/wiki/Akaike_information_criterion#AICc
+     """
+     return -2. * llf + 2. * df_modelwc * nobs / (nobs - df_modelwc - 1.)
+@@ -380,7 +380,7 @@ def bic(llf, nobs, df_modelwc):
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Bayesian_information_criterion
++    https://en.wikipedia.org/wiki/Bayesian_information_criterion
+     """
+     return -2. * llf + np.log(nobs) * df_modelwc
+@@ -462,7 +462,7 @@ def aic_sigma(sigma2, nobs, df_modelwc,
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Akaike_information_criterion
++    https://en.wikipedia.org/wiki/Akaike_information_criterion
+     """
+     if not islog:
+@@ -497,7 +497,7 @@ def aicc_sigma(sigma2, nobs, df_modelwc,
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Akaike_information_criterion#AICc
++    https://en.wikipedia.org/wiki/Akaike_information_criterion#AICc
+     """
+     if not islog:
+@@ -532,7 +532,7 @@ def bic_sigma(sigma2, nobs, df_modelwc,
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Bayesian_information_criterion
++    https://en.wikipedia.org/wiki/Bayesian_information_criterion
+     """
+     if not islog:
+--- a/statsmodels/tools/numdiff.py
++++ b/statsmodels/tools/numdiff.py
+@@ -36,13 +36,13 @@ without dependencies.
+ #    also does it hold only at the minimum, what's relationship to covariance
+ #    of Jacobian matrix
+ # http://projects.scipy.org/scipy/ticket/1157
+-# http://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm
++# https://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm
+ #    objective: sum((y-f(beta,x)**2),   Jacobian = d f/d beta
+ #    and not d objective/d beta as in MLE Greene
+ #    similar: http://crsouza.blogspot.com/2009/11/neural-network-learning-by-levenberg_18.html#hessian
+ #
+ # in example: if J = d x*beta / d beta then J'J == X'X
+-#    similar to http://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm
++#    similar to https://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm
+ from __future__ import print_function
+ from statsmodels.compat.python import range
+ import numpy as np
+--- a/statsmodels/tsa/statespace/structural.py
++++ b/statsmodels/tsa/statespace/structural.py
+@@ -1610,7 +1610,7 @@ class UnobservedComponentsResults(MLERes
+             ci_label = '$%.3g \\%%$ confidence interval' % ((1 - alpha) * 100)
+             # Proxy artist for fill_between legend entry
+-            # See e.g. http://matplotlib.org/1.3.1/users/legend_guide.html
++            # See e.g. https://matplotlib.org/1.3.1/users/legend_guide.html
+             p = plt.Rectangle((0, 0), 1, 1, fc=ci_poly.get_facecolor()[0])
+             # Legend
+--- a/statsmodels/tsa/stattools.py
++++ b/statsmodels/tsa/stattools.py
+@@ -1228,7 +1228,7 @@ def grangercausalitytests(x, maxlag, add
+     References
+     ----------
+-    http://en.wikipedia.org/wiki/Granger_causality
++    https://en.wikipedia.org/wiki/Granger_causality
+     Greene: Econometric Analysis
+     """
+--- a/tools/R2nparray/DESCRIPTION
++++ b/tools/R2nparray/DESCRIPTION
+@@ -6,7 +6,7 @@ Author: Skipper Seabold <jsseabold@gmail
+ Maintainer: Skipper Seabold <jsseabold@gmail.com>
+ Description: Writes R matrices, vectors, and scalars to a file as numpy arrays
+ License: BSD
+-URL: http://www.github.com/statsmodels/statsmodels
++URL: https://www.github.com/statsmodels/statsmodels
+ Repository: github
+ Collate:
+     'R2nparray-package.R'
+--- a/tools/matplotlibrc.qt4
++++ b/tools/matplotlibrc.qt4
+@@ -126,7 +126,7 @@ font.monospace       : Andale Mono, Nimb
+ #text.color          : black
+-### LaTeX customizations. See http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex
++### LaTeX customizations. See https://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex
+ #text.usetex         : False  # use latex for all text handling. The following fonts
+                               # are supported through the usual rc parameter settings:
+                               # new century schoolbook, bookman, times, palatino,
+@@ -200,7 +200,7 @@ axes.axisbelow      : True   # whether a
+                                # of the axis range is smaller than the
+                                # first or larger than the second
+ #axes.unicode_minus  : True    # use unicode for the minus symbol
+-                               # rather than hypen.  See http://en.wikipedia.org/wiki/Plus_sign#Plus_sign
++                               # rather than hypen.  See https://en.wikipedia.org/wiki/Plus_sign#Plus_sign
+ axes.color_cycle    : 348ABD, 7A68A6, A60628, 467821, CF4457, 188487, E24A33
+                       # E24A33 : orange
+                       # 7A68A6 : purple
+--- a/tools/matplotlibrc.qt5
++++ b/tools/matplotlibrc.qt5
+@@ -12,7 +12,7 @@
+ # other platforms:
+ #     $HOME/.matplotlib/matplotlibrc
+ #
+-# See http://matplotlib.org/users/customizing.html#the-matplotlibrc-file for
++# See https://matplotlib.org/users/customizing.html#the-matplotlibrc-file for
+ # more details on the paths which are checked for the configuration file.
+ #
+ # This file is best viewed in a editor which supports python mode
+@@ -76,7 +76,7 @@ backend.qt5 : PyQt5
+ ### LINES
+-# See http://matplotlib.org/api/artist_api.html#module-matplotlib.lines for more
++# See https://matplotlib.org/api/artist_api.html#module-matplotlib.lines for more
+ # information on line properties.
+ #lines.linewidth   : 1.0     # line width in points
+ #lines.linestyle   : -       # solid line
+@@ -95,7 +95,7 @@ backend.qt5 : PyQt5
+ ### PATCHES
+ # Patches are graphical objects that fill 2D space, like polygons or
+ # circles.  See
+-# http://matplotlib.org/api/artist_api.html#module-matplotlib.patches
++# https://matplotlib.org/api/artist_api.html#module-matplotlib.patches
+ # information on patch properties
+ #patch.linewidth        : 1.0     # edge width in points
+ #patch.facecolor        : blue
+@@ -105,7 +105,7 @@ backend.qt5 : PyQt5
+ ### FONT
+ #
+ # font properties used by text.Text.  See
+-# http://matplotlib.org/api/font_manager_api.html for more
++# https://matplotlib.org/api/font_manager_api.html for more
+ # information on font properties.  The 6 font properties used for font
+ # matching are given below with their default values.
+ #
+@@ -157,7 +157,7 @@ backend.qt5 : PyQt5
+ ### TEXT
+ # text properties used by text.Text.  See
+-# http://matplotlib.org/api/artist_api.html#module-matplotlib.text for more
++# https://matplotlib.org/api/artist_api.html#module-matplotlib.text for more
+ # information on text properties
+ #text.color          : black
+@@ -235,7 +235,7 @@ backend.qt5 : PyQt5
+ ### AXES
+ # default face and edge color, default tick sizes,
+ # default fontsizes for ticklabels, and so on.  See
+-# http://matplotlib.org/api/axes_api.html#module-matplotlib.axes
++# https://matplotlib.org/api/axes_api.html#module-matplotlib.axes
+ #axes.hold           : True    # whether to clear the axes by default on
+ #axes.facecolor      : white   # axes background color
+ #axes.edgecolor      : black   # axes edge color
+@@ -266,7 +266,7 @@ backend.qt5 : PyQt5
+ #axes.unicode_minus  : True    # use unicode for the minus symbol
+                                # rather than hyphen.  See
+-                               # http://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes
++                               # https://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes
+ #axes.prop_cycle    : cycler('color', 'bgrcmyk')
+                                             # color cycle for plot lines
+                                             # as list of string colorspecs:
+@@ -279,7 +279,7 @@ backend.qt5 : PyQt5
+ #axes3d.grid         : True    # display grid on 3d axes
+ ### TICKS
+-# see http://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick
++# see https://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick
+ #xtick.major.size     : 4      # major tick size in points
+ #xtick.minor.size     : 2      # minor tick size in points
+ #xtick.major.width    : 0.5    # major tick width in points
+@@ -328,7 +328,7 @@ backend.qt5 : PyQt5
+ #legend.scatterpoints : 3 # number of scatter points
+ ### FIGURE
+-# See http://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure
++# See https://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure
+ #figure.titlesize : medium     # size of the figure title
+ #figure.titleweight : normal   # weight of the figure title
+ #figure.figsize   : 8, 6    # figure size in inches
+--- a/tools/notebook_output_template.py
++++ b/tools/notebook_output_template.py
+@@ -9,7 +9,7 @@ notebook_template = Template("""
+ $body
+-   <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
++   <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
+    <script type="text/javascript">
+    init_mathjax = function() {
+        if (window.MathJax) {
diff --git a/patches/privacy.patch b/patches/privacy.patch
new file mode 100644 (file)
index 0000000..b219184
--- /dev/null
@@ -0,0 +1,11 @@
+Description: Don't fetch Twitter logo
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Forwarded: no
+
+--- statsmodels-0.8.0.orig/docs/themes/statsmodels/sidelinks.html
++++ statsmodels-0.8.0/docs/themes/statsmodels/sidelinks.html
+@@ -1,2 +1,2 @@
+-<p><a href="https://twitter.com/statsmodels"><img src="https://twitter-badges.s3.amazonaws.com/t_small-a.png" alt="Follow statsmodels on Twitter"/></a>
++<p><a href="https://twitter.com/statsmodels">Twitter</a>
+ <a href="http://scipystats.blogspot.com/"><img src="{{ pathto('_static/blogger_sm.png', 1) }}" alt="Blog"></a></p>
diff --git a/patches/python3_shebangs.patch b/patches/python3_shebangs.patch
new file mode 100644 (file)
index 0000000..a7326c0
--- /dev/null
@@ -0,0 +1,110 @@
+Description: Use Python 3 in script shebangs
+
+(Skipping the two .pyx files with #!python - they need to be compiled
+with Cython, not directly run with any version of plain Python)
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Forwarded: no
+
+--- statsmodels-0.10.1.orig/docs/fix_longtable.py
++++ statsmodels-0.10.1/docs/fix_longtable.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ import sys
+ import os
+--- statsmodels-0.10.1.orig/examples/python/plots_boxplots.py
++++ statsmodels-0.10.1/examples/python/plots_boxplots.py
+@@ -5,7 +5,7 @@
+ # flake8: noqa
+ # DO NOT EDIT
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # coding: utf-8
+ # # Box Plots
+--- statsmodels-0.10.1.orig/examples/python/robust_models_1.py
++++ statsmodels-0.10.1/examples/python/robust_models_1.py
+@@ -5,7 +5,7 @@
+ # flake8: noqa
+ # DO NOT EDIT
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # coding: utf-8
+ # # M-Estimators for Robust Linear Modeling
+--- statsmodels-0.10.1.orig/statsmodels/regression/quantile_regression.py
++++ statsmodels-0.10.1/statsmodels/regression/quantile_regression.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ '''
+ Quantile regression model
+--- statsmodels-0.10.1.orig/statsmodels/sandbox/examples/example_pca.py
++++ statsmodels-0.10.1/statsmodels/sandbox/examples/example_pca.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ import numpy as np
+ from statsmodels.sandbox.pca import Pca
+--- statsmodels-0.10.1.orig/statsmodels/tools/print_version.py
++++ statsmodels-0.10.1/statsmodels/tools/print_version.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import print_function
+ from statsmodels.compat.python import reduce
+ import sys
+--- statsmodels-0.10.1.orig/tools/backport_pr.py
++++ statsmodels-0.10.1/tools/backport_pr.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ Backport pull requests to a particular branch.
+--- statsmodels-0.10.1.orig/tools/code_maintenance.py
++++ statsmodels-0.10.1/tools/code_maintenance.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ Code maintenance script modified from PyMC
+ """
+--- statsmodels-0.10.1.orig/tools/export_notebooks_to_python.py
++++ statsmodels-0.10.1/tools/export_notebooks_to_python.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ import argparse
+ import glob
+--- statsmodels-0.10.1.orig/tools/generate_formula_api.py
++++ statsmodels-0.10.1/tools/generate_formula_api.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ This will generate an API file for formula. in dir/statsmodels/formula/api.py
+--- statsmodels-0.10.1.orig/tools/github_stats.py
++++ statsmodels-0.10.1/tools/github_stats.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Simple tools to query github.com and gather stats about issues.
+ Copied from IPython 732be29
+--- statsmodels-0.10.1.orig/tools/update_web.py
++++ statsmodels-0.10.1/tools/update_web.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ This script installs the trunk version, builds the docs, then uploads them
+ to ...
diff --git a/patches/scipy13_compat.patch b/patches/scipy13_compat.patch
new file mode 100644 (file)
index 0000000..f9c238c
--- /dev/null
@@ -0,0 +1,42 @@
+Description: Use scipy.special not scipy.misc
+
+factorial, comb and logsumexp have been moved: trying to import them
+from the old location is an error in scipy 1.3+.
+https://ci.debian.net/data/autopkgtest/unstable/amd64/s/statsmodels/2949940/log.gz
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Forwarded: accepted https://github.com/statsmodels/statsmodels/pull/6164
+
+--- a/statsmodels/distributions/edgeworth.py
++++ b/statsmodels/distributions/edgeworth.py
+@@ -124,7 +124,7 @@ class ExpandedNormal(rv_continuous):
+     >>> import matplotlib.pyplot as plt
+     >>> from scipy import stats
+-    >>> from scipy.misc import factorial
++    >>> from scipy.special import factorial
+     >>> df = 12
+     >>> chi2_c = [2**(j-1) * factorial(j-1) * df for j in range(1, 5)]
+     >>> edgw_chi2 = ExpandedNormal(chi2_c, name='edgw_chi2', momtype=0)
+--- a/examples/python/discrete_choice_example.py
++++ b/examples/python/discrete_choice_example.py
+@@ -126,7 +126,7 @@ formula += '+ PCTYRRND + PERMINTE*AVYRSE
+ stats.binom(5, 1. / 6).pmf(2)
+-from scipy.misc import comb
++from scipy.special import comb
+ comb(5, 2) * (1 / 6.)**2 * (5 / 6.)**3
+ from statsmodels.formula.api import glm
+--- a/statsmodels/sandbox/infotheo.py
++++ b/statsmodels/sandbox/infotheo.py
+@@ -36,7 +36,7 @@ from statsmodels.compat.python import ra
+ from scipy import stats
+ import numpy as np
+ from matplotlib import pyplot as plt
+-from scipy.misc import logsumexp as sp_logsumexp
++from statsmodels.compat.scipy import logsumexp as sp_logsumexp
+ #TODO: change these to use maxentutils so that over/underflow is handled
+ #with the logsumexp.
diff --git a/patches/series b/patches/series
new file mode 100644 (file)
index 0000000..11181a3
--- /dev/null
@@ -0,0 +1,18 @@
+use-cached-datasets
+up_reduce_test_precision
+use-system-inventory
+privacy.patch
+link_security2.patch
+show_cvxopt_error.patch
+xfail_kalman_armhf.patch
+use_available_data.patch
+cache_security.patch
+i386_loosen_test_tolerances.patch
+scipy13_compat.patch
+python3_shebangs.patch
+use_tmp_path.patch
+subprocess_use_same_pyver.patch
+944054_flaky_tests.patch
+sphinx_autosummary.patch
+sphinx_ignore_errors.patch
+up5253_gee_offset.patch
diff --git a/patches/show_cvxopt_error.patch b/patches/show_cvxopt_error.patch
new file mode 100644 (file)
index 0000000..ae606b6
--- /dev/null
@@ -0,0 +1,22 @@
+Description: Give a more useful error if cvxopt is not found
+
+message wasn't actually passed to anything, so it previously failed at
+statsmodels/base/optimizer.py:13 (_check_method) with
+"Unknown fit method l1_cvxopt_cp"
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Forwarded: accepted https://github.com/statsmodels/statsmodels/pull/6163
+
+--- a/statsmodels/discrete/discrete_model.py
++++ b/statsmodels/discrete/discrete_model.py
+@@ -353,8 +353,8 @@ class DiscreteModel(base.LikelihoodModel
+             from statsmodels.base.l1_cvxopt import fit_l1_cvxopt_cp
+             extra_fit_funcs['l1_cvxopt_cp'] = fit_l1_cvxopt_cp
+         elif method.lower() == 'l1_cvxopt_cp':
+-            message = ("Attempt to use l1_cvxopt_cp failed since cvxopt "
+-                        "could not be imported")
++            raise ValueError("Cannot use l1_cvxopt_cp as cvxopt "
++                "was not found (install it, or use method='l1' instead)")
+         if callback is None:
+             callback = self._check_perfect_pred
diff --git a/patches/sphinx_autosummary.patch b/patches/sphinx_autosummary.patch
new file mode 100644 (file)
index 0000000..b5bcf0e
--- /dev/null
@@ -0,0 +1,19 @@
+Description: Make the module reference tables appear
+
+Our numpydoc is old enough to still need this manually set
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Bug: https://github.com/numpy/numpydoc/issues/141
+Forwarded: not-needed
+
+--- statsmodels-0.10.1.orig/docs/source/conf.py
++++ statsmodels-0.10.1/docs/source/conf.py
+@@ -44,7 +44,7 @@ extensions = ['sphinx.ext.autodoc',
+               # One of mathjax or imgmath
+               'sphinx.ext.mathjax',
+               'sphinx.ext.viewcode',
+-              # 'sphinx.ext.autosummary',
++              'sphinx.ext.autosummary',
+               'sphinx.ext.inheritance_diagram',
+               'matplotlib.sphinxext.plot_directive',
+               'IPython.sphinxext.ipython_console_highlighting',
diff --git a/patches/sphinx_ignore_errors.patch b/patches/sphinx_ignore_errors.patch
new file mode 100644 (file)
index 0000000..c6de4c7
--- /dev/null
@@ -0,0 +1,18 @@
+Description: Don't fail documentation build on examples exceptions
+
+ipython now fails the whole build by default if anything outputs an error,
+which some of ours do when they can't download data.
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Forwarded: not-needed
+
+--- a/docs/source/conf.py
++++ b/docs/source/conf.py
+@@ -73,6 +73,7 @@ copyright = u'2009-2018, Josef Perktold,
+ autosummary_generate = True
+ autoclass_content = 'class'
++ipython_warning_is_error = False
+ # The version info for the project you're documenting, acts as replacement for
+ # |version| and |release|, also used in various other places throughout the
diff --git a/patches/subprocess_use_same_pyver.patch b/patches/subprocess_use_same_pyver.patch
new file mode 100644 (file)
index 0000000..cb3a102
--- /dev/null
@@ -0,0 +1,20 @@
+Description: Use same Python version for subprocess test
+
+Avoids a fail due to mismatched extension .so version
+when multiple Python 3 versions are available
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Forwarded: no
+
+--- statsmodels-0.10.1.orig/statsmodels/tests/test_package.py
++++ statsmodels-0.10.1/statsmodels/tests/test_package.py
+@@ -15,7 +15,8 @@ def test_lazy_imports():
+            "assert not mods, mods")
+     # TODO: is there a cleaner way to do this import in an isolated environment
+-    pyexe = 'python3' if PY3 else 'python'
++    import sys
++    pyexe = sys.executable or 'python3'
+     p = subprocess.Popen(pyexe + ' -c "' + cmd + '"',
+                          shell=True, close_fds=True)
+     p.wait()
diff --git a/patches/up5253_gee_offset.patch b/patches/up5253_gee_offset.patch
new file mode 100644 (file)
index 0000000..04d388e
--- /dev/null
@@ -0,0 +1,32 @@
+Description: Include offset and exposure in GEEResults.fittedvalues
+
+and remove misleading documentation from GLMResults.fittedvalues
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Bug: https://github.com/statsmodels/statsmodels/issues/5253
+Forwarded: https://github.com/statsmodels/statsmodels/issues/5253#issuecomment-578980169
+
+--- a/statsmodels/genmod/generalized_estimating_equations.py
++++ b/statsmodels/genmod/generalized_estimating_equations.py
+@@ -1975,8 +1975,7 @@ class GEEResults(base.LikelihoodModelRes
+         """
+         Returns the fitted values from the model.
+         """
+-        return self.model.family.link.inverse(np.dot(self.model.exog,
+-                                                     self.params))
++        return self.model.predict(self.params)
+     def plot_added_variable(self, focus_exog, resid_type=None,
+                             use_glm_weights=True, fit_kwargs=None,
+--- a/statsmodels/genmod/generalized_linear_model.py
++++ b/statsmodels/genmod/generalized_linear_model.py
+@@ -1563,8 +1563,7 @@ class GLMResults(base.LikelihoodModelRes
+     @cache_readonly
+     def fittedvalues(self):
+         """
+-        Linear predicted values for the fitted model.
+-        dot(exog, params)
++        Predicted values for the fitted model.
+         """
+         return self.mu
diff --git a/patches/up_reduce_test_precision b/patches/up_reduce_test_precision
new file mode 100644 (file)
index 0000000..78887fa
--- /dev/null
@@ -0,0 +1,17 @@
+Description: to prevent failed test on i386
+
+Author: Yaroslav Halchenko <debian@onerussian.com>
+Bug: https://github.com/statsmodels/statsmodels/issues/1831
+Forwarded: upstream consider this probably fixed
+
+--- a/statsmodels/emplike/tests/test_regression.py
++++ b/statsmodels/emplike/tests/test_regression.py
+@@ -152,7 +152,7 @@ class TestRegressionNM(GenRes):
+     def test_ci_beta2(self):
+         beta2ci = self.res1.conf_int_el(2, lower_bound=.59, upper_bound=2.2,
+                                         method='nm')
+-        assert_almost_equal(beta2ci, self.res2.test_ci_beta2, 6)
++        assert_almost_equal(beta2ci, self.res2.test_ci_beta2, 4)
+     @pytest.mark.slow
+     def test_ci_beta3(self):
diff --git a/patches/use-cached-datasets b/patches/use-cached-datasets
new file mode 100644 (file)
index 0000000..0819067
--- /dev/null
@@ -0,0 +1,177 @@
+Description: Use cached datasets for building documentation/examples
+
+Also remove a download that isn't actually used in that example.
+
+This allows at least some of the examples to be built in an
+offline environment such as a Debian buildd.
+
+The cached data is extracted from R packages by debian/datasets/*.
+
+Author: Diane Trout <diane@ghic.org>, Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Forwarded: not-needed
+
+--- a/docs/source/contingency_tables.rst
++++ b/docs/source/contingency_tables.rst
+@@ -49,7 +49,7 @@ contingency table cell counts:
+     import pandas as pd
+     import statsmodels.api as sm
+-    df = sm.datasets.get_rdataset("Arthritis", "vcd").data
++    df = sm.datasets.get_rdataset("Arthritis", "vcd", cache=True).data
+     tab = pd.crosstab(df['Treatment'], df['Improved'])
+     tab = tab.loc[:, ["None", "Some", "Marked"]]
+@@ -184,7 +184,7 @@ contingency table.
+ .. ipython:: python
+-    df = sm.datasets.get_rdataset("VisualAcuity", "vcd").data
++    df = sm.datasets.get_rdataset("VisualAcuity", "vcd", cache=True).data
+     df = df.loc[df.gender == "female", :]
+     tab = df.set_index(['left', 'right'])
+     del tab["gender"]
+--- a/docs/source/duration.rst
++++ b/docs/source/duration.rst
+@@ -44,7 +44,7 @@ We fit the survival distribution only fo
+    import statsmodels.api as sm
+-   data = sm.datasets.get_rdataset("flchain", "survival").data
++   data = sm.datasets.get_rdataset("flchain", "survival", cache=True).data
+    df = data.loc[data.sex == "F", :]
+    sf = sm.SurvfuncRight(df["futime"], df["death"])
+@@ -157,7 +157,7 @@ Examples
+    import statsmodels.api as sm
+    import statsmodels.formula.api as smf
+-   data = sm.datasets.get_rdataset("flchain", "survival").data
++   data = sm.datasets.get_rdataset("flchain", "survival", cache=True).data
+    del data["chapter"]
+    data = data.dropna()
+    data["lam"] = data["lambda"]
+--- a/docs/source/example_formulas.rst
++++ b/docs/source/example_formulas.rst
+@@ -47,7 +47,7 @@ and list-wise delete to remove missing o
+ .. ipython:: python
+-    df = sm.datasets.get_rdataset("Guerry", "HistData").data
++    df = sm.datasets.get_rdataset("Guerry", "HistData", cache=True).data
+     df = df[['Lottery', 'Literacy', 'Wealth', 'Region']].dropna()
+     df.head()
+--- a/docs/source/gee.rst
++++ b/docs/source/gee.rst
+@@ -24,7 +24,7 @@ within clusters using data on epilepsy s
+     import statsmodels.api as sm
+     import statsmodels.formula.api as smf
+-    data = sm.datasets.get_rdataset('epil', package='MASS').data
++    data = sm.datasets.get_rdataset('epil', package='MASS', cache=True).data
+     fam = sm.families.Poisson()
+     ind = sm.cov_struct.Exchangeable()
+--- a/docs/source/gettingstarted.rst
++++ b/docs/source/gettingstarted.rst
+@@ -44,7 +44,7 @@ We could download the file locally and t
+ .. ipython:: python
+-    df = sm.datasets.get_rdataset("Guerry", "HistData").data
++    df = sm.datasets.get_rdataset("Guerry", "HistData", cache=True).data
+ The `Input/Output doc page <iolib.html>`_ shows how to import from various
+ other formats.
+--- a/docs/source/index.rst
++++ b/docs/source/index.rst
+@@ -25,7 +25,7 @@ example using ordinary least squares:
+     import statsmodels.formula.api as smf
+     # Load data
+-    dat = sm.datasets.get_rdataset("Guerry", "HistData").data
++    dat = sm.datasets.get_rdataset("Guerry", "HistData", cache=True).data
+     # Fit regression model (using the natural log of one of the regressors)
+     results = smf.ols('Lottery ~ Literacy + np.log(Pop1831)', data=dat).fit()
+--- a/docs/source/mixed_linear.rst
++++ b/docs/source/mixed_linear.rst
+@@ -83,7 +83,7 @@ Examples
+   import statsmodels.api as sm
+   import statsmodels.formula.api as smf
+-  data = sm.datasets.get_rdataset("dietox", "geepack").data
++  data = sm.datasets.get_rdataset("dietox", "geepack", cache=True).data
+   md = smf.mixedlm("Weight ~ Time", data, groups=data["Pig"])
+   mdf = md.fit()
+--- a/docs/source/release/version0.6.rst
++++ b/docs/source/release/version0.6.rst
+@@ -41,7 +41,7 @@ covariates.
+    import statsmodels.api as sm
+    import statsmodels.formula.api as smf
+-   data = sm.datasets.get_rdataset("epil", "MASS").data
++   data = sm.datasets.get_rdataset("epil", "MASS", cache=True).data
+    md = smf.gee("y ~ age + trt + base", "subject", data,
+                 cov_struct=sm.cov_struct.Independence(), 
+--- a/docs/source/datasets/index.rst
++++ b/docs/source/datasets/index.rst
+@@ -30,7 +30,7 @@ The `Rdatasets project <https://vincenta
+ .. ipython:: python
+    import statsmodels.api as sm
+-   duncan_prestige = sm.datasets.get_rdataset("Duncan", "carData")
++   duncan_prestige = sm.datasets.get_rdataset("Duncan", "carData", cache=True)
+    print(duncan_prestige.__doc__)
+    duncan_prestige.data.head(5)
+--- a/examples/notebooks/markov_regression.ipynb
++++ b/examples/notebooks/markov_regression.ipynb
+@@ -28,11 +28,7 @@
+     "import pandas as pd\n",
+     "import statsmodels.api as sm\n",
+     "import matplotlib.pyplot as plt\n",
+-    "\n",
+-    "# NBER recessions\n",
+-    "from pandas_datareader.data import DataReader\n",
+-    "from datetime import datetime\n",
+-    "usrec = DataReader('USREC', 'fred', start=datetime(1947, 1, 1), end=datetime(2013, 4, 1))"
++    "from datetime import datetime\n"
+    ]
+   },
+   {
+--- a/examples/notebooks/mixed_lm_example.ipynb
++++ b/examples/notebooks/mixed_lm_example.ipynb
+@@ -68,7 +68,7 @@
+    "metadata": {},
+    "outputs": [],
+    "source": [
+-    "data = sm.datasets.get_rdataset('dietox', 'geepack').data\n",
++    "data = sm.datasets.get_rdataset('dietox', 'geepack', cache=True).data\n",
+     "md = smf.mixedlm(\"Weight ~ Time\", data, groups=data[\"Pig\"])\n",
+     "mdf = md.fit()\n",
+     "print(mdf.summary())"
+@@ -202,7 +202,7 @@
+    "metadata": {},
+    "outputs": [],
+    "source": [
+-    "data = sm.datasets.get_rdataset(\"Sitka\", \"MASS\").data\n",
++    "data = sm.datasets.get_rdataset(\"Sitka\", \"MASS\", cache=True).data\n",
+     "endog = data[\"size\"]\n",
+     "data[\"Intercept\"] = 1\n",
+     "exog = data[[\"Intercept\", \"Time\"]]"
+--- a/examples/notebooks/regression_diagnostics.ipynb
++++ b/examples/notebooks/regression_diagnostics.ipynb
+@@ -52,8 +52,8 @@
+     "import matplotlib.pyplot as plt\n",
+     "\n",
+     "# Load data\n",
+-    "url = 'https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/master/csv/HistData/Guerry.csv'\n",
+-    "dat = pd.read_csv(url)\n",
++    "import statsmodels.datasets\n",
++    "dat = statsmodels.datasets.get_rdataset(\"Guerry\", \"HistData\", cache=True).data\n",
+     "\n",
+     "# Fit regression model (using the natural log of one of the regressors)\n",
+     "results = smf.ols('Lottery ~ Literacy + np.log(Pop1831)', data=dat).fit()\n",
diff --git a/patches/use-system-inventory b/patches/use-system-inventory
new file mode 100644 (file)
index 0000000..ff49a97
--- /dev/null
@@ -0,0 +1,22 @@
+Author: Diane Trout <diane@ghic.org>
+Description: Use intersphinx inventory files from other Debian packages.
+Forwarded: not-needed
+
+--- a/docs/source/conf.py
++++ b/docs/source/conf.py
+@@ -333,11 +333,11 @@ epub_copyright = u'2009-2019, Josef Perk
+ # Example configuration for intersphinx: refer to the Python standard library.
+ intersphinx_mapping = {
+-    'numpy': ('https://docs.scipy.org/doc/numpy/', None),
+-    'python': ('https://docs.python.org/3/', None),
++    'numpy': ('https://docs.scipy.org/doc/numpy/', '/usr/share/doc/python-numpy-doc/html/objects.inv'),
++    'python': ('https://docs.python.org/3/', '/usr/share/doc/python3-doc/html/objects.inv'),
+     'pydagogue': ('https://matthew-brett.github.io/pydagogue/', None),
+-    'patsy': ('https://patsy.readthedocs.io/en/latest/', None),
+-    'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
++    'patsy': ('https://patsy.readthedocs.io/en/latest/', '/usr/share/doc/python-patsy-doc/html/objects.inv'),
++    'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', '/usr/share/doc/python-pandas-doc/html/objects.inv'),
+ }
+ plot_basedir = join(dirname(dirname(os.path.abspath(__file__))), 'source')
diff --git a/patches/use_available_data.patch b/patches/use_available_data.patch
new file mode 100644 (file)
index 0000000..43ff2ae
--- /dev/null
@@ -0,0 +1,117 @@
+Description: Use example data from an R package we have
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Forwarded: not-needed
+
+diff --git a/examples/notebooks/generic_mle.ipynb b/examples/notebooks/generic_mle.ipynb
+index 9f49cb3d5..bddde7be2 100644
+--- a/examples/notebooks/generic_mle.ipynb
++++ b/examples/notebooks/generic_mle.ipynb
+@@ -288,10 +288,10 @@
+     "\n",
+     "### Usage Example\n",
+     "\n",
+-    "The [Medpar](https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/doc/COUNT/medpar.html)\n",
++    "The [epilepsy](https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/doc/robustbase/epilepsy.html)\n",
+     "dataset is hosted in CSV format at the [Rdatasets repository](https://raw.githubusercontent.com/vincentarelbundock/Rdatasets). We use the ``read_csv``\n",
+     "function from the [Pandas library](https://pandas.pydata.org) to load the data\n",
+-    "in memory. We then print the first few columns: \n"
++    "in memory. We then print the first few entries: \n"
+    ]
+   },
+   {
+@@ -313,9 +313,9 @@
+    },
+    "outputs": [],
+    "source": [
+-    "medpar = sm.datasets.get_rdataset(\"medpar\", \"COUNT\", cache=True).data\n",
++    "epilepsy = sm.datasets.get_rdataset(\"epilepsy\", \"robustbase\", cache=True).data\n",
+     "\n",
+-    "medpar.head()"
++    "epilepsy.head()"
+    ]
+   },
+   {
+@@ -323,8 +323,8 @@
+    "metadata": {},
+    "source": [
+     "The model we are interested in has a vector of non-negative integers as\n",
+-    "dependent variable (``los``), and 5 regressors: ``Intercept``, ``type2``,\n",
+-    "``type3``, ``hmo``, ``white``.\n",
++    "dependent variable (``Ysum``), and 3 regressors: ``Intercept``, ``Base``,\n",
++    "``Trt``.\n",
+     "\n",
+     "For estimation, we need to create two variables to hold our regressors and the outcome variable. These can be ndarrays or pandas objects."
+    ]
+@@ -337,8 +337,9 @@
+    },
+    "outputs": [],
+    "source": [
+-    "y = medpar.los\n",
+-    "X = medpar[[\"type2\", \"type3\", \"hmo\", \"white\"]].copy()\n",
++    "y = epilepsy.Ysum\n",
++    "epilepsy[\"Trtnum\"]=epilepsy[\"Trt\"].map({\"placebo\": 0, \"progabide\": 1})\n",
++    "X = epilepsy[[\"Base\", \"Trtnum\"]].copy()\n",
+     "X[\"constant\"] = 1"
+    ]
+   },
+@@ -454,25 +455,42 @@
+    "cell_type": "markdown",
+    "metadata": {},
+    "source": [
+-    "Or we could compare them to results obtained using the MASS implementation for R:\n",
+-    "\n",
+-    "    url = 'https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/csv/COUNT/medpar.csv'\n",
+-    "    medpar = read.csv(url)\n",
+-    "    f = los~factor(type)+hmo+white\n",
+-    "    \n",
+-    "    library(MASS)\n",
+-    "    mod = glm.nb(f, medpar)\n",
+-    "    coef(summary(mod))\n",
+-    "                     Estimate Std. Error   z value      Pr(>|z|)\n",
+-    "    (Intercept)    2.31027893 0.06744676 34.253370 3.885556e-257\n",
+-    "    factor(type)2  0.22124898 0.05045746  4.384861  1.160597e-05\n",
+-    "    factor(type)3  0.70615882 0.07599849  9.291748  1.517751e-20\n",
+-    "    hmo           -0.06795522 0.05321375 -1.277024  2.015939e-01\n",
+-    "    white         -0.12906544 0.06836272 -1.887951  5.903257e-02\n",
+-    "\n",
++    "Or we could compare them to results obtained using the MASS implementation for R:\n"
++   ]
++  },
++  {
++   "cell_type": "code",
++   "execution_count": null,
++   "metadata": {
++    "collapsed": false
++   },
++   "outputs": [],
++   "source": [
++    "%load_ext rpy2.ipython"
++   ]
++  },
++  {
++   "cell_type": "code",
++   "execution_count": null,
++   "metadata": {
++    "collapsed": false
++   },
++   "outputs": [],
++   "source": [
++    "%R f = Ysum~factor(Trt)+Base\n",
++    "%R data(epilepsy,package='robustbase')\n",
++    "%R library(MASS)\n",
++    "%R mod = glm.nb(f, epilepsy)\n",
++    "%R print(coef(summary(mod)))\n"
++   ]
++  },
++  {
++   "cell_type": "markdown",
++   "metadata": {},
++   "source": [
+     "### Numerical precision \n",
+     "\n",
+-    "The ``statsmodels`` generic MLE and ``R`` parameter estimates agree up to the fourth decimal. The standard errors, however, agree only up to the second decimal. This discrepancy is the result of imprecision in our Hessian numerical estimates. In the current context, the difference between ``MASS`` and ``statsmodels`` standard error estimates is substantively irrelevant, but it highlights the fact that users who need very precise estimates may not always want to rely on default settings when using numerical derivatives. In such cases, it is better to use analytical derivatives with the ``LikelihoodModel`` class."
++    "The ``statsmodels`` generic MLE and ``R`` parameter estimates agree up to the fourth decimal. The standard errors, however, agree only up to the first decimal. This discrepancy is the result of imprecision in our Hessian numerical estimates. In the current context, the difference between ``MASS`` and ``statsmodels`` standard error estimates is substantively irrelevant, but it highlights the fact that users who need very precise estimates may not always want to rely on default settings when using numerical derivatives. In such cases, it is better to use analytical derivatives with the ``LikelihoodModel`` class."
+    ]
+   }
+  ],
diff --git a/patches/use_tmp_path.patch b/patches/use_tmp_path.patch
new file mode 100644 (file)
index 0000000..827219c
--- /dev/null
@@ -0,0 +1,65 @@
+Description: Don't try to write to the source directory
+
+Not allowed in autopkgtest
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Forwarded: no
+
+diff --git a/statsmodels/datasets/tests/test_utils.py b/statsmodels/datasets/tests/test_utils.py
+index fb582c836..c31aa4546 100644
+--- a/statsmodels/datasets/tests/test_utils.py
++++ b/statsmodels/datasets/tests/test_utils.py
+@@ -10,45 +10,43 @@ import pytest
+ from statsmodels.datasets import get_rdataset, webuse, check_internet, utils
+-cur_dir = os.path.dirname(os.path.abspath(__file__))
+-
+ IGNORED_EXCEPTIONS = (HTTPError, URLError, SSLError,  UnicodeEncodeError,
+                       timeout)
+ @pytest.mark.smoke
+-def test_get_rdataset():
++def test_get_rdataset(tmp_path):
+     test_url = "https://raw.githubusercontent.com/vincentarelbundock/" \
+                "Rdatasets/master/csv/datasets/cars.csv"
+     internet_available = check_internet(test_url)
+     if not internet_available:
+         pytest.skip('Unable to retrieve file - skipping test')
+     try:
+-        duncan = get_rdataset("Duncan", "carData", cache=cur_dir)
++        duncan = get_rdataset("Duncan", "carData", cache=tmp_path)
+     except IGNORED_EXCEPTIONS:
+         pytest.skip('Failed with HTTPError or URLError, these are random')
+     assert_(isinstance(duncan, utils.Dataset))
+-    duncan = get_rdataset("Duncan", "carData", cache=cur_dir)
++    duncan = get_rdataset("Duncan", "carData", cache=tmp_path)
+     assert_(duncan.from_cache)
+ @pytest.mark.smoke
+-def test_get_rdataset_write_read_cache():
++def test_get_rdataset_write_read_cache(tmp_path):
+     # test writing and reading cache
+     try:
+-        guerry = get_rdataset("Guerry", "HistData", cache=cur_dir)
++        guerry = get_rdataset("Guerry", "HistData", cache=tmp_path)
+     except IGNORED_EXCEPTIONS:
+         pytest.skip('Failed with HTTPError or URLError, these are random')
+     assert_(guerry.from_cache is False)
+-    guerry2 = get_rdataset("Guerry", "HistData", cache=cur_dir)
++    guerry2 = get_rdataset("Guerry", "HistData", cache=tmp_path)
+     assert_(guerry2.from_cache is True)
+     fn = "raw.githubusercontent.com,vincentarelbundock,Rdatasets,master,csv," \
+          "HistData,Guerry-v2.csv.zip"
+-    os.remove(os.path.join(cur_dir, fn))
++    os.remove(os.path.join(tmp_path, fn))
+     fn = "raw.githubusercontent.com,vincentarelbundock,Rdatasets,master,doc," \
+          "HistData,rst,Guerry-v2.rst.zip"
+-    os.remove(os.path.join(cur_dir, fn))
++    os.remove(os.path.join(tmp_path, fn))
+ def test_webuse():
diff --git a/patches/xfail_kalman_armhf.patch b/patches/xfail_kalman_armhf.patch
new file mode 100644 (file)
index 0000000..b7ba3ce
--- /dev/null
@@ -0,0 +1,469 @@
+Description: KalmanFilter broken on armhf / hppa
+
+Warn on use, and xfail the tests
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Bug-Debian: https://bugs.debian.org/924036
+Bug-Ubuntu: https://launchpad.net/bugs/1819227
+Forwarded: no
+
+--- a/statsmodels/tsa/statespace/representation.py
++++ b/statsmodels/tsa/statespace/representation.py
+@@ -12,6 +12,10 @@ from .tools import (
+ )
+ from .initialization import Initialization
+ from . import tools
++import platform
++import warnings
++import sys
++warn_kalman = "Representation/KalmanFilter (and hence much of tsa.statespace) can give wrong results on armhf (armv7) and hppa - https://bugs.debian.org/924036" if ((platform.uname()[4].startswith('arm') or platform.uname()[4].startswith('aarch') or platform.uname()[4].startswith('hppa')) and np.log2(sys.maxsize)<=32) else False # test results at end of https://buildd.debian.org/status/fetch.php?pkg=statsmodels&arch=armhf&ver=0.8.0-8&stamp=1551488279&raw=0 ; the use of log2 rather than 2**32 is to avoid overflow on Python 2
+ class OptionWrapper(object):
+@@ -260,6 +264,8 @@ class Representation(object):
+                  design=None, obs_intercept=None, obs_cov=None,
+                  transition=None, state_intercept=None, selection=None,
+                  state_cov=None, statespace_classes=None, **kwargs):
++        if warn_kalman:
++            warnings.warn(warn_kalman)
+         self.shapes = {}
+         # Check if k_endog is actually the endog array
+--- a/statsmodels/tsa/statespace/tests/test_kalman.py
++++ b/statsmodels/tsa/statespace/tests/test_kalman.py
+@@ -24,6 +24,7 @@ import copy
+ import numpy as np
+ import pandas as pd
+ import os
++from statsmodels.tsa.statespace.representation import warn_kalman
+ import pytest
+ from scipy.linalg.blas import find_best_blas_type
+@@ -294,7 +295,7 @@ class TestClark1987SingleComplex(Clark19
+             atol=1e-2
+         )
+-
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ class TestClark1987DoubleComplex(Clark1987):
+     """
+     Basic double precision complex test for the loglikelihood and filtered
+@@ -363,7 +364,7 @@ class TestClark1987ForecastDouble(Clark1
+         cls.model, cls.filter = cls.init_filter()
+         cls.result = cls.run_filter()
+-
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ class TestClark1987ForecastDoubleComplex(Clark1987Forecast):
+     """
+     Basic double complex forecasting test for the loglikelihood and filtered
+@@ -654,7 +655,7 @@ class TestClark1989ForecastDouble(Clark1
+         cls.model, cls.filter = cls.init_filter()
+         cls.result = cls.run_filter()
+-
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ class TestClark1989ForecastDoubleComplex(Clark1989Forecast):
+     """
+     Basic double complex forecasting test for the loglikelihood and filtered
+--- a/statsmodels/tsa/statespace/tests/test_mlemodel.py
++++ b/statsmodels/tsa/statespace/tests/test_mlemodel.py
+@@ -9,6 +9,7 @@ from __future__ import division, absolut
+ import os
+ import re
+ import warnings
++from statsmodels.tsa.statespace.representation import warn_kalman
+ import numpy as np
+ import pandas as pd
+@@ -275,7 +276,7 @@ def test_score_misc():
+ def test_from_formula():
+     assert_raises(NotImplementedError, lambda: MLEModel.from_formula(1, 2, 3))
+-
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_score_analytic_ar1():
+     # Test the score against the analytic score for an AR(1) model with 2
+     # observations
+@@ -444,6 +445,7 @@ def test_cov_params():
+             mod.fit(res.params, disp=-1, cov_type='invalid_cov_type')
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_transform():
+     # The transforms in MLEModel are noops
+     mod = MLEModel([1, 2], **kwargs)
+--- a/statsmodels/tsa/statespace/tests/test_representation.py
++++ b/statsmodels/tsa/statespace/tests/test_representation.py
+@@ -17,6 +17,7 @@ from __future__ import division, absolut
+ import os
+ import warnings
++from statsmodels.tsa.statespace.representation import warn_kalman
+ import numpy as np
+ import pandas as pd
+ import pytest
+@@ -222,7 +223,7 @@ class TestClark1987ForecastDouble(Clark1
+         super(TestClark1987ForecastDouble, cls).setup_class()
+         cls.results = cls.run_filter()
+-
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ class TestClark1987ForecastDoubleComplex(Clark1987Forecast):
+     """
+     Basic double complex forecasting test for the loglikelihood and filtered
+@@ -455,7 +456,7 @@ class TestClark1989ForecastDouble(Clark1
+         super(TestClark1989ForecastDouble, cls).setup_class()
+         cls.results = cls.run_filter()
+-
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ class TestClark1989ForecastDoubleComplex(Clark1989Forecast):
+     """
+     Basic double complex forecasting test for the loglikelihood and filtered
+--- a/statsmodels/tsa/statespace/tests/test_dynamic_factor.py
++++ b/statsmodels/tsa/statespace/tests/test_dynamic_factor.py
+@@ -17,13 +17,15 @@ import pytest
+ from statsmodels.tsa.statespace import dynamic_factor
+ from .results import results_varmax, results_dynamic_factor
+ from statsmodels.iolib.summary import forg
++from statsmodels.tsa.statespace.representation import warn_kalman
++import pytest
+ current_path = os.path.dirname(os.path.abspath(__file__))
+ output_path = os.path.join('results', 'results_dynamic_factor_stata.csv')
+ output_results = pd.read_csv(os.path.join(current_path, output_path))
+-
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ class CheckDynamicFactor(object):
+     @classmethod
+     def setup_class(cls, true, k_factors, factor_order, cov_type='approx',
+--- a/statsmodels/tsa/statespace/tests/test_sarimax.py
++++ b/statsmodels/tsa/statespace/tests/test_sarimax.py
+@@ -11,6 +11,7 @@ import warnings
+ from statsmodels.compat.platform import PLATFORM_WIN
++from statsmodels.tsa.statespace.representation import warn_kalman
+ import numpy as np
+ import pandas as pd
+ import pytest
+@@ -33,6 +34,7 @@ coverage_path = os.path.join('results',
+ coverage_results = pd.read_csv(os.path.join(current_path, coverage_path))
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ class TestSARIMAXStatsmodels(object):
+     """
+     Test ARIMA model using SARIMAX class against statsmodels ARIMA class
+@@ -126,6 +128,7 @@ class TestRealGDPARStata(object):
+         )
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ class SARIMAXStataTests(object):
+     def test_loglike(self):
+         assert_almost_equal(
+@@ -1023,6 +1026,7 @@ class SARIMAXCoverageTest(object):
+         model.enforce_stationarity = stat
+         model.enforce_invertibility = inv
++    @pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+     def test_results(self):
+         self.result = self.model.filter(self.true_params)
+@@ -1785,6 +1789,7 @@ class Test_seasonal_arma_trend_polynomia
+         tps = cls.true_params
+         cls.true_params[:2] = (1 - tps[2:5].sum()) * tps[:2]
++    @pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+     def test_results(self):
+         self.result = self.model.filter(self.true_params)
+@@ -1835,6 +1840,7 @@ class Test_seasonal_arma_diff_seasonal_d
+         super(Test_seasonal_arma_diff_seasonal_diff, cls).setup_class(
+             47, *args, **kwargs)
++    @pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+     def test_results(self):
+         self.result = self.model.filter(self.true_params)
+@@ -2092,6 +2098,7 @@ def test_results():
+     assert_almost_equal(res.maparams, [-0.5])
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_misc_exog():
+     # Tests for missing data
+     nobs = 20
+--- a/statsmodels/tsa/statespace/tests/test_varmax.py
++++ b/statsmodels/tsa/statespace/tests/test_varmax.py
+@@ -16,6 +16,7 @@ import pytest
+ from statsmodels.tsa.statespace import varmax
+ from statsmodels.iolib.summary import forg
++from statsmodels.tsa.statespace.representation import warn_kalman
+ from .results import results_varmax
+@@ -28,6 +29,7 @@ varmax_path = os.path.join('results', 'r
+ varmax_results = pd.read_csv(os.path.join(current_path, varmax_path))
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ class CheckVARMAX(object):
+     """
+     Test Vector Autoregression against Stata's `dfactor` code (Stata's
+@@ -875,6 +877,7 @@ def test_misspecifications():
+     warnings.resetwarnings()
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_misc_exog():
+     # Tests for missing data
+     nobs = 20
+--- a/statsmodels/tsa/innovations/tests/test_arma_innovations.py
++++ b/statsmodels/tsa/innovations/tests/test_arma_innovations.py
+@@ -9,8 +9,10 @@ from numpy.testing import assert_allclos
+ from statsmodels.tsa.innovations import arma_innovations
+ from statsmodels.tsa.statespace.sarimax import SARIMAX
++from statsmodels.tsa.statespace.representation import warn_kalman
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ @pytest.mark.parametrize("ar_params,ma_params,sigma2", [
+     (np.array([]), np.array([]), 1),
+     (np.array([0.]), np.array([0.]), 1),
+--- a/statsmodels/tsa/statespace/tests/test_save.py
++++ b/statsmodels/tsa/statespace/tests/test_save.py
+@@ -8,6 +8,7 @@ from statsmodels.compat import cPickle
+ import tempfile
+ import os
++from statsmodels.tsa.statespace.representation import warn_kalman
+ import pytest
+ from statsmodels import datasets
+@@ -29,6 +30,7 @@ def temp_filename():
+               "{filename}.".format(filename=filename))
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_sarimax(temp_filename):
+     mod = sarimax.SARIMAX(macrodata['realgdp'].values, order=(4, 1, 0))
+     res = mod.smooth(mod.start_params)
+@@ -40,6 +42,7 @@ def test_sarimax(temp_filename):
+     assert_allclose(res.llf, res2.llf)
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_sarimax_pickle():
+     mod = sarimax.SARIMAX(macrodata['realgdp'].values, order=(4, 1, 0))
+     pkl_mod = cPickle.loads(cPickle.dumps(mod))
+@@ -52,6 +55,7 @@ def test_sarimax_pickle():
+     assert_allclose(res.llf, pkl_res.llf)
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_structural(temp_filename):
+     mod = structural.UnobservedComponents(
+         macrodata['realgdp'].values, 'llevel')
+@@ -64,6 +68,7 @@ def test_structural(temp_filename):
+     assert_allclose(res.llf, res2.llf)
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_structural_pickle():
+     mod = structural.UnobservedComponents(
+         macrodata['realgdp'].values, 'llevel')
+@@ -77,6 +82,7 @@ def test_structural_pickle():
+     assert_allclose(res.llf, pkl_res.llf)
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_dynamic_factor(temp_filename):
+     mod = dynamic_factor.DynamicFactor(
+         macrodata[['realgdp', 'realcons']].diff().iloc[1:].values, k_factors=1,
+@@ -90,6 +96,7 @@ def test_dynamic_factor(temp_filename):
+     assert_allclose(res.llf, res2.llf)
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_dynamic_factor_pickle(temp_filename):
+     mod = varmax.VARMAX(
+         macrodata[['realgdp', 'realcons']].diff().iloc[1:].values,
+@@ -111,6 +118,7 @@ def test_dynamic_factor_pickle(temp_file
+     assert_allclose(res.llf, res2.llf)
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_varmax(temp_filename):
+     mod = varmax.VARMAX(
+         macrodata[['realgdp', 'realcons']].diff().iloc[1:].values,
+@@ -124,6 +132,7 @@ def test_varmax(temp_filename):
+     assert_allclose(res.llf, res2.llf)
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_varmax_pickle(temp_filename):
+     mod = varmax.VARMAX(
+         macrodata[['realgdp', 'realcons']].diff().iloc[1:].values,
+--- a/statsmodels/tsa/statespace/tests/test_structural.py
++++ b/statsmodels/tsa/statespace/tests/test_structural.py
+@@ -13,6 +13,7 @@ import warnings
+ import numpy as np
+ from numpy.testing import assert_equal, assert_allclose
+ import pandas as pd
++from statsmodels.tsa.statespace.representation import warn_kalman
+ import pytest
+ from statsmodels.datasets import macrodata
+@@ -168,6 +169,7 @@ def test_local_linear_deterministic_tren
+     run_ucm('local_linear_deterministic_trend')
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_local_linear_trend(close_figures):
+     run_ucm('local_linear_trend')
+@@ -180,6 +182,7 @@ def test_random_trend(close_figures):
+     run_ucm('random_trend')
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_cycle(close_figures):
+     run_ucm('cycle')
+@@ -196,10 +199,12 @@ def test_reg(close_figures):
+     run_ucm('reg')
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_rtrend_ar1(close_figures):
+     run_ucm('rtrend_ar1')
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ @pytest.mark.slow
+ def test_lltrend_cycle_seasonal_reg_ar1(close_figures):
+     run_ucm('lltrend_cycle_seasonal_reg_ar1')
+@@ -308,6 +313,7 @@ def test_forecast():
+     assert_allclose(actual, desired)
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_misc_exog():
+     # Tests for missing data
+     nobs = 20
+--- a/statsmodels/tsa/statespace/tests/test_var.py
++++ b/statsmodels/tsa/statespace/tests/test_var.py
+@@ -16,6 +16,8 @@ import os
+ import numpy as np
+ from numpy.testing import assert_allclose
+ import pandas as pd
++from statsmodels.tsa.statespace.representation import warn_kalman
++import pytest
+ from statsmodels.tsa.statespace import varmax
+ from .results import results_var_R
+@@ -101,6 +103,7 @@ def test_var_basic():
+     # FEVD: TODO
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_var_c():
+     test = 'c'
+@@ -121,6 +124,7 @@ def test_var_c():
+     # FEVD: TODO
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_var_ct():
+     test = 'ct'
+@@ -141,6 +145,7 @@ def test_var_ct():
+     # FEVD: TODO
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_var_ct_as_exog0():
+     test = 'ct_as_exog0'
+@@ -164,6 +169,7 @@ def test_var_ct_as_exog0():
+     # FEVD: TODO
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_var_ct_as_exog1():
+     test = 'ct'
+@@ -192,6 +198,7 @@ def test_var_ct_as_exog1():
+     # FEVD: TODO
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_var_ctt():
+     test = 'ctt_as_exog1'
+@@ -217,6 +224,7 @@ def test_var_ctt():
+     # FEVD: TODO
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_var_ct_exog():
+     test = 'ct_exog'
+@@ -241,6 +249,7 @@ def test_var_ct_exog():
+     # FEVD: TODO
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_var_c_2exog():
+     test = 'c_2exog'
+--- a/statsmodels/tsa/statespace/tests/test_pickle.py
++++ b/statsmodels/tsa/statespace/tests/test_pickle.py
+@@ -17,6 +17,7 @@ from __future__ import division, absolut
+ import numpy as np
+ import pandas as pd
+ from numpy.testing import assert_equal, assert_allclose
++from statsmodels.tsa.statespace.representation import warn_kalman
+ import pytest
+ from statsmodels.compat import cPickle
+@@ -39,6 +40,7 @@ def data():
+     return data_
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_pickle_fit_sarimax(data):
+     # Fit an ARIMA(1,1,0) to log GDP
+     mod = sarimax.SARIMAX(data['lgdp'], order=(1, 1, 0))
+@@ -54,6 +56,7 @@ def test_pickle_fit_sarimax(data):
+     assert_allclose(res.impulse_responses(10), res.impulse_responses(10))
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_unobserved_components_pickle():
+     # Tests for missing data
+     nobs = 20
+@@ -86,6 +89,7 @@ def test_unobserved_components_pickle():
+         assert_allclose(res.impulse_responses(10), res.impulse_responses(10))
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_kalman_filter_pickle(data):
+     # Construct the statespace representation
+     true = results_kalman_filter.uc_uni
+@@ -134,6 +138,7 @@ def test_kalman_filter_pickle(data):
+                     pkl_results.filtered_state[3][true['start']:])
++@pytest.mark.xfail(condition=bool(warn_kalman),reason='https://bugs.debian.org/924036')
+ def test_representation_pickle():
+     nobs = 10
+     k_endog = 2
diff --git a/python-statsmodels-doc.doc-base b/python-statsmodels-doc.doc-base
new file mode 100644 (file)
index 0000000..95f6ad7
--- /dev/null
@@ -0,0 +1,12 @@
+Document: python-statsmodels-doc
+Title: Statsmodels documentation
+Author: Statsmodels Developers
+Abstract: Documentation for Statsmodels classes and functions for the
+ estimation of many different statistical models, as well as for
+ conducting statistical tests, and statistical data exploration. An
+ extensive list of result statistics are available for each estimator.
+Section: Programming/Python
+
+Format: HTML
+Index: /usr/share/doc/python-statsmodels-doc/html/index.html
+Files: /usr/share/doc/python-statsmodels-doc/html/*
diff --git a/python-statsmodels-doc.docs b/python-statsmodels-doc.docs
new file mode 100644 (file)
index 0000000..8813bf9
--- /dev/null
@@ -0,0 +1,2 @@
+build/html
+docs/GLMNotes.pdf
diff --git a/python-statsmodels-doc.examples b/python-statsmodels-doc.examples
new file mode 100644 (file)
index 0000000..e39721e
--- /dev/null
@@ -0,0 +1 @@
+examples/*
diff --git a/python-statsmodels-doc.links b/python-statsmodels-doc.links
new file mode 100644 (file)
index 0000000..f0f9347
--- /dev/null
@@ -0,0 +1,2 @@
+usr/share/doc/python-statsmodels-doc/examples usr/share/doc/python3-statsmodels/examples
+usr/share/doc/python-statsmodels-doc/html usr/share/doc/python3-statsmodels/html
diff --git a/python-statsmodels-doc.maintscript b/python-statsmodels-doc.maintscript
new file mode 100644 (file)
index 0000000..7358ffd
--- /dev/null
@@ -0,0 +1,2 @@
+symlink_to_dir /usr/share/doc/python-statsmodels-doc/html ../python-statsmodels/html 0.10.2-1~ python-statsmodels-doc
+symlink_to_dir /usr/share/doc/python-statsmodels-doc/examples ../python-statsmodels/examples 0.10.2-1~ python-statsmodels-doc
diff --git a/rules b/rules
new file mode 100755 (executable)
index 0000000..cc37812
--- /dev/null
+++ b/rules
@@ -0,0 +1,158 @@
+#!/usr/bin/make -f
+# -*- mode: makefile; coding: utf-8 -*-
+
+# override HOME (for weave) and matplotlib config directory
+# to allow building in chroots with read-only HOME
+export HOME=$(CURDIR)/build
+export MPLCONFIGDIR=$(HOME)
+
+#block internet access
+export http_proxy=127.0.0.1:9
+export https_proxy=127.0.0.1:9
+
+export PY3VER=$(shell py3versions -vd)
+SOURCE_DATE:=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%a, %d %b %Y" || echo "xxx, xx xxx xxxx")
+SOURCE_TIME:=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%T" || echo "xx:xx:xx")
+
+export PYBUILD_NAME=statsmodels
+export PYBUILD_INSTALL_ARGS=--install-layout=deb
+
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+%:
+       dh $@ --with python3,sphinxdoc --buildsystem=pybuild
+
+# To guarantee HOME existence with mpl 1.3.0
+# See https://github.com/matplotlib/matplotlib/issues/2300
+#     https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719384
+$(HOME):
+       mkdir "$@"
+       : # Hardcode backend to Agg to avoid doc build and tests failures
+       echo "backend : Agg" >| $(MPLCONFIGDIR)/matplotlibrc
+
+override_dh_auto_build-arch: $(HOME)
+       dh_auto_build
+
+override_dh_auto_build-indep: $(HOME)
+       : # Documentation depends on built package
+       dh_auto_build
+       : # I: Generate documentation
+       : # Build Documentation -- assure existence of build/html for nodoc
+       : # Reproducibility: stopping the clock (or slowing it down enough to get all 00:00:00) with faketime (near-)hangs in glm_weights.ipynb
+       mkdir -p build/html
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
+       python3 debian/datasets/prepopulate_cache.py
+       PYTHONPATH=$(shell pybuild --print build_dir --interpreter python3) \
+       BUILDDIR=$(CURDIR)/build \
+       STATSMODELS_DATA=$(CURDIR)/build/datacache/ \
+        LC_ALL=C.UTF-8 make -C docs html
+       mv docs/build/* build/
+       : # Fix up links to MathJax to be local
+       grep -l '/mathjax/' -R build/html/examples/notebooks \
+       | xargs -r sed -i -e 's,https://\S*.org/mathjax/latest/MathJax.js,file:///usr/share/javascript/mathjax/MathJax.js,g'
+       : # Replace require
+       grep -l '/require\.js/' -R build/html/examples/notebooks \
+       | xargs -r sed -i -e 's,https://\S*.com/ajax/libs/require.js/.*/require.min.js,file:///usr/share/javascript/requirejs/require.min.js,g'
+       grep -l '/jquery/' -R build/html/examples/notebooks \
+       | xargs -r sed -i -e 's,https://\S*.com/ajax/libs/jquery/.*/jquery.min.js,file:///usr/share/javascript/jquery/jquery.min.js,g'
+       : # replace timestamps and build paths in examples output for reproducibility
+       for html in `find build/html examples -name _modules -prune -o -name "*.html" -o -name "*.ipynb"` ; do \
+           sed -i -e 's#$(CURDIR)/.pybuild/[^/]*/build/statsmodels/#/usr/lib/python3/dist-packages/statsmodels/#g' \
+           -e 's#\(Date:.*\)[A-Z][a-z]\+, \+[0-9]\+,\? \+[A-Z][a-z]\+,\? \+[0-9]\+#\1$(SOURCE_DATE)#g' \
+           -e 's#\(Time:.*\)[0-9][0-9]:[0-9][0-9]:[0-9][0-9]#\1$(SOURCE_TIME)#g' $${html} ; \
+       done
+endif
+
+override_dh_installdocs:
+       rm -rf docs/source/generated/
+       dh_installdocs
+       for html in `find debian -name "*.html"` ; do \
+           sed -i 's#https://cdnjs\..*/mathjax/.*/MathJax.js\(?config=TeX.*L">\)#file:///usr/share/javascript/mathjax/MathJax.js\1#' $${html} ; \
+           sed -i 's#https://cdnjs\..*/mathjax/.*/latest.js#file:///usr/share/javascript/mathjax/unpacked/latest.js#' $${html} ; \
+       done
+
+override_dh_auto_clean:
+       # this would try to run setup.py clean, which is an error: dh_auto_clean
+       -rm -rf cythonize.dat \
+              *.egg-info \
+              *.png \
+              .pybuild \
+              .pytest_cache \
+              build \
+              docs/build/ \
+              docs/rehab.table \
+              docs/salary.table \
+              docs/source/datasets/generated \
+              docs/source/examples/notebooks \
+              docs/source/savefig \
+              docs/source/dev/generated \
+              docs/source/datasets/statsmodels.datasets.*.rst \
+              docs/source/examples/notebooks/generated \
+              examples/executed \
+              tools/hash_dict.pickle
+       find . -name __pycache__ -print0 | xargs -0 rm -rf
+       find . -name *.pyx -print0 | sed -e "s/\.pyx/.c/g" | xargs -0 rm -f
+       find . -name *.pyx.in -print0 | sed -e "s/\.pyx\.in/.pyx/g" | xargs -0 rm -f
+       : # Remove autogenerated version.py
+       rm -f statsmodels/version.py
+
+override_dh_install:
+       dh_install
+       rm -f debian/*/usr/setup.cfg
+       : # Remove compiled due to testing files
+       find debian -name *.pyc -delete
+       rm -f debian/*/usr/lib/*/dist-packages/enet_poisson.csv debian/*/usr/lib/*/dist-packages/enet_binomial.csv
+       : # strip docs/ since they aren't really a Python module, there is -doc for it
+       : # TODO find debian -wholename \*scikits/statsmodels/docs | xargs rm -rf
+       find debian -iname COPYING -o -iname LICENSE* | xargs -r rm -f
+
+# statsmodels has a conftest.py that uses testroot-only features, so the tests must be run from the statsmodels directory, not its parent
+# https://github.com/statsmodels/statsmodels/issues/5108
+# the cd is to be "anywhere but pkgroot" to avoid subprocesses (test_lazy_imports) importing the source tree (current directory is tried before PYTHONPATH), which doesn't work because the built .so files aren't there
+# the inner 'for' (expected to be a single item, cpython3_${testpy3ver}_statsmodels/build) is because globs aren't expanded when setting env vars
+# TEST_SUCCESS is used because the return status of a for-loop is its last item, not the "fail if any of them do" wanted here
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+       TEST_SUCCESS=true ; cd tools && for testpy3ver in `py3versions -vs` ; do \
+       for testpath in ../.pybuild/*$${testpy3ver}*/*/statsmodels ; do \
+       PYTHONPATH=$${testpath}/.. python$${testpy3ver} -m pytest -v $${testpath} || TEST_SUCCESS=false ; \
+       rm -rf $${testpath}/.pytest_cache ; \
+       done ; done ; $${TEST_SUCCESS}
+endif
+
+## immediately useable documentation and exemplar scripts/data
+override_dh_compress:
+       dh_compress -X.py -X.html -X.pdf -X.css -X.jpg -X.txt -X.js -X.json -X.rtc -X.inv -Xobjects.inv
+
+override_dh_link:
+       : # deduplicate images - the ||true is because we only build-depend on jdupes if we're building documentation
+       jdupes -r -l debian/python-statsmodels-doc/usr/share/doc || true
+       dh_link
+
+## move binary libraries into -lib
+override_dh_auto_install:
+       dh_auto_install
+       for PACKAGE_NAME in python3-statsmodels; do \
+         for lib in $$(find debian/$${PACKAGE_NAME}/usr -name '*.so'); do \
+            sdir=$$(dirname $$lib) ; \
+            tdir=debian/$${PACKAGE_NAME}-lib/$${sdir#*$${PACKAGE_NAME}/} ; \
+            mkdir -p $$tdir ; \
+            echo "I: Moving '$$lib' into '$$tdir'." ; \
+            mv $$lib $$tdir ; \
+         done ; \
+       done
+       : # Prune scikits/__init__.py to avoid conflicts
+       find debian -wholename \*scikits/__init__.py -delete
+       : # Move scikits. space into a compatibility package
+       set -e; \
+       find debian -wholename \*scikits -type d | while read skd; do \
+               skbd=$$(dirname $$skd); \
+               skbd_=$$(echo $$skbd | sed -e 's/python3-statsmodels/python3-scikits.statsmodels/g'); \
+               mkdir -p $$skbd_; \
+               mv $$skd $$skbd_; \
+       done
+       dh_numpy3
+
+override_dh_fixperms:
+       dh_fixperms
+       find debian -name "*.txt" -exec chmod -x \{\} \;
diff --git a/source/format b/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/source/lintian-overrides b/source/lintian-overrides
new file mode 100644 (file)
index 0000000..8f72fd1
--- /dev/null
@@ -0,0 +1,2 @@
+# Perfectly fine source file with a little HTML snippet one-lined
+statsmodels source: source-is-missing docs/source/_static/scripts.js *
diff --git a/tests/control b/tests/control
new file mode 100644 (file)
index 0000000..44f87ed
--- /dev/null
@@ -0,0 +1,8 @@
+Test-Command: set -e
+ ; for py in $(py3versions -r 2>/dev/null)
+ ; do cd "$ADTTMP" ; echo "Testing with $py:"
+ ; $py -m pytest -v /usr/lib/python3/dist-packages/statsmodels
+ ; done
+Depends: python3-all, python3-statsmodels, python3-nose, python3-pytest
+Restrictions: allow-stderr
+
diff --git a/upstream/metadata b/upstream/metadata
new file mode 100644 (file)
index 0000000..18e03ae
--- /dev/null
@@ -0,0 +1,11 @@
+Name: statsmodels
+Repository: https://github.com/statsmodels/statsmodels
+Documentation: https://www.statsmodels.org/stable/
+Bug-Database: https://github.com/statsmodels/statsmodels/issues
+Contact: https://groups.google.com/group/pystatsmodels
+Reference:
+  Title: "Statsmodels: Econometric and statistical modeling with python"
+  Eprint: https://conference.scipy.org/proceedings/scipy2010/pdfs/seabold.pdf
+  Author: Seabold, Skipper and Perktold, Josef
+  Booktitle: 9th Python in Science Conference
+  Year: 2010
diff --git a/watch b/watch
new file mode 100644 (file)
index 0000000..532fa59
--- /dev/null
+++ b/watch
@@ -0,0 +1,3 @@
+version=4
+opts="uversionmangle=s/rc/~rc/g;s/dev/~dev/g,filenamemangle=s/.*\/(.*)/statsmodels-$1/" \
+ https://github.com/statsmodels/statsmodels/tags .*archive/v?(\d[\d.]+)\.tar\.gz