Closed
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
,tslibs
is considered upstream of the rest of_libs
- Within
- Within
core
,core.dtypes
is considered upstream of the rest ofcore
. plotting
is considered downstream of coreio
is a hodge-podgetseries
is mostly destined to be refactored intotslibs
Some places where this can be made more coherent:
-
compat.pickle_compat
importspandas
, so really isn't upstream of anything. -
compat.numpy.function
imports fromutil._validators
. AFAICT the importedutil._validators
functions 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.dtypes
is a mix.base
,generic
,inference
have no non-upstream imports. Butcommon
has a couple,cast
andconcat
have a bunch, withdtypes
andmissing
in 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
io
could be made independent/upstream ofcore
ifconfig
was made further upstream. -
util
is split between modules like_decorators
that are low-dependency andtesting
which is depends-on-everything.