Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/_static/tutorials/shapes_uml.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/data_morph/shapes/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def plot_available_shapes(self) -> Axes:
num_rows,
num_cols,
layout='constrained',
figsize=(12, 2 * num_rows),
figsize=(2 * num_cols, 2 * num_rows),
)
fig.get_layout_engine().set(w_pad=0.2, h_pad=0.2)

Expand Down
2 changes: 1 addition & 1 deletion src/data_morph/shapes/lines/diamond.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Diamond(LineCollection):

import matplotlib.pyplot as plt
from data_morph.data.loader import DataLoader
from data_morph.shapes.polygons import Diamond
from data_morph.shapes.lines import Diamond

_ = Diamond(DataLoader.load_dataset('panda')).plot()

Expand Down
2 changes: 1 addition & 1 deletion src/data_morph/shapes/lines/rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Rectangle(LineCollection):

import matplotlib.pyplot as plt
from data_morph.data.loader import DataLoader
from data_morph.shapes.polygons import Rectangle
from data_morph.shapes.lines import Rectangle

_ = Rectangle(DataLoader.load_dataset('panda')).plot()

Expand Down
2 changes: 1 addition & 1 deletion src/data_morph/shapes/lines/star.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Star(LineCollection):

import matplotlib.pyplot as plt
from data_morph.data.loader import DataLoader
from data_morph.shapes.polygons import Star
from data_morph.shapes.lines import Star

_ = Star(DataLoader.load_dataset('panda')).plot()

Expand Down
10 changes: 5 additions & 5 deletions tests/shapes/test_polygons.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Test polygons module."""
"""Test polygons in the lines module."""

from numbers import Number

Expand All @@ -8,7 +8,7 @@
pytestmark = [pytest.mark.shapes, pytest.mark.lines, pytest.mark.polygons]


class PolygonsModuleTestBase:
class PolygonsLineModuleTestBase:
"""Base for testing polygon shapes."""

shape_name: str
Expand Down Expand Up @@ -47,7 +47,7 @@ def test_lines_form_polygon(self, shape):
assert np.unique(endpoints, axis=0).shape[0] == self.expected_line_count


class TestDiamond(PolygonsModuleTestBase):
class TestDiamond(PolygonsLineModuleTestBase):
"""Test the Diamond class."""

shape_name = 'diamond'
Expand All @@ -59,7 +59,7 @@ def test_slopes(self, slopes):
np.testing.assert_array_equal(np.sort(slopes).flatten(), [-1.5, -1.5, 1.5, 1.5])


class TestRectangle(PolygonsModuleTestBase):
class TestRectangle(PolygonsLineModuleTestBase):
"""Test the Rectangle class."""

shape_name = 'rectangle'
Expand All @@ -71,7 +71,7 @@ def test_slopes(self, slopes):
np.testing.assert_array_equal(np.sort(slopes).flatten(), [0, 0, np.inf, np.inf])


class TestStar(PolygonsModuleTestBase):
class TestStar(PolygonsLineModuleTestBase):
"""Test the Star class."""

shape_name = 'star'
Expand Down