-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Labels
RefactorInternal refactoring of codeInternal refactoring of code
Description
There are a handful of places where the dependency structure is almost DAG-like. If these can be smoothed out, reasoning about the code can be made easier. I'll update this list as I encounter these places.
For reference, I'm treating as the "default" dependency structure that enforced by isort:
_libs, 'errors',compat, andutil._*are considered "upstream" of everything else.- Within
_libs,tslibsis considered upstream of the rest of_libs
- Within
- Within
core,core.dtypesis considered upstream of the rest ofcore. plottingis considered downstream of coreiois a hodge-podgetseriesis mostly destined to be refactored intotslibs
Some places where this can be made more coherent:
-
compat.pickle_compatimportspandas, so really isn't upstream of anything. -
compat.numpy.functionimports fromutil._validators. AFAICT the importedutil._validatorsfunctions aren't used anywhere else, so these could be made self-contained. Both of these modules import from core.dtypes.common, though these imports could come directly from_libs.lib. -
core.dtypesis a mix.base,generic,inferencehave no non-upstream imports. Butcommonhas a couple,castandconcathave a bunch, withdtypesandmissingin between. It may be worth splitting this directory into two pieces, one of which is strictly upstream from the rest of core and one which is not. - Important parts of
iocould be made independent/upstream ofcoreifconfigwas made further upstream. -
utilis split between modules like_decoratorsthat are low-dependency andtestingwhich is depends-on-everything.
Metadata
Metadata
Assignees
Labels
RefactorInternal refactoring of codeInternal refactoring of code