svg-ultralight 0.29.0__tar.gz → 0.30.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of svg-ultralight might be problematic. Click here for more details.
- {svg_ultralight-0.29.0/src/svg_ultralight.egg-info → svg_ultralight-0.30.1}/PKG-INFO +1 -1
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/pyproject.toml +2 -2
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/__init__.py +2 -2
- svg_ultralight-0.29.0/src/svg_ultralight/bounding_boxes/type_bound_confederation.py → svg_ultralight-0.30.1/src/svg_ultralight/bounding_boxes/type_bound_collection.py +3 -3
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1/src/svg_ultralight.egg-info}/PKG-INFO +1 -1
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight.egg-info/SOURCES.txt +1 -1
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/tests/test_bounding.py +9 -9
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/.gitignore +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/.pre-commit-config.yaml +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/README.md +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/setup.cfg +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/animate.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/bounding_boxes/__init__.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/bounding_boxes/bound_helpers.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/bounding_boxes/supports_bounds.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/bounding_boxes/type_bound_element.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/bounding_boxes/type_bounding_box.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/bounding_boxes/type_padded_text.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/constructors/__init__.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/constructors/new_element.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/inkscape.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/layout.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/main.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/metadata.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/nsmap.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/py.typed +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/query.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/root_elements.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/string_conversion.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/strings/__init__.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/strings/svg_strings.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/transformations.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/unit_conversion.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight.egg-info/dependency_links.txt +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight.egg-info/requires.txt +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight.egg-info/top_level.txt +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/tests/__init__.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/tests/conftest.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/tests/test_inkscape.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/tests/test_layout.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/tests/test_metadata.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/tests/test_new_element.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/tests/test_queries.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/tests/test_root_elements.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/tests/test_string_conversion.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/tests/test_svg_ultralight.py +0 -0
- {svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "svg-ultralight"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.30.1"
|
|
4
4
|
description = "a sensible way to create svg files with Python"
|
|
5
5
|
authors = [{ name = "Shay Hill", email = "shay_public@hotmail.com" }]
|
|
6
6
|
license = { text = "MIT" }
|
|
@@ -37,7 +37,7 @@ legacy_tox_ini = """
|
|
|
37
37
|
|
|
38
38
|
[tool.commitizen]
|
|
39
39
|
name = "cz_conventional_commits"
|
|
40
|
-
version = "0.
|
|
40
|
+
version = "0.30.1"
|
|
41
41
|
tag_format = "$version"
|
|
42
42
|
version_files = ["pyproject.toml:^version"]
|
|
43
43
|
annotated_tag = true
|
|
@@ -10,7 +10,7 @@ from svg_ultralight.bounding_boxes.bound_helpers import (
|
|
|
10
10
|
new_element_union,
|
|
11
11
|
)
|
|
12
12
|
from svg_ultralight.bounding_boxes.supports_bounds import SupportsBounds
|
|
13
|
-
from svg_ultralight.bounding_boxes.
|
|
13
|
+
from svg_ultralight.bounding_boxes.type_bound_collection import BoundCollection
|
|
14
14
|
from svg_ultralight.bounding_boxes.type_bound_element import BoundElement
|
|
15
15
|
from svg_ultralight.bounding_boxes.type_bounding_box import BoundingBox
|
|
16
16
|
from svg_ultralight.bounding_boxes.type_padded_text import PaddedText
|
|
@@ -41,7 +41,7 @@ from svg_ultralight.string_conversion import (
|
|
|
41
41
|
from svg_ultralight.transformations import transform_element
|
|
42
42
|
|
|
43
43
|
__all__ = [
|
|
44
|
-
"
|
|
44
|
+
"BoundCollection",
|
|
45
45
|
"BoundElement",
|
|
46
46
|
"BoundingBox",
|
|
47
47
|
"NSMAP",
|
|
@@ -12,18 +12,18 @@ from typing import TYPE_CHECKING
|
|
|
12
12
|
from lxml.etree import _Element as EtreeElement # type: ignore
|
|
13
13
|
|
|
14
14
|
from svg_ultralight.bounding_boxes.bound_helpers import new_bbox_union
|
|
15
|
-
from svg_ultralight.bounding_boxes.supports_bounds import SupportsBounds
|
|
16
15
|
from svg_ultralight.bounding_boxes.type_bounding_box import HasBoundingBox
|
|
17
16
|
from svg_ultralight.transformations import new_transformation_matrix, transform_element
|
|
18
17
|
|
|
19
18
|
if TYPE_CHECKING:
|
|
19
|
+
from svg_ultralight.bounding_boxes.supports_bounds import SupportsBounds
|
|
20
20
|
from svg_ultralight.bounding_boxes.type_bounding_box import BoundingBox
|
|
21
21
|
|
|
22
22
|
_Matrix = tuple[float, float, float, float, float, float]
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
@dataclasses.dataclass
|
|
26
|
-
class
|
|
26
|
+
class BoundCollection(HasBoundingBox):
|
|
27
27
|
"""A class to hold a list of bound elements and transform them together.
|
|
28
28
|
|
|
29
29
|
This will transform the individual elements in place.
|
|
@@ -33,7 +33,7 @@ class BoundConfederation(HasBoundingBox):
|
|
|
33
33
|
bbox: BoundingBox = dataclasses.field(init=False)
|
|
34
34
|
|
|
35
35
|
def __init__(self, *blems: SupportsBounds | EtreeElement) -> None:
|
|
36
|
-
"""Initialize the bound
|
|
36
|
+
"""Initialize the bound collection.
|
|
37
37
|
|
|
38
38
|
:param blems: bound elements to be transformed together
|
|
39
39
|
"""
|
|
@@ -24,7 +24,7 @@ src/svg_ultralight.egg-info/top_level.txt
|
|
|
24
24
|
src/svg_ultralight/bounding_boxes/__init__.py
|
|
25
25
|
src/svg_ultralight/bounding_boxes/bound_helpers.py
|
|
26
26
|
src/svg_ultralight/bounding_boxes/supports_bounds.py
|
|
27
|
-
src/svg_ultralight/bounding_boxes/
|
|
27
|
+
src/svg_ultralight/bounding_boxes/type_bound_collection.py
|
|
28
28
|
src/svg_ultralight/bounding_boxes/type_bound_element.py
|
|
29
29
|
src/svg_ultralight/bounding_boxes/type_bounding_box.py
|
|
30
30
|
src/svg_ultralight/bounding_boxes/type_padded_text.py
|
|
@@ -9,7 +9,7 @@ import math
|
|
|
9
9
|
from svg_ultralight.bounding_boxes.type_bound_element import BoundElement
|
|
10
10
|
from svg_ultralight.bounding_boxes.type_padded_text import PaddedText
|
|
11
11
|
from svg_ultralight.bounding_boxes.type_bounding_box import BoundingBox
|
|
12
|
-
from svg_ultralight.bounding_boxes.
|
|
12
|
+
from svg_ultralight.bounding_boxes.type_bound_collection import BoundCollection
|
|
13
13
|
import copy
|
|
14
14
|
from svg_ultralight.constructors import new_element
|
|
15
15
|
|
|
@@ -155,14 +155,14 @@ class TestPaddedText:
|
|
|
155
155
|
assert math.isclose(bound_element.height, 252.76)
|
|
156
156
|
assert bound_element.y2 == 203.0
|
|
157
157
|
|
|
158
|
-
class
|
|
158
|
+
class TestBoundCollection:
|
|
159
159
|
|
|
160
160
|
@pytest.fixture
|
|
161
|
-
def
|
|
161
|
+
def bound_collection(self) -> BoundCollection:
|
|
162
162
|
elem = new_element("rect", x=0, y=0, width=100, height=200)
|
|
163
163
|
bbox = BoundingBox(0, 0, 100, 200)
|
|
164
164
|
blem = PaddedText(elem, bbox, 1, 2, 3, 4)
|
|
165
|
-
return
|
|
165
|
+
return BoundCollection(blem, copy.deepcopy(elem))
|
|
166
166
|
|
|
167
167
|
def test_blem_and_elem(self):
|
|
168
168
|
"""Test that bound element and unbound element transforms are the same."""
|
|
@@ -170,11 +170,11 @@ class TestBoundConfederation:
|
|
|
170
170
|
bbox = BoundingBox(0, 0, 100, 200)
|
|
171
171
|
blem = BoundElement(rect, bbox)
|
|
172
172
|
elem = copy.deepcopy(rect)
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
bound_collection = BoundCollection(blem, elem)
|
|
174
|
+
bound_collection.x = -4
|
|
175
|
+
bound_collection.scale = 10
|
|
176
|
+
bound_collection.width = 60
|
|
177
|
+
bound_collection.cy = -40
|
|
178
178
|
blem_trans = blem.elem.attrib["transform"]
|
|
179
179
|
elem_trans = elem.attrib["transform"]
|
|
180
180
|
assert blem_trans == elem_trans
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/bounding_boxes/__init__.py
RENAMED
|
File without changes
|
{svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/bounding_boxes/bound_helpers.py
RENAMED
|
File without changes
|
{svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/bounding_boxes/supports_bounds.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight/constructors/new_element.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{svg_ultralight-0.29.0 → svg_ultralight-0.30.1}/src/svg_ultralight.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|