Repository navigation
Open
Description
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.multicompimportstukeyhsdandMultiComparison(there is only one function defined directly instats.multicomp) -
examples.try_tukey_hsdgetstukeyhsdandMultiComparisondirectly from the sandbox module, could get it from the non-sandbox file. -
stats.contrastimportscontrast_allpairs(also duplicated insandbox.stats.contrast_tools) -
stats.tests.test_qsturngusesget_tukeyQcrit
-
-
sandbox.tsa.fftarma.Armafft- In several of the places this is imported it is only for the
generate_samplemethod, which is defined on the non-sandbox parent classArmaProcess. UseArmaProcessdirectly. - The only remaining place where
fftarmais imported is intest_arima_process, where it has two tests forArmafft. These could be moved to a test file in sandbox specific tofftarma.
- In several of the places this is imported it is only for the
-
sandbox.stats.diagnosticalmost all ofstats.diagnosticcomes from here.- The good news is that aside from this pass-through, the only direct import from
sandbox.diagnosticsis in examples/ex_arch_canada.py foracorr_lm.
- The good news is that aside from this pass-through, the only direct import from
-
statsmodels.sandbox.regression.predstdis imported in numerous test and example files to getwls_prediction_std(looks like 10 imports total, 13 if we count notebook files)- Also in
stats.outliers_influenceandgraphics.regressionplots(i.e. user-facing code)
- Also in
-
sandbox.regression.penalizedis imported in several test files forTheilGLS. This includes atest_theilfile inregression.teststhat sends mixed messages as to the status of this file. -
sandbox.tsa.garchis imported in statsmodels/examples/tsa/ex_arma.py for itsArmaclass -
sandbox.nonparametric.kernelsis imported into 2 files innonparametricand 3 files innonparametric.tests.sandbox.nonparametricfiles are imported into 6 examples/ files
-
sandbox.distributions.mv_normalis imported intodistributions.mixture_rvsanddistributions.tests.test_mixture-
sandbox.distributions.sppatchis imported into examples/ex_generic_mle_tdist.py-
sppatchmodified scipy objects in-place. Can we avoid this?
-
-
-
sandbox.tools.cross_val.LeaveOneOutis imported intostats.outlier_influence.This class is also duplicated inSlightly different behavior with the same name.nonparametric._kernel_base -
sandbox.stats.runsprovidesRuns,runstest_1samp, andrunstest_2sampdirectly tostats.api.- The same three are imported in
stats.tests.test_nonparametric, along withsandbox.stats.runs.mcnemar
- The same three are imported in
-
statsmodels.sandbox.panel.random_panelis imported forPanelSampleinregression.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.
- README_l1.txt (Make readme_l1.txt a section in README.rst #4957)
- statsmodels/
- info.py ([MAINT] Remove info.py #4981)
- examples/t_est_rlm.py (MAINT: remove t_est_rlm.py; closes #5100 #5109, sm.examples.t_est_rlm --> supposed to be a test? #5100)
- examples/tsa/lagpolynomial.py
- graphics/plot_grids.py (SUMM: Possibly Unnecessary Files #5137 (comment))
- statsmodels/satasets/anes96/src/anes96.csv appears to be a duplicate
- statsmodels/sandbox/
- tests/datamlw.py (MAINT: remove exact duplicate file datamlw.py #4941)
- tests/model_results.py (MAINT: remove file that just says to remove it #5070)
- examples/ex_kaplan_meier.py (MAINT: remove example file corresponding to removed module #5071)
- mle.py - starts with "What's the origin of this file? It is not ours"
- nos4.mtx - only used by mle.py
- mlogitpath.lyx - no idea why we would need a lyx file
- formula.py - supplanted by patsy (remove sandbox.formula; long-since superseded by patsy #4940, MAINT: remove sandbox.formula, supplanted by patsy #5692)
- examples/ex_formula.py - based on formula.py (MAINT: remove sandbox.formula, supplanted by patsy #5692)
- examples/ex_formula_factor.py - based on formula.py (MAINT: remove sandbox.formula, supplanted by patsy #5692)
- contrast_old.py - only used by formula (MAINT: remove sandbox.formula, supplanted by patsy #5692)
- tools_old.py - only used by formula (MAINT: remove sandbox.formula, supplanted by patsy #5692)
- dataset_notes.rst - likely redundant with README in
datasetsdirectory - bspline.py (imports
from models import _hbsplinewhich does not exist AFAIK) - mcevaluate/mcresuts_arma1.txt
- regression/ols_anova_original.py - OK I haven't looked it this closely, but it looks like it was superceded and then never removed.
- regression/notes_runml.txt
- tests/test_bspline.py.txt - if no one noticed this was a .txt, cant be too important
- tools/TODO.txt
- tsa/notes_organize.txt - still refers to scikits.statsmodels
- stats/notes_fdr.txt
- regression/sympy_diff.py
- panel/sandwich_covariance.py
- tools/
- generate_formula_api.py (MAINT: remove file attempting to automatically generate an api.py file #5118)
- code_maintenance.py
- gh_api.py
- github_statspy
- matplotlibrc.qt4
- matplotlibrc.qt5
- README.rst
- update_web.py
- binstar/
- check_dirs.py
- backport_pr.py
- docs/
- GLMNotes.lyx - ? not touched since 2012
- GLMNotes.pdf - ? not touched since 2012
- fix_longtable.py - ? not touched since 2012, appears unused
- source/glm_techn1.rst.TXT - "Just a placeholder", last edit 2013
- source/glm_techn2.rst.TXT - "Just a placeholder", last edit 2013
- source/regression_techn1.rst.TXT- "Just a placeholder", last edit 2013
Duplication
Copy/Pasted code that should be imported instead:
-
sandbox.tsa.garchcopies all ofLikelihoodModel(LikelihoodModel "copied from model.py" should be removed from garch #4422) -
LeaveOneOutclass in bothsandbox.tools.cross_valandnonparametric._kernel_base -
LikelihoodModel._fit_colinearcomment "Copied from PR ENH: measures for multicollinearity #2380 remove when merge" (“Copied from PR #2380 remove when merged” #5023) -
gof.gof_binning_discretecomment "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_robustcomment "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.toolsnamespace is counter-intuitive (tools.tools namespace is counter-intuitive #4992) -
tools._testingandtools.testing: either choose just one or make a clear distinction between what belongs where (tools._testing and tools.testing #4876) - What differentiates ...?:
- examples/
- statsmodels/examples/
- statsmodels/sandbox/examples/
- statsmodels/sandbox/distribution/examples/
- docs/source/plots/
Unsorted
-
miscmodels.tests.test_generic_mlecontains tests for GenericLikelihoodModel, not anything inmiscmodels(miscmodels.tests.test_generic_mle doesnt import miscmodels #5763). If, as I suspect,miscmodelsserves primarily as tests/examples forGenericLikelihoodModel, that should be made explicit and implement systematically. - Many files like e.g.
sandbox.regression.example_kernridgethat may belong in e.g. andbox/regression/examples/? - Overlap between datasets/README.txt, tools/dataset_rst.py, sandbox/dataset_notes.rst, possibly others in docs/?
Metadata
Metadata
Assignees
Labels
No labels
Activity
jbrockmendel commentedon May 22, 2019
Moving from #5145
Mangled, Commented-Out, or Otherwise Disabled Tests
With 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.
est_other-->test_othertest_toolstests namedtest_13,test_41, ... these presumably refer to GH issues, need meaningful namestest_rootfinding.test_brentq_expandingcommented-out assertionstest_numdifftest_hesscommented-out assertions.test_datatest_patsy_577should have meaningful nametest_qsturngtest_more_exotic_stuffcommented out, needs better nametest_weightstats.TestZTest.testsplit into well-scoped tests, possibly parametrizetest_weightstatsCheckWeightstats1dMixincommented-outdefwith commented-out assertiontest_weightstats.CheckWeightstats1dMixin.test_basiccommented-out assertiontest_weightstatstest_weightstats_1-3commented-out assertions/printsUnmarked Smoke Tests
jbrockmendel commentedon May 22, 2019
Unused/Unmaintained
__main__SectionsMoved from #5128
#3515 (comment)
Searching 1493 files for "
__main__" (regex, case sensitive)Some of these are in test files and are harmless-albeit-annoying.
josef-pkt commentedon May 22, 2019
one comment to a group of
__main__issues as instatsmodels/examples/ex_kernel_regression_dgp.pyThose are/were required (at least on Windows) for multiprocessing.
I don't remember the details nor whether it would be really necessary in each case or whether the same pattern was used "just in case" if there is multiprocessing.