-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Description
Motivated in part by #24737, which is discussing vendoring tzlocal for use in tslibs.
A lot of effort has gone into making _libs, and in particular tslibs, self-contained within the pandas code base. This makes these parts of the code base much easier to reason about. It also makes it easier to test, profile, and measure coverage on pieces of the code base in isolation.
Furthermore, outside of _libs the dependency structure is not quite DAG, but bears a resemblance if you squint and tilt your head a little: compat, errors, and util._* are almost independent of core. core.dtypes is almost-independent of the rest of core, etc.
AFAICT there are two pieces of code that prevent us from further simplifying the dependency structure: config.get_option and pprint_thing.
The proposal is to put these two functions in a directory that is explicitly "upstream" of everything else, allowing us to simplify the dependency structure.
[Side-note: It might also make sense to make a config shared within the ecosystem to de-duplicate e.g. pd.set_option('display.width', ...) and np.set_printoption(...)]
Thoughts?