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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "shapepy"
version = "1.1.2"
version = "1.1.3"
description = "Geometric 2D library"
authors = ["Carlos Adir <carlos.adir.leite@gmail.com>"]
readme = "README.md"
Expand Down
12 changes: 6 additions & 6 deletions src/shapepy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@

import importlib

from shapepy.curve import IntegratePlanar, PlanarCurve
from shapepy.jordancurve import IntegrateJordan, JordanCurve
from shapepy.plot import ShapePloter
from shapepy.polygon import Point2D
from shapepy.primitive import Primitive
from shapepy.shape import (
from shapepy.bool2d.primitive import Primitive
from shapepy.bool2d.shape import (
ConnectedShape,
DisjointShape,
EmptyShape,
IntegrateShape,
SimpleShape,
WholeShape,
)
from shapepy.geometry.curve import IntegratePlanar, PlanarCurve
from shapepy.geometry.jordancurve import IntegrateJordan, JordanCurve
from shapepy.geometry.polygon import Point2D
from shapepy.plot.plot import ShapePloter

__version__ = importlib.metadata.version("shapepy")

Expand Down
Empty file added src/shapepy/bool2d/__init__.py
Empty file.
8 changes: 4 additions & 4 deletions src/shapepy/primitive.py → src/shapepy/bool2d/primitive.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

import numpy as np

from shapepy.curve import PlanarCurve
from shapepy.jordancurve import JordanCurve
from shapepy.polygon import Point2D
from shapepy.shape import EmptyShape, SimpleShape, WholeShape
from shapepy.bool2d.shape import EmptyShape, SimpleShape, WholeShape
from shapepy.geometry.curve import PlanarCurve
from shapepy.geometry.jordancurve import JordanCurve
from shapepy.geometry.polygon import Point2D


class Primitive:
Expand Down
4 changes: 2 additions & 2 deletions src/shapepy/shape.py → src/shapepy/bool2d/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import numpy as np

from shapepy.jordancurve import IntegrateJordan, JordanCurve
from shapepy.polygon import Box, Point2D
from shapepy.geometry.jordancurve import IntegrateJordan, JordanCurve
from shapepy.geometry.polygon import Box, Point2D


class SuperclassMeta(type):
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion src/shapepy/curve.py → src/shapepy/geometry/curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import numpy as np
import pynurbs

from shapepy.polygon import Box, Point2D
from shapepy.geometry.polygon import Box, Point2D


class Math:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

import numpy as np

from shapepy.curve import IntegratePlanar, PlanarCurve
from shapepy.polygon import Box, Point2D
from shapepy.geometry.curve import IntegratePlanar, PlanarCurve
from shapepy.geometry.polygon import Box, Point2D


class IntegrateJordan:
Expand Down
File renamed without changes.
Empty file added src/shapepy/plot/__init__.py
Empty file.
6 changes: 3 additions & 3 deletions src/shapepy/plot.py → src/shapepy/plot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
import numpy as np
from matplotlib import pyplot

from shapepy.curve import PlanarCurve
from shapepy.jordancurve import JordanCurve
from shapepy.shape import (
from shapepy.bool2d.shape import (
BaseShape,
ConnectedShape,
DisjointShape,
EmptyShape,
WholeShape,
)
from shapepy.geometry.curve import PlanarCurve
from shapepy.geometry.jordancurve import JordanCurve

Path = matplotlib.path.Path
PathPatch = matplotlib.patches.PathPatch
Expand Down
3 changes: 3 additions & 0 deletions tests/bool2d/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import sys

sys.path.append("./src")
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@

import pytest

from shapepy.jordancurve import JordanCurve
from shapepy.primitive import Primitive
from shapepy.shape import SimpleShape
from shapepy.bool2d.primitive import Primitive
from shapepy.bool2d.shape import SimpleShape
from shapepy.geometry.jordancurve import JordanCurve


@pytest.mark.order(9)
@pytest.mark.dependency(
depends=[
"tests/test_polygon.py::test_end",
"tests/test_jordan_polygon.py::test_end",
"tests/test_jordan_curve.py::test_end",
"tests/test_primitive.py::test_end",
"tests/test_contains.py::test_end",
"tests/test_empty_whole.py::test_end",
"tests/geometry/test_polygon.py::test_end",
"tests/geometry/test_jordan_polygon.py::test_end",
"tests/geometry/test_jordan_curve.py::test_end",
"tests/bool2d/test_primitive.py::test_end",
"tests/bool2d/test_contains.py::test_end",
"tests/bool2d/test_empty_whole.py::test_end",
],
scope="session",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

import pytest

from shapepy.primitive import Primitive
from shapepy.bool2d.primitive import Primitive


@pytest.mark.order(9)
@pytest.mark.dependency(
depends=[
"tests/test_polygon.py::test_end",
"tests/test_jordan_polygon.py::test_end",
"tests/test_jordan_curve.py::test_end",
"tests/test_primitive.py::test_end",
"tests/test_contains.py::test_end",
"tests/test_empty_whole.py::test_end",
"tests/geometry/test_polygon.py::test_end",
"tests/geometry/test_jordan_polygon.py::test_end",
"tests/geometry/test_jordan_curve.py::test_end",
"tests/bool2d/test_primitive.py::test_end",
"tests/bool2d/test_contains.py::test_end",
"tests/bool2d/test_empty_whole.py::test_end",
],
scope="session",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@

import pytest

from shapepy.primitive import Primitive
from shapepy.shape import ConnectedShape, DisjointShape, EmptyShape, WholeShape
from shapepy.bool2d.primitive import Primitive
from shapepy.bool2d.shape import (
ConnectedShape,
DisjointShape,
EmptyShape,
WholeShape,
)


@pytest.mark.order(9)
@pytest.mark.dependency(
depends=[
"tests/test_polygon.py::test_end",
"tests/test_jordan_polygon.py::test_end",
"tests/test_jordan_curve.py::test_end",
"tests/test_primitive.py::test_end",
"tests/test_contains.py::test_end",
"tests/test_empty_whole.py::test_end",
"tests/geometry/test_polygon.py::test_end",
"tests/geometry/test_jordan_polygon.py::test_end",
"tests/geometry/test_jordan_curve.py::test_end",
"tests/bool2d/test_primitive.py::test_end",
"tests/bool2d/test_contains.py::test_end",
"tests/bool2d/test_empty_whole.py::test_end",
],
scope="session",
)
Expand Down
19 changes: 12 additions & 7 deletions tests/test_contains.py → tests/bool2d/test_contains.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@
import numpy as np
import pytest

from shapepy.jordancurve import JordanCurve
from shapepy.primitive import Primitive
from shapepy.shape import ConnectedShape, DisjointShape, EmptyShape, WholeShape
from shapepy.bool2d.primitive import Primitive
from shapepy.bool2d.shape import (
ConnectedShape,
DisjointShape,
EmptyShape,
WholeShape,
)
from shapepy.geometry.jordancurve import JordanCurve


@pytest.mark.order(7)
@pytest.mark.dependency(
depends=[
"tests/test_polygon.py::test_end",
"tests/test_jordan_polygon.py::test_end",
"tests/test_jordan_curve.py::test_end",
"tests/test_primitive.py::test_end",
"tests/geometry/test_polygon.py::test_end",
"tests/geometry/test_jordan_polygon.py::test_end",
"tests/geometry/test_jordan_curve.py::test_end",
"tests/bool2d/test_primitive.py::test_end",
],
scope="session",
)
Expand Down
14 changes: 7 additions & 7 deletions tests/test_empty_whole.py → tests/bool2d/test_empty_whole.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

import pytest

from shapepy.primitive import Primitive
from shapepy.shape import EmptyShape, WholeShape
from shapepy.bool2d.primitive import Primitive
from shapepy.bool2d.shape import EmptyShape, WholeShape


@pytest.mark.order(8)
@pytest.mark.dependency(
depends=[
"tests/test_polygon.py::test_end",
"tests/test_jordan_polygon.py::test_end",
"tests/test_jordan_curve.py::test_end",
"tests/test_primitive.py::test_end",
"tests/test_contains.py::test_end",
"tests/geometry/test_polygon.py::test_end",
"tests/geometry/test_jordan_polygon.py::test_end",
"tests/geometry/test_jordan_curve.py::test_end",
"tests/bool2d/test_primitive.py::test_end",
"tests/bool2d/test_contains.py::test_end",
],
scope="session",
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_primitive.py → tests/bool2d/test_primitive.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
@pytest.mark.order(5)
@pytest.mark.dependency(
depends=[
"tests/test_polygon.py::test_end",
"tests/test_jordan_polygon.py::test_end",
"tests/geometry/test_polygon.py::test_end",
"tests/geometry/test_jordan_polygon.py::test_end",
],
scope="session",
)
Expand Down
18 changes: 9 additions & 9 deletions tests/test_shape.py → tests/bool2d/test_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@

import pytest

from shapepy.jordancurve import JordanCurve
from shapepy.primitive import Primitive
from shapepy.shape import IntegrateShape, SimpleShape
from shapepy.bool2d.primitive import Primitive
from shapepy.bool2d.shape import IntegrateShape, SimpleShape
from shapepy.geometry.jordancurve import JordanCurve


@pytest.mark.order(8)
@pytest.mark.dependency(
depends=[
"tests/test_polygon.py::test_end",
"tests/test_jordan_polygon.py::test_end",
"tests/test_jordan_curve.py::test_end",
"tests/test_primitive.py::test_end",
"tests/test_contains.py::test_end",
"tests/test_empty_whole.py::test_end",
"tests/geometry/test_polygon.py::test_end",
"tests/geometry/test_jordan_polygon.py::test_end",
"tests/geometry/test_jordan_curve.py::test_end",
"tests/bool2d/test_primitive.py::test_end",
"tests/bool2d/test_contains.py::test_end",
"tests/bool2d/test_empty_whole.py::test_end",
],
scope="session",
)
Expand Down
3 changes: 3 additions & 0 deletions tests/geometry/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import sys

sys.path.append("./src")
9 changes: 7 additions & 2 deletions tests/test_curve.py → tests/geometry/test_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@
import numpy as np
import pytest

from shapepy.curve import BezierCurve, IntegratePlanar, Math, PlanarCurve
from shapepy.geometry.curve import (
BezierCurve,
IntegratePlanar,
Math,
PlanarCurve,
)


@pytest.mark.order(3)
@pytest.mark.dependency(
depends=[
"tests/test_polygon.py::test_end",
"tests/geometry/test_polygon.py::test_end",
],
scope="session",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
import pytest

from shapepy import Point2D
from shapepy.jordancurve import JordanCurve
from shapepy.geometry.jordancurve import JordanCurve


@pytest.mark.order(6)
@pytest.mark.dependency(
depends=[
"tests/test_polygon.py::test_end",
"tests/test_curve.py::test_end",
"tests/test_jordan_polygon.py::test_end",
"tests/geometry/test_polygon.py::test_end",
"tests/geometry/test_curve.py::test_end",
"tests/geometry/test_jordan_polygon.py::test_end",
],
scope="session",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
import numpy as np
import pytest

from shapepy.jordancurve import IntegrateJordan, JordanCurve
from shapepy.geometry.jordancurve import IntegrateJordan, JordanCurve


@pytest.mark.order(4)
@pytest.mark.dependency(
depends=[
"tests/test_polygon.py::test_end",
"tests/test_curve.py::test_end",
"tests/geometry/test_polygon.py::test_end",
"tests/geometry/test_curve.py::test_end",
],
scope="session",
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_polygon.py → tests/geometry/test_polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import pytest

from shapepy.polygon import Point2D
from shapepy.geometry.polygon import Point2D


@pytest.mark.order(2)
Expand Down
3 changes: 3 additions & 0 deletions tests/plot/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import sys

sys.path.append("./src")
4 changes: 2 additions & 2 deletions tests/test_plot.py → tests/plot/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
from matplotlib import pyplot

from shapepy import ShapePloter
from shapepy.primitive import Primitive
from shapepy.bool2d.primitive import Primitive


@pytest.mark.order(13)
@pytest.mark.dependency(
depends=[
"tests/test_shape.py::test_end",
"tests/bool2d/test_shape.py::test_end",
],
scope="session",
)
Expand Down