Skip to content

[PTDT-2967] Relationship read_only #1950

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

Merged
merged 7 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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 libs/labelbox/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "labelbox"
version = "6.6.0"
version = "6.6.1"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets bump this to 6.7.0

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont bump it yet we will do the release seperate

description = "Labelbox Python API"
authors = [{ name = "Labelbox", email = "engineering@labelbox.com" }]
dependencies = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Union
from typing import Union, Optional
from pydantic import BaseModel
from enum import Enum
from labelbox.data.annotation_types.annotation import (
Expand All @@ -16,6 +16,7 @@ class Type(Enum):
source: Union[ObjectAnnotation, ClassificationAnnotation]
target: ObjectAnnotation
type: Type = Type.UNIDIRECTIONAL
readonly: Optional[bool] = None


class RelationshipAnnotation(BaseAnnotation):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import Optional
from pydantic import BaseModel
from .base import NDAnnotation, DataRow
from ...annotation_types.data import GenericDataRowData
Expand All @@ -13,7 +14,7 @@ class _Relationship(BaseModel):
source: str
target: str
type: str

readonly: Optional[bool] = None

class NDRelationship(NDAnnotation):
relationship: _Relationship
Expand Down Expand Up @@ -50,5 +51,6 @@ def from_common(
source=str(relationship.source._uuid),
target=str(relationship.target._uuid),
type=relationship.type.value,
readonly=relationship.readonly,
),
)
Loading