File tree Expand file tree Collapse file tree 8 files changed +34
-11
lines changed Expand file tree Collapse file tree 8 files changed +34
-11
lines changed Original file line number Diff line number Diff line change 1414# -- Project information -----------------------------------------------------
1515
1616project = 'Python SDK reference'
17- copyright = '2024 , Labelbox'
17+ copyright = '2025 , Labelbox'
1818author = 'Labelbox'
19- release = '6.6 .0'
19+ release = '6.7 .0'
2020
2121# -- General configuration ---------------------------------------------------
2222
Original file line number Diff line number Diff line change 11# Changelog
2+ # Version 6.7.0 (2025-02-06)
3+ ## Added
4+ * MAL support for pdf relationships (beta)([ #1932 ] ( https://github.com/Labelbox/labelbox-python/pull/1932 ) )
5+ * Allow setting read_only for relationships (beta)([ #1950 ] ( https://github.com/Labelbox/labelbox-python/pull/1950 ) )
6+
27# Version 6.6.0 (2025-01-14)
38## Added
49* Support for python 3.13([ #1940 ] ( https://github.com/Labelbox/labelbox-python/pull/1940 ) )
Original file line number Diff line number Diff line change 11[project ]
22name = " labelbox"
3- version = " 6.6 .0"
3+ version = " 6.7 .0"
44description = " Labelbox Python API"
55authors = [{ name = " Labelbox" , email = " engineering@labelbox.com" }]
66dependencies = [
Original file line number Diff line number Diff line change 11name = "labelbox"
22
3- __version__ = "6.6 .0"
3+ __version__ = "6.7 .0"
44
55from labelbox .client import Client
66from labelbox .schema .annotation_import import (
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class Type(Enum):
1919 type : Type = Type .UNIDIRECTIONAL
2020 readonly : Optional [bool ] = None
2121
22- @model_validator (mode = ' after' )
22+ @model_validator (mode = " after" )
2323 def check_readonly (self ):
2424 if self .readonly is True :
2525 warnings .warn (
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ class _Relationship(BaseModel):
1616 type : str
1717 readonly : Optional [bool ] = None
1818
19+
1920class NDRelationship (NDAnnotation ):
2021 relationship : _Relationship
2122
Original file line number Diff line number Diff line change @@ -395,7 +395,10 @@ def test_relationship_readonly_explicit_true():
395395 value = TextEntity (start = 30 , end = 35 ),
396396 )
397397
398- with pytest .warns (UserWarning , match = "Creating a relationship with readonly=True is in beta.*" ):
398+ with pytest .warns (
399+ UserWarning ,
400+ match = "Creating a relationship with readonly=True is in beta.*" ,
401+ ):
399402 relationship = RelationshipAnnotation (
400403 name = "rel" ,
401404 value = Relationship (
Original file line number Diff line number Diff line change @@ -261,13 +261,27 @@ def test_readonly_relationships():
261261 )
262262
263263 # Verify readonly relationship
264- assert readonly_rel_serialized ["relationship" ]["source" ] == ner_source_serialized ["uuid" ]
265- assert readonly_rel_serialized ["relationship" ]["target" ] == ner_target_serialized ["uuid" ]
264+ assert (
265+ readonly_rel_serialized ["relationship" ]["source" ]
266+ == ner_source_serialized ["uuid" ]
267+ )
268+ assert (
269+ readonly_rel_serialized ["relationship" ]["target" ]
270+ == ner_target_serialized ["uuid" ]
271+ )
266272 assert readonly_rel_serialized ["relationship" ]["type" ] == "unidirectional"
267273 assert readonly_rel_serialized ["relationship" ]["readonly" ] is True
268274
269275 # Verify non-readonly relationship
270- assert non_readonly_rel_serialized ["relationship" ]["source" ] == ner_source_serialized ["uuid" ]
271- assert non_readonly_rel_serialized ["relationship" ]["target" ] == ner_target_serialized ["uuid" ]
272- assert non_readonly_rel_serialized ["relationship" ]["type" ] == "bidirectional"
276+ assert (
277+ non_readonly_rel_serialized ["relationship" ]["source" ]
278+ == ner_source_serialized ["uuid" ]
279+ )
280+ assert (
281+ non_readonly_rel_serialized ["relationship" ]["target" ]
282+ == ner_target_serialized ["uuid" ]
283+ )
284+ assert (
285+ non_readonly_rel_serialized ["relationship" ]["type" ] == "bidirectional"
286+ )
273287 assert non_readonly_rel_serialized ["relationship" ]["readonly" ] is False
You can’t perform that action at this time.
0 commit comments