Skip to content

Commit

Permalink
Rename _oldcore module to _base (#3418)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom authored Jul 8, 2023
1 parent a42b894 commit 9087437
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 16 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion seaborn/_marks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def _resolve(

def _infer_orient(self, scales: dict) -> str: # TODO type scales

# TODO The original version of this (in seaborn._oldcore) did more checking.
# TODO The original version of this (in seaborn._base) did more checking.
# Paring that down here for the prototype to see what restrictions make sense.

# TODO rethink this to map from scale type to "DV priority" and use that?
Expand Down
2 changes: 1 addition & 1 deletion seaborn/axisgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import matplotlib as mpl
import matplotlib.pyplot as plt

from ._oldcore import VectorPlotter, variable_type, categorical_order
from ._base import VectorPlotter, variable_type, categorical_order
from ._compat import share_axis, get_legend_handles
from . import utils
from .utils import (
Expand Down
2 changes: 1 addition & 1 deletion seaborn/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import matplotlib.pyplot as plt

from seaborn._core.typing import default, deprecated
from seaborn._oldcore import infer_orient, categorical_order
from seaborn._base import infer_orient, categorical_order
from seaborn._stats.density import KDE
from seaborn.relational import _RelationalPlotter
from seaborn import utils
Expand Down
4 changes: 1 addition & 3 deletions seaborn/distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
from matplotlib.colors import to_rgba
from matplotlib.collections import LineCollection

from ._oldcore import (
VectorPlotter,
)
from ._base import VectorPlotter

# We have moved univariate histogram computation over to the new Hist class,
# but still use the older Histogram for bivariate computation.
Expand Down
2 changes: 1 addition & 1 deletion seaborn/relational.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import matplotlib as mpl
import matplotlib.pyplot as plt

from ._oldcore import (
from ._base import (
VectorPlotter,
)
from .utils import (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_axisgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from numpy.testing import assert_array_equal, assert_array_almost_equal
import pandas.testing as tm

from seaborn._oldcore import categorical_order
from seaborn._base import categorical_order
from seaborn import rcmod
from seaborn.palettes import color_palette
from seaborn.relational import scatterplot
Expand Down
2 changes: 1 addition & 1 deletion tests/test_core.py → tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from seaborn.axisgrid import FacetGrid
from seaborn._compat import get_colormap
from seaborn._oldcore import (
from seaborn._base import (
SemanticMapping,
HueMapping,
SizeMapping,
Expand Down
9 changes: 4 additions & 5 deletions tests/test_categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@

from seaborn import categorical as cat

from seaborn.utils import _version_predates, desaturate
from seaborn._oldcore import categorical_order
from seaborn._base import categorical_order
from seaborn._compat import get_colormap, get_legend_handles
from seaborn._testing import assert_plots_equal
from seaborn.categorical import (
_CategoricalPlotter,
Beeswarm,
Expand All @@ -34,9 +35,7 @@
violinplot,
)
from seaborn.palettes import color_palette
from seaborn.utils import _draw_figure
from seaborn._compat import get_colormap, get_legend_handles
from seaborn._testing import assert_plots_equal
from seaborn.utils import _draw_figure, _version_predates, desaturate


PLOT_FUNCS = [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
color_palette,
light_palette,
)
from seaborn._oldcore import (
from seaborn._base import (
categorical_order,
)
from seaborn._statistics import (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_relational.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from numpy.testing import assert_array_equal, assert_array_almost_equal

from seaborn.palettes import color_palette
from seaborn._oldcore import categorical_order
from seaborn._base import categorical_order

from seaborn.relational import (
_RelationalPlotter,
Expand Down

0 comments on commit 9087437

Please sign in to comment.