Skip to content

DISC: Directory for code "upstream" from _libs #25162

Closed
@jbrockmendel

Description

@jbrockmendel

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    RefactorInternal refactoring of code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions