-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF: make dependency structure more DAG-like #25203
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
Comments
@jbrockmendel I'd like to work on this, but I don't understand what you mean by making them more coherent. Just to clarify, by upstream you mean there are no more package ( A few questions from each of the points you mentioned-
|
@TrigonaMinima this topic needs discussion before being implemented. The most helpful thing to do here is offer a thoughtful opinion on whether this is a good or bad idea (e.g. how users or developers of other projects might be affected).
Right. |
I have only been a user of pandas till now - mostly with jupyter notebooks. I am not familiar with the pandas code base and how it's being used by other project devs. From my very naive point of view, I think, we should divide it into 2 parts-
1st part we can work upon now, meanwhile 2nd part can be discussed further. But I think to me the bigger question is, why to even do this activity? Is spending time on this important? Forgive me if this is something obvious. Is it to simplify the pandas code base so that it's more intuitive? |
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._libs
,tslibs
is considered upstream of the rest of_libs
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.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.The text was updated successfully, but these errors were encountered: