[gentoo-commits] repo/gentoo:master commit in: dev-python/statsmodels/, dev-python/statsmodels/files/
commit: 8d3937e624e9060298f98cbccf3a5ee8fdbece26 Author: Michał Górny gentoo org> AuthorDate: Sun Mar 10 13:20:31 2024 + Commit: Michał Górny gentoo org> CommitDate: Sun Mar 10 13:24:12 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d3937e6 dev-python/statsmodels: Remove old Closes: https://bugs.gentoo.org/912221 Signed-off-by: Michał Górny gentoo.org> dev-python/statsmodels/Manifest| 1 - .../files/statsmodels-0.14.0-test.patch| 30 --- dev-python/statsmodels/statsmodels-0.14.0.ebuild | 92 -- 3 files changed, 123 deletions(-) diff --git a/dev-python/statsmodels/Manifest b/dev-python/statsmodels/Manifest index 153f0ca3c59c..cabad4cc1cc4 100644 --- a/dev-python/statsmodels/Manifest +++ b/dev-python/statsmodels/Manifest @@ -1,2 +1 @@ -DIST statsmodels-0.14.0.tar.gz 19374614 BLAKE2B b24c8c146ea9ed393da8e839e3c9a80b1ddaa6fe319204f4440b3435c756911bc1b6405544c6ab8e4370fd378ba26715da743e4d082af7774b8cefa8649d6c58 SHA512 876cc45eb4b5badee2ff859df8a45ce7c4f6ab2973d481f58c5b7906ebcdbb56a64769d5dd7a38c7b7415a4ee7cf98cf300b8c623bda9df001b982ff6844d1fd DIST statsmodels-0.14.1.tar.gz 20309647 BLAKE2B ef9b70671b78eb45b48997c5a8ea35828b7722b31a6c77d55b81f4aad6ddb3608305a3319a0d284797654ef2bbd5f25416459450a6b26be56b9e3e3137fccac8 SHA512 e382ca807205e2aeff76dd22b42e7824914472588ea040d90835fd46e0c993e155828c58e81f53f9539ad9bdf195bbbd1a49a45658187498d60287374112fd68 diff --git a/dev-python/statsmodels/files/statsmodels-0.14.0-test.patch b/dev-python/statsmodels/files/statsmodels-0.14.0-test.patch deleted file mode 100644 index db63fbdca403.. --- a/dev-python/statsmodels/files/statsmodels-0.14.0-test.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 39a33cc65573b57a5d31ac4e9393a7c1e050da22 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Sat, 6 May 2023 07:43:28 +0200 -Subject: [PATCH] TST: install missing *.csv files needed by tsa.stl tests - -Closes #8869 - setup.py | 1 + - statsmodels/tsa/stl/tests/results/__init__.py | 0 - 2 files changed, 1 insertion(+) - create mode 100644 statsmodels/tsa/stl/tests/results/__init__.py - -diff --git a/setup.py b/setup.py -index 69141b2bd..c2fdc532b 100644 a/setup.py -+++ b/setup.py -@@ -126,6 +126,7 @@ ADDITIONAL_PACKAGE_DATA = { - "statsmodels.datasets.tests": ["*.zip"], - "statsmodels.iolib.tests.results": ["*.dta"], - "statsmodels.stats.tests.results": ["*.json"], -+"statsmodels.tsa.stl.tests.results": ["*.csv"], - "statsmodels.tsa.vector_ar.tests.results": ["*.npz", "*.dat"], - "statsmodels.stats.tests": ["*.txt"], - "statsmodels.stats.libqsturng": ["*.r", "*.txt", "*.dat"], -diff --git a/statsmodels/tsa/stl/tests/results/__init__.py b/statsmodels/tsa/stl/tests/results/__init__.py -new file mode 100644 -index 0..e69de29bb --- -2.40.1 - diff --git a/dev-python/statsmodels/statsmodels-0.14.0.ebuild b/dev-python/statsmodels/statsmodels-0.14.0.ebuild deleted file mode 100644 index 69d993e13f9e.. --- a/dev-python/statsmodels/statsmodels-0.14.0.ebuild +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_EXT=1 -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..11} ) - -inherit distutils-r1 multiprocessing optfeature pypi - -DESCRIPTION="Statistical computations and models for use with SciPy" -HOMEPAGE=" - https://www.statsmodels.org/stable/index.html - https://github.com/statsmodels/statsmodels/ - https://pypi.org/project/statsmodels/ -" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="amd64 arm64 ppc64 ~riscv ~s390 ~sparc ~amd64-linux" -IUSE="examples" - -DEPEND=" - >=dev-python/numpy-1.17[${PYTHON_USEDEP}] - >=dev-python/scipy-1.3[${PYTHON_USEDEP}] -" -RDEPEND=" - ${DEPEND} - >=dev-python/numpy-1.17[${PYTHON_USEDEP}] - >=dev-python/packaging-21.3[${PYTHON_USEDEP}] - >=dev-python/pandas-0.25[${PYTHON_USEDEP}] - >=dev-python/patsy-0.5.2[${PYTHON_USEDEP}] - >=dev-python/scipy-1.3[${PYTHON_USEDEP}] -" -# https://github.com/statsmodels/statsmodels/issues/8868 for "${MPLCONFIGDIR}"/matplotlibrc || die - - distutils-r1_python_prepare_all -} - -python_test() { - local -x MKL_NUM_THREADS=1 - local -x OMP_NUM_THREADS=1 - local EPYTEST_DESELECT=( - # note that test path should be without "statsmodels/" prefix - imputation/tests/test_mice.py::TestMICE::test_combine - stats/tests/test_mediation.py::test_mixedlm - "stats/tests/test_corrpsd.py::test_corrpsd_threshold[0]" - ) - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 - - cd "${BUILD_DIR}/install$(python_get_sitedir)" || die - epytest statsmodels -p xdist -n "$(makeopts_jobs)" -} - -python_install_all() { - if use
[gentoo-commits] repo/gentoo:master commit in: dev-python/statsmodels/, dev-python/statsmodels/files/
commit: bbb9cbd7991428b52a6ec53c3e6636a55efe98be Author: Michał Górny gentoo org> AuthorDate: Sat Jul 3 15:49:53 2021 + Commit: Michał Górny gentoo org> CommitDate: Sat Jul 3 16:06:39 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbb9cbd7 dev-python/statsmodels: Resolve more regressions, skip more tests Signed-off-by: Michał Górny gentoo.org> .../statsmodels-0.12.2-new-pandas-scipy.patch | 49 ++ ...-0.12.2.ebuild => statsmodels-0.12.2-r1.ebuild} | 7 ++-- 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/dev-python/statsmodels/files/statsmodels-0.12.2-new-pandas-scipy.patch b/dev-python/statsmodels/files/statsmodels-0.12.2-new-pandas-scipy.patch index 3015147fc2c..d11cd08ecf6 100644 --- a/dev-python/statsmodels/files/statsmodels-0.12.2-new-pandas-scipy.patch +++ b/dev-python/statsmodels/files/statsmodels-0.12.2-new-pandas-scipy.patch @@ -71,3 +71,52 @@ index d349c472d..2ee1a6e0b 100644 -- 2.32.0 +From a9e21aef508ea98da8c5889547b8e5748986dae1 Mon Sep 17 00:00:00 2001 +From: Kevin Sheppard +Date: Wed, 7 Apr 2021 09:52:25 +0100 +Subject: [PATCH] MAINT: Fix descriptive stats with extension dtypes + +Add special path for extension dtypes to remove N/A +--- + statsmodels/stats/descriptivestats.py | 17 +++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/statsmodels/stats/descriptivestats.py b/statsmodels/stats/descriptivestats.py +index d5ad2f2a5..0fd3eb542 100644 +--- a/statsmodels/stats/descriptivestats.py b/statsmodels/stats/descriptivestats.py +@@ -441,8 +441,20 @@ class Description: + loc = count > 0 + mode_freq = np.full(mode.shape[0], np.nan) + mode_freq[loc] = mode_counts[loc] / count.loc[loc] ++# TODO: Workaround for pandas AbstractMethodError in extension ++# types. Remove when quantile is supported for these ++_df = df ++try: ++from pandas.api.types import is_extension_array_dtype ++_df = df.copy() ++for col in df: ++if is_extension_array_dtype(df[col].dtype): ++_df[col] = _df[col].astype(object).fillna(np.nan) ++except ImportError: ++pass ++ + if df.shape[1] > 0: +-iqr = df.quantile(0.75) - df.quantile(0.25) ++iqr = _df.quantile(0.75) - _df.quantile(0.25) + else: + iqr = mean + +@@ -493,7 +505,8 @@ class Description: + return results_df + # Pandas before 1.0 cannot handle empty DF + if df.shape[1] > 0: +-perc = df.quantile(self._percentiles / 100).astype(float) ++# TODO: Remove when extension types support quantile ++perc = _df.quantile(self._percentiles / 100).astype(float) + else: + perc = pd.DataFrame(index=self._percentiles / 100, dtype=float) + if np.all(np.floor(100 * perc.index) == (100 * perc.index)): +-- +2.32.0 + diff --git a/dev-python/statsmodels/statsmodels-0.12.2.ebuild b/dev-python/statsmodels/statsmodels-0.12.2-r1.ebuild similarity index 91% rename from dev-python/statsmodels/statsmodels-0.12.2.ebuild rename to dev-python/statsmodels/statsmodels-0.12.2-r1.ebuild index 9b7aafc2dc0..6ad90c648a6 100644 --- a/dev-python/statsmodels/statsmodels-0.12.2.ebuild +++ b/dev-python/statsmodels/statsmodels-0.12.2-r1.ebuild @@ -51,9 +51,10 @@ python_prepare_all() { export MPLCONFIGDIR="${T}" printf -- 'backend : Agg\n' > "${MPLCONFIGDIR}"/matplotlibrc || die - # these tests require internet - sed -i -e 's:test_results_on_the:_&:' \ - statsmodels/stats/tests/test_dist_dependant_measures.py || die + sed -e 's:test_combine:_&:' \ + -i statsmodels/imputation/tests/test_mice.py || die + sed -e 's:test_mixedlm:_&:' \ + -i statsmodels/stats/tests/test_mediation.py || die distutils-r1_python_prepare_all }
[gentoo-commits] repo/gentoo:master commit in: dev-python/statsmodels/, dev-python/statsmodels/files/
commit: 1294692a53dc54644df9d3ca088f7a290a3d288c Author: Michał Górny gentoo org> AuthorDate: Mon Jun 21 08:20:00 2021 + Commit: Michał Górny gentoo org> CommitDate: Mon Jun 21 09:45:23 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1294692a dev-python/statsmodels: Fix test failures Signed-off-by: Michał Górny gentoo.org> .../statsmodels-0.12.2-new-pandas-scipy.patch | 73 ++ dev-python/statsmodels/statsmodels-0.12.2.ebuild | 3 +- 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/dev-python/statsmodels/files/statsmodels-0.12.2-new-pandas-scipy.patch b/dev-python/statsmodels/files/statsmodels-0.12.2-new-pandas-scipy.patch new file mode 100644 index 000..3015147fc2c --- /dev/null +++ b/dev-python/statsmodels/files/statsmodels-0.12.2-new-pandas-scipy.patch @@ -0,0 +1,73 @@ +From 4f32f3990fbba0ee440af47e23a9354fdb7a0285 Mon Sep 17 00:00:00 2001 +From: Kevin Sheppard +Date: Fri, 12 Mar 2021 10:52:38 + +Subject: [PATCH] MAINT: Fix issues arising from future changes + +Fix issues due to changes in SciPy and pandas +--- + statsmodels/regression/tests/test_rolling.py | 6 -- + statsmodels/stats/descriptivestats.py| 8 +++- + statsmodels/stats/stattools.py | 4 +++- + 3 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/statsmodels/regression/tests/test_rolling.py b/statsmodels/regression/tests/test_rolling.py +index 050de605f..f02e076d6 100644 +--- a/statsmodels/regression/tests/test_rolling.py b/statsmodels/regression/tests/test_rolling.py +@@ -1,5 +1,6 @@ + from io import BytesIO + from itertools import product ++import warnings + + import numpy as np + import pandas as pd +@@ -261,8 +262,9 @@ def test_plot(): + res.plot_recursive_coefficient(variables="x4") + + fig = plt.Figure() +-with pytest.warns(Warning): +-# Just silence the warning ++# Just silence the warning ++with warnings.catch_warnings(): ++warnings.simplefilter("ignore") + out = res.plot_recursive_coefficient(fig=fig) + assert out is fig + res.plot_recursive_coefficient(alpha=None, figsize=(30, 7)) +diff --git a/statsmodels/stats/descriptivestats.py b/statsmodels/stats/descriptivestats.py +index 96d455ca1..d5ad2f2a5 100644 +--- a/statsmodels/stats/descriptivestats.py b/statsmodels/stats/descriptivestats.py +@@ -446,8 +446,14 @@ class Description: + else: + iqr = mean + ++def _safe_jarque_bera(c): ++a = np.asarray(c) ++if a.shape[0] < 2: ++return (np.nan,) * 4 ++return jarque_bera(a) ++ + jb = df.apply( +-lambda x: list(jarque_bera(x.dropna())), result_type="expand" ++lambda x: list(_safe_jarque_bera(x.dropna())), result_type="expand" + ).T + nan_mean = mean.copy() + nan_mean.loc[nan_mean == 0] = np.nan +diff --git a/statsmodels/stats/stattools.py b/statsmodels/stats/stattools.py +index d349c472d..2ee1a6e0b 100644 +--- a/statsmodels/stats/stattools.py b/statsmodels/stats/stattools.py +@@ -118,7 +118,9 @@ def jarque_bera(resids, axis=0): + where n is the number of data points, S is the sample skewness, and K is + the sample kurtosis of the data. + """ +-resids = np.asarray(resids) ++resids = np.atleast_1d(np.asarray(resids, dtype=float)) ++if resids.size < 2: ++raise ValueError("resids must contain at least 2 elements") + # Calculate residual skewness and kurtosis + skew = stats.skew(resids, axis=axis) + kurtosis = 3 + stats.kurtosis(resids, axis=axis) +-- +2.32.0 + diff --git a/dev-python/statsmodels/statsmodels-0.12.2.ebuild b/dev-python/statsmodels/statsmodels-0.12.2.ebuild index d67ff026af4..9b7aafc2dc0 100644 --- a/dev-python/statsmodels/statsmodels-0.12.2.ebuild +++ b/dev-python/statsmodels/statsmodels-0.12.2.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_COMPAT=( python3_{8..9} ) inherit distutils-r1 optfeature @@ -33,6 +33,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}/statsmodels-0.11.1-tests.patch" + "${FILESDIR}/${P}-new-pandas-scipy.patch" ) distutils_enable_sphinx docs \
[gentoo-commits] repo/gentoo:master commit in: dev-python/statsmodels/, dev-python/statsmodels/files/
commit: 26cf682af66d095e851eae34912e9770701ad0f0 Author: Patrick McLean sony com> AuthorDate: Wed Apr 29 05:49:29 2020 + Commit: Patrick McLean gentoo org> CommitDate: Wed Apr 29 05:49:29 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26cf682a dev-python/statsmodels-0.11.1: Version bump Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Patrick McLean gentoo.org> dev-python/statsmodels/Manifest| 1 + .../files/statsmodels-0.11.1-tests.patch | 35 ++ dev-python/statsmodels/statsmodels-0.10.2.ebuild | 2 +- ...els-0.10.2.ebuild => statsmodels-0.11.1.ebuild} | 32 +--- 4 files changed, 58 insertions(+), 12 deletions(-) diff --git a/dev-python/statsmodels/Manifest b/dev-python/statsmodels/Manifest index cc231b7edff..7fcf0bc04fb 100644 --- a/dev-python/statsmodels/Manifest +++ b/dev-python/statsmodels/Manifest @@ -1 +1,2 @@ DIST statsmodels-0.10.2.tar.gz 14065612 BLAKE2B 0df1268de5e4108b3cc541df87a5b9d2321bd3062d4daf1cc1aa62ab08ee777bace2f10bdfb51f088a66f15287c62cf851b3f43efa7eb1227e71c06632e80d55 SHA512 bd1c0784b0b17a3ca69fef5848f5eea8dcf76b1943599a5e5c285e45b7fcc7e44c0e388f007913d420ff6f3cb66a653d1c43e6e8addef534ff5572fa69ffb54a +DIST statsmodels-0.11.1.tar.gz 15381516 BLAKE2B a40cf9138edd8a9a6707a550d9885e0610f9bc666fcd73a60bd11ade6dcfa806ecd912a725cf2a13902e92f31af2c3e82f244280f70586bb3359dc8fc2842508 SHA512 54afe55a23b431154c159f44d284aa093f3368988f0695c0f3fbb206046cdfb171ab2ba51ce94285d567b8536141f93a1ef404b5f7222f1e61264baf0541926d diff --git a/dev-python/statsmodels/files/statsmodels-0.11.1-tests.patch b/dev-python/statsmodels/files/statsmodels-0.11.1-tests.patch new file mode 100644 index 000..9a1a258d077 --- /dev/null +++ b/dev-python/statsmodels/files/statsmodels-0.11.1-tests.patch @@ -0,0 +1,35 @@ +diff -ur statsmodels-0.11.1.orig/statsmodels/base/tests/test_penalized.py statsmodels-0.11.1/statsmodels/base/tests/test_penalized.py +--- statsmodels-0.11.1.orig/statsmodels/base/tests/test_penalized.py 2020-04-28 22:02:47.150938650 -0700 statsmodels-0.11.1/statsmodels/base/tests/test_penalized.py 2020-04-28 22:03:24.468704937 -0700 +@@ -73,6 +73,7 @@ + y = np.random.poisson(mu) + return y + ++@pytest.mark.skip("Broken on all impls") + def test_params_table(self): + res1 = self.res1 + res2 = self.res2 +@@ -380,9 +381,6 @@ + bse = np.array([0.028126650444581985, 0.033099984564283147, + 0.033184585514904545, 0.034282504130503301]) + assert_allclose(res2.params[:self.k_nonzero], params, atol=1e-5) +-assert_allclose(res2.bse[:self.k_nonzero], bse, rtol=5e-6) +-assert_allclose(res1.params[:self.k_nonzero], params, atol=1e-5) +-assert_allclose(res1.bse[:self.k_nonzero], bse, rtol=5e-6) + + + # the following classes are copies of Poisson with model adjustments +Only in statsmodels-0.11.1/statsmodels/base/tests: test_penalized.py.orig +diff -ur statsmodels-0.11.1.orig/statsmodels/tsa/statespace/tests/test_structural.py statsmodels-0.11.1/statsmodels/tsa/statespace/tests/test_structural.py +--- statsmodels-0.11.1.orig/statsmodels/tsa/statespace/tests/test_structural.py 2020-04-28 22:02:47.207938293 -0700 statsmodels-0.11.1/statsmodels/tsa/statespace/tests/test_structural.py 2020-04-28 22:04:02.871464429 -0700 +@@ -243,7 +243,7 @@ + run_ucm('rtrend_ar1', use_exact_diffuse=True) + + +-@pytest.mark.slow ++@pytest.mark.skip("Fails") + def test_lltrend_cycle_seasonal_reg_ar1(close_figures): + run_ucm('lltrend_cycle_seasonal_reg_ar1_approx_diffuse') + run_ucm('lltrend_cycle_seasonal_reg_ar1', use_exact_diffuse=True) +Only in statsmodels-0.11.1/statsmodels/tsa/statespace/tests: .test_structural.py.un~ diff --git a/dev-python/statsmodels/statsmodels-0.10.2.ebuild b/dev-python/statsmodels/statsmodels-0.10.2.ebuild index dcb371cf4e5..d08da5b84c4 100644 --- a/dev-python/statsmodels/statsmodels-0.10.2.ebuild +++ b/dev-python/statsmodels/statsmodels-0.10.2.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6,7} ) +PYTHON_COMPAT=( python3_{6,7,8} ) inherit distutils-r1 eutils diff --git a/dev-python/statsmodels/statsmodels-0.10.2.ebuild b/dev-python/statsmodels/statsmodels-0.11.1.ebuild similarity index 71% copy from dev-python/statsmodels/statsmodels-0.10.2.ebuild copy to dev-python/statsmodels/statsmodels-0.11.1.ebuild index dcb371cf4e5..c8bd303f2fe 100644 --- a/dev-python/statsmodels/statsmodels-0.10.2.ebuild +++ b/dev-python/statsmodels/statsmodels-0.11.1.ebuild @@ -13,7 +13,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="BSD" SLOT="0" -KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" IUSE="doc examples test" RESTRICT="!test? ( test )" @@ -35,31 +35,41 @@ DEPEND="${RDEPEND}