Skip to content

WIP: Changes for inclusion into Snowflake #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions python-wrapper/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ keywords = ["graph", "visualization", "neo4j"]
dependencies = [
"ipython >=7, <10",
"pydantic >=2 , <3",
"pydantic-extra-types >=2, <3",
"enum-tools==0.12.0"
]
requires-python = ">=3.9"

Expand Down Expand Up @@ -147,12 +145,14 @@ select = [
"F", # flake8
"I", # isort
]
exclude = ["src/neo4j_viz/pydantic_colors.py"]

[tool.mypy]
strict = true
exclude = [
'(^build|^\.?venv)',
'build',
'src/neo4j_viz/pydantic_colors.py',
]
plugins = ['pydantic.mypy']
untyped_calls_exclude=["nbconvert"]
4 changes: 1 addition & 3 deletions python-wrapper/src/neo4j_viz/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
from enum import Enum
from typing import Any, Union

import enum_tools
from pydantic_extra_types.color import ColorType
from neo4j_viz.pydantic_colors import ColorType

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


@enum_tools.documentation.document_enum
class ColorSpace(Enum):
"""
Describes the type of color space used by a color palette.
Expand Down
2 changes: 1 addition & 1 deletion python-wrapper/src/neo4j_viz/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from pydantic import AliasChoices, AliasGenerator, BaseModel, Field, field_serializer, field_validator
from pydantic.alias_generators import to_camel
from pydantic_extra_types.color import Color, ColorType

from .node_size import RealNumber
from .options import CaptionAlignment
from .pydantic_colors import Color, ColorType

NodeIdType = Union[str, int]

Expand Down
6 changes: 0 additions & 6 deletions python-wrapper/src/neo4j_viz/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
from enum import Enum
from typing import Any, Optional, Union

import enum_tools.documentation
from pydantic import BaseModel, Field, ValidationError, model_validator


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


@enum_tools.documentation.document_enum
class Layout(str, Enum):
FORCE_DIRECTED = "forcedirected"
HIERARCHICAL = "hierarchical"
Expand All @@ -33,7 +30,6 @@ class Layout(str, Enum):
GRID = "grid"


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


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


@enum_tools.documentation.document_enum
class Renderer(str, Enum):
"""
The renderer used to render the visualization.
Expand Down
Loading