Skip to content

Commit 3cc9d5d

Browse files
committed
add context payload and pytest
1 parent d18d011 commit 3cc9d5d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

nucleus/dataset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,7 @@ def get_continuous_indexing_status(self):
950950
"total_images": Count of images in the dataset
951951
"indexed_images": Count of images with embeddings in the dataset
952952
"percent_indexed": Percent of images in the dataset that have been successfully indexed
953+
"additional_context": Additional context to the response
953954
}
954955
"""
955956
return self._client.make_request(

tests/test_dataset.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,3 +568,14 @@ def test_dataset_item_metadata_update(dataset):
568568
}
569569

570570
assert actual_metadata == expected_metadata
571+
572+
573+
@pytest.mark.integration
574+
def test_dataset_get_continuous_indexing_status(dataset):
575+
items = make_dataset_items()
576+
dataset.append(items)
577+
578+
response = dataset.get_continuous_indexing_status()
579+
assert response["total_images"] == len(items)
580+
assert response["indexed_images"] <= len(items)
581+
assert response["percent_indexed"] >= 0

0 commit comments

Comments
 (0)