File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ All notable changes to the [Nucleus Python Client](https://github.com/scaleapi/n
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 0.10.4] ( https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.10.1 ) ) - 2022-04-22
9+ - Additional check added for KeypointsAnnotation names validation
10+
811## [ 0.10.3] ( https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.10.3 ) - 2022-04-22
912
1013### Fixed
Original file line number Diff line number Diff line change @@ -464,6 +464,15 @@ def __post_init__(self):
464464 raise ValueError (
465465 "The list of keypoints must be the same length as the list of names"
466466 )
467+ if len (set (self .names )) != len (self .names ):
468+ seen = set ()
469+ for name in self .names :
470+ if name in seen :
471+ raise ValueError (
472+ f"The keypoint name '{ name } ' is repeated in the list of names"
473+ )
474+ seen .add (name )
475+
467476 for segment in self .skeleton :
468477 if len (segment ) != 2 :
469478 raise ValueError (
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ exclude = '''
2121
2222[tool .poetry ]
2323name = " scale-nucleus"
24- version = " 0.10.3 "
24+ version = " 0.10.4 "
2525description = " The official Python client library for Nucleus, the Data Platform for AI"
2626license = " MIT"
2727authors = [" Scale AI Nucleus Team <nucleusapi@scaleapi.com>" ]
You can’t perform that action at this time.
0 commit comments