Skip to content

Commit

Permalink
fix: new l2 cx edge attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
akhileshh committed Aug 11, 2023
1 parent 96be98b commit 0dec5a3
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions pychunkedgraph/graph/attributes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# pylint: disable=invalid-name, missing-docstring, protected-access, raise-missing-from

# TODO design to use these attributes across different clients
# `family_id` is specific to bigtable

from enum import Enum
from typing import NamedTuple

from .utils import serializers
Expand Down Expand Up @@ -101,8 +104,8 @@ class Connectivity:
serializer=serializers.NumPyArray(dtype=basetypes.EDGE_AREA),
)

CrossChunkEdge = _AttributeArray(
pattern=b"atomic_cross_edges_%d",
L2CrossChunkEdge = _AttributeArray(
pattern=b"l2_cross_edge_%d",
family_id="3",
serializer=serializers.NumPyArray(
dtype=basetypes.NODE_ID, shape=(-1, 2), compression_level=22
Expand All @@ -115,6 +118,14 @@ class Connectivity:
serializer=serializers.NumPyArray(dtype=basetypes.NODE_ID, shape=(-1, 2)),
)

CrossChunkEdge = _AttributeArray(
pattern=b"atomic_cross_edges_%d",
family_id="4",
serializer=serializers.NumPyArray(
dtype=basetypes.NODE_ID, shape=(-1, 2), compression_level=22
),
)


class Hierarchy:
Child = _Attribute(
Expand Down Expand Up @@ -157,8 +168,6 @@ class GraphVersion:
class OperationLogs:
key = b"ioperations"

from enum import Enum

class StatusCodes(Enum):
SUCCESS = 0 # all is well, new changes persisted
CREATED = 1 # log record created in storage
Expand Down

0 comments on commit 0dec5a3

Please sign in to comment.