File tree Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,14 @@ 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+
9+ ## [ 0.14.28] ( https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.14.28 ) - 2022-11-17
10+
11+ ### Added
12+ - Support for appending to slice with Scene reference IDs
13+ - Better error handling when appending to a slice with non-existent reference IDs
14+
15+
816## [ 0.14.27] ( https://github.com/scaleapi/nucleus-python-client/releases/tag/v0.14.27 ) - 2022-11-04
917
1018### Added
Original file line number Diff line number Diff line change @@ -869,22 +869,25 @@ def append_to_slice(
869869 self ,
870870 slice_id : str ,
871871 reference_ids : List [str ],
872+ dataset_id : str ,
872873 ) -> dict :
873874 # TODO: migrate to Slice method and deprecate
874- """Appends dataset items to an existing slice.
875+ """Appends dataset items or scenes to an existing slice.
875876
876877 Parameters:
877878 slice_id: Nucleus-generated dataset ID (starts with ``slc_``). This can
878879 be retrieved via :meth:`Dataset.slices` or a Nucleus dashboard URL.
879- reference_ids: List of user-defined reference IDs of the dataset items
880+ reference_ids: List of user-defined reference IDs of dataset items or scenes
880881 to append to the slice.
882+ dataset_id: ID of dataset this slice belongs to.
881883
882884 Returns:
883885 Empty payload response.
884886 """
885887
886888 response = self .make_request (
887- {REFERENCE_IDS_KEY : reference_ids }, f"slice/{ slice_id } /append"
889+ {REFERENCE_IDS_KEY : reference_ids , DATASET_ID_KEY : dataset_id },
890+ f"slice/{ slice_id } /append" ,
888891 )
889892 return response
890893
Original file line number Diff line number Diff line change @@ -319,11 +319,11 @@ def append(
319319 at upload time.
320320
321321 Parameters:
322- reference_ids: A list of user-specified IDs for DatasetItems you wish
323- to append.
322+ reference_ids: List of user-defined reference IDs of dataset items or scenes
323+ to append to the slice .
324324
325325 Returns:
326- Dict of the slice_id and the newly appended DatasetItem IDs. ::
326+ Dict of the slice_id and the newly appended IDs. ::
327327
328328 {
329329 "slice_id": str,
@@ -333,6 +333,7 @@ def append(
333333 response = self ._client .append_to_slice (
334334 slice_id = self .id ,
335335 reference_ids = reference_ids ,
336+ dataset_id = self .dataset_id ,
336337 )
337338 return response
338339
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.14.27 "
24+ version = " 0.14.28 "
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