WIP: Enable mypy for code examples #947
Closed
GitHub Actions / SDK integration test report
failed
Jul 3, 2025 in 0s
1 errors, 1 fail, 1 skipped, 278 pass in 21m 22s
Annotations
Check warning on line 0 in projects.test_label_row_v2
github-actions / SDK integration test report
test_filter_labels_by_data_title (projects.test_label_row_v2) failed
./encord-backend/projects/sdk-integration-tests/integration-test-report-python3_13.xml [took 22s]
Raw output
AssertionError: Unexpected fuzzy search result size: 0, expected 1
assert 0 == 1
+ where 0 = len([])
data_in_ephemeral_dataset = [DatasetDataInfo(data_hash='1286990a-41d7-4496-acd0-952d3ee73aab', title='Video Of Funny Cat.mp4', backing_item_uuid=U...d1b-a8a2-efcf38100690', title='sample-html.html', backing_item_uuid=UUID('518ce351-d9b2-4f4c-9d2d-89398d85bc07')), ...]
ephemeral_dataset_hash_with_data = '871b042a-efc6-4637-909a-5daa88bca45c'
ephemeral_ssh_key_only_project_client = <encord.project.Project object at 0x7f34e35fbf10>
def test_filter_labels_by_data_title(
data_in_ephemeral_dataset: list[DatasetDataInfo],
ephemeral_dataset_hash_with_data: str,
ephemeral_ssh_key_only_project_client: Project,
) -> None:
project = ephemeral_ssh_key_only_project_client
project.add_datasets([ephemeral_dataset_hash_with_data])
label_rows = project.list_label_rows_v2()
assert len(label_rows) == len(
data_in_ephemeral_dataset
), f"Unexpected test data size {len(label_rows)}, expected {len(data_in_ephemeral_dataset)} entries"
label_rows_fuzzy = project.list_label_rows_v2(data_title_like="%Cat%")
> assert len(label_rows_fuzzy) == 1, f"Unexpected fuzzy search result size: {len(label_rows_fuzzy)}, expected 1"
E AssertionError: Unexpected fuzzy search result size: 0, expected 1
E assert 0 == 1
E + where 0 = len([])
src/sdk_integration_tests/tests/projects/test_label_row_v2.py:744: AssertionError
Check failure on line 0 in storage.test_storage_items_listing
github-actions / SDK integration test report
test_storage_folder_list_items (storage.test_storage_items_listing) with error
./encord-backend/projects/sdk-integration-tests/integration-test-report-python3_13.xml [took 4s]
Raw output
failed on setup with "encord.exceptions.EncordException: folder.add_data errors occurred ["bad packet header: '0000040300000000'"] timestamp='2025-07-03T18:02:47.328433+00:00'"
storage_folder = <encord.storage.StorageFolder object at 0x7f8f4f33a790>
temp_dynamic_dataset = <encord.dataset.Dataset object at 0x7f8f4f339f50>
@pytest.fixture
def images_in_folder(storage_folder: StorageFolder, temp_dynamic_dataset: Dataset) -> list[UUID]:
with tempfile.TemporaryDirectory() as tmp_dir:
directory_path = Path(tmp_dir)
image_uuids = []
for file_name in IMAGES_FILE_NAMES:
file_path = directory_path / file_name
create_image_files([file_path])
> image_uuid = storage_folder.upload_image(file_path, None, client_metadata=CLIENT_METADATA)
src/sdk_integration_tests/tests/storage/test_storage_items_listing.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv/lib/python3.11/site-packages/encord/storage.py:226: in upload_image
upload_result = self._add_data(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <encord.storage.StorageFolder object at 0x7f8f4f33a790>
integration_id = None
private_files = DataUploadItems(videos=[], image_groups=[], dicom_series=[], images=[DataUploadImage(object_url='gs://bucket_v2.dev.en...))], image_groups_from_items=[], audio=[], nifti=[], text=[], pdf=[], skip_duplicate_urls=False, upsert_metadata=False)
ignore_errors = False
def _add_data(
self,
integration_id: Optional[str],
private_files: Union[str, Dict, Path, TextIO, DataUploadItems],
ignore_errors: bool = False,
) -> orm_storage.UploadLongPollingState:
upload_job_id = self._add_data_to_folder_start(
integration_id,
private_files,
ignore_errors,
)
res = self._add_data_to_folder_get_result(upload_job_id)
if res.status == LongPollingStatus.DONE:
return res
elif res.status == LongPollingStatus.ERROR:
> raise encord.exceptions.EncordException(f"folder.add_data errors occurred {res.errors}")
E encord.exceptions.EncordException: folder.add_data errors occurred ["bad packet header: '0000040300000000'"] timestamp='2025-07-03T18:02:47.328433+00:00'
.venv/lib/python3.11/site-packages/encord/storage.py:1457: EncordException
Loading