New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SUMM: Roundup of sandbox exposure, unused files, redundant code, ... #5773
Comments
Moving from #5145 Mangled, Commented-Out, or Otherwise Disabled TestsWith pytest.mark.skip or pytest.mark.xfail we can easily find things that need attention. Other methods of "temporarily" skipping a test get lost easily. See also #5768.
Unmarked Smoke Tests
|
Unused/Unmaintained
|
one comment to a group of Those are/were required (at least on Windows) for multiprocessing. |
Collecting these in one place to avoid Issue proliferation; will update as appropriate.
Sandbox
Parts of sandbox that are imported from non-sandbox (cc @ChadFulton if you were wondering how much of the code implicitly relies on sandbox):
sandbox.stats.multicomp
stats.multicomp
importstukeyhsd
andMultiComparison
(there is only one function defined directly instats.multicomp
)examples.try_tukey_hsd
getstukeyhsd
andMultiComparison
directly from the sandbox module, could get it from the non-sandbox file.stats.contrast
importscontrast_allpairs
(also duplicated insandbox.stats.contrast_tools
)stats.tests.test_qsturng
usesget_tukeyQcrit
sandbox.tsa.fftarma.Armafft
generate_sample
method, which is defined on the non-sandbox parent classArmaProcess
. UseArmaProcess
directly.fftarma
is imported is intest_arima_process
, where it has two tests forArmafft
. These could be moved to a test file in sandbox specific tofftarma
.sandbox.stats.diagnostic
almost all ofstats.diagnostic
comes from here.sandbox.diagnostics
is in examples/ex_arch_canada.py foracorr_lm
.statsmodels.sandbox.regression.predstd
is imported in numerous test and example files to getwls_prediction_std
(looks like 10 imports total, 13 if we count notebook files)stats.outliers_influence
andgraphics.regressionplots
(i.e. user-facing code)sandbox.regression.penalized
is imported in several test files forTheilGLS
. This includes atest_theil
file inregression.tests
that sends mixed messages as to the status of this file.sandbox.tsa.garch
is imported in statsmodels/examples/tsa/ex_arma.py for itsArma
classsandbox.nonparametric.kernels
is imported into 2 files innonparametric
and 3 files innonparametric.tests
.sandbox.nonparametric
files are imported into 6 examples/ filessandbox.distributions.mv_normal
is imported intodistributions.mixture_rvs
anddistributions.tests.test_mixture
sandbox.distributions.sppatch
is imported into examples/ex_generic_mle_tdist.pysppatch
modified scipy objects in-place. Can we avoid this?sandbox.tools.cross_val.LeaveOneOut
is imported intostats.outlier_influence
.This class is also duplicated inSlightly different behavior with the same name.nonparametric._kernel_base
sandbox.stats.runs
providesRuns
,runstest_1samp
, andrunstest_2samp
directly tostats.api
.stats.tests.test_nonparametric
, along withsandbox.stats.runs.mcnemar
statsmodels.sandbox.panel.random_panel
is imported forPanelSample
inregression.tests.test_theil
De Facto Sandbox
Non-Sandbox code that belongs in sandbox or dustbin:
nonparametric.smoothers_lowess_old
(Is smoothers_lowess_old needed? #5142)tsa.descriptivestats
tsa.mlemodel
(MAINT: remove tsa/mlemodel.py #5139)tsa.arma_mle
tsa.varma_process
miscmodels.try_mlecov
iolib.stata_summary_examples
(iolib.stata_summary_examples.py useful? #5061)iolib.tests.test_summary_old
(test_summary.py, test_summary_old.py have no tests #5064)Chopping Block
Partially moved from #5137
Files that appear unlikely to become useful.
datasets
directoryfrom models import _hbspline
which does not exist AFAIK)Duplication
Copy/Pasted code that should be imported instead:
sandbox.tsa.garch
copies all ofLikelihoodModel
(LikelihoodModel "copied from model.py" should be removed from garch #4422)LeaveOneOut
class in bothsandbox.tools.cross_val
andnonparametric._kernel_base
LikelihoodModel._fit_colinear
comment "Copied from PR ENH: measures for multicollinearity #2380 remove when merge" (“Copied from PR #2380 remove when merged” #5023)gof.gof_binning_discrete
comment "copy/paste, remove code duplication when it works" (gof.gof_binning_discrete "# copy/paste, remove code duplication when it works" #5125)base._parameter_inference._lm_robust
comment "this is a copy from stats._diagnostic_other" (MAINT: wrap lm_robust instead of re-implementing #5772)Disabled Code
Commenting out code is a way of temporarily disabling it that tends to become permanent and make things more difficult for subsequent readers.
tsa.interp.denton.denton
discrete.discrete_model.Weibull
sm.open_help
(is sm.open_help ever defined? #5134)Namespace Issues
tools.tools
namespace is counter-intuitive (tools.tools namespace is counter-intuitive #4992)tools._testing
andtools.testing
: either choose just one or make a clear distinction between what belongs where (tools._testing and tools.testing #4876)Unsorted
miscmodels.tests.test_generic_mle
contains tests for GenericLikelihoodModel, not anything inmiscmodels
(miscmodels.tests.test_generic_mle doesnt import miscmodels #5763). If, as I suspect,miscmodels
serves primarily as tests/examples forGenericLikelihoodModel
, that should be made explicit and implement systematically.sandbox.regression.example_kernridge
that may belong in e.g. andbox/regression/examples/?The text was updated successfully, but these errors were encountered: