Skip to content

Commit c9c2ba7

Browse files
committed
Remove enum_tools and pydantic_extra_types usage
1 parent 52b18e4 commit c9c2ba7

File tree

8 files changed

+603
-15
lines changed

8 files changed

+603
-15
lines changed

python-wrapper/pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ keywords = ["graph", "visualization", "neo4j"]
3333
dependencies = [
3434
"ipython >=7, <10",
3535
"pydantic >=2 , <3",
36-
"pydantic-extra-types >=2, <3",
37-
"enum-tools==0.12.0"
3836
]
3937
requires-python = ">=3.9"
4038

python-wrapper/src/neo4j_viz/colors.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
from enum import Enum
33
from typing import Any, Union
44

5-
import enum_tools
6-
from pydantic_extra_types.color import ColorType
5+
from neo4j_viz.pydantic_colors import ColorType
76

87
ColorsType = Union[dict[Any, ColorType], Iterable[ColorType]]
98

109

11-
@enum_tools.documentation.document_enum
1210
class ColorSpace(Enum):
1311
"""
1412
Describes the type of color space used by a color palette.

python-wrapper/src/neo4j_viz/node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
from pydantic import AliasChoices, AliasGenerator, BaseModel, Field, field_serializer, field_validator
66
from pydantic.alias_generators import to_camel
7-
from pydantic_extra_types.color import Color, ColorType
87

98
from .node_size import RealNumber
109
from .options import CaptionAlignment
10+
from .pydantic_colors import Color, ColorType
1111

1212
NodeIdType = Union[str, int]
1313

python-wrapper/src/neo4j_viz/options.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
from enum import Enum
55
from typing import Any, Optional, Union
66

7-
import enum_tools.documentation
87
from pydantic import BaseModel, Field, ValidationError, model_validator
98

109

11-
@enum_tools.documentation.document_enum
1210
class CaptionAlignment(str, Enum):
1311
"""
1412
The alignment of the caption text for nodes and relationships.
@@ -19,7 +17,6 @@ class CaptionAlignment(str, Enum):
1917
BOTTOM = "bottom"
2018

2119

22-
@enum_tools.documentation.document_enum
2320
class Layout(str, Enum):
2421
FORCE_DIRECTED = "forcedirected"
2522
HIERARCHICAL = "hierarchical"
@@ -33,7 +30,6 @@ class Layout(str, Enum):
3330
GRID = "grid"
3431

3532

36-
@enum_tools.documentation.document_enum
3733
class Direction(str, Enum):
3834
"""
3935
The direction in which the layout should be oriented
@@ -45,7 +41,6 @@ class Direction(str, Enum):
4541
DOWN = "down"
4642

4743

48-
@enum_tools.documentation.document_enum
4944
class Packing(str, Enum):
5045
"""
5146
The packing method to be used
@@ -96,7 +91,6 @@ def construct_layout_options(layout: Layout, options: dict[str, Any]) -> Optiona
9691
)
9792

9893

99-
@enum_tools.documentation.document_enum
10094
class Renderer(str, Enum):
10195
"""
10296
The renderer used to render the visualization.

0 commit comments

Comments
 (0)