From 089df3416b10917e83cc9f90f59c30d59bba807e Mon Sep 17 00:00:00 2001 From: Ari Angelo Date: Fri, 27 Feb 2026 14:25:41 +0100 Subject: [PATCH 1/3] test(he-tme): :white_check_mark: Shift the test slide files to somewhere the testing service account is able to reach Tests were failing due to a race condition. The test was expecting a run to be processing, but is was failing early due to a USER_ERROR caused by a signed url being created with the wrong permission set --- .gitignore | 1 + examples/script.py | 19 ++++++++++++------- src/aignostics/dataset/_cli.py | 2 +- src/aignostics/dataset/_service.py | 2 +- tests/constants_test.py | 8 ++++---- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 024184097..b096e0b67 100644 --- a/.gitignore +++ b/.gitignore @@ -58,6 +58,7 @@ reports/* .idea/ *.swp *.swo +.vscode/* # macOS .DS_Store diff --git a/examples/script.py b/examples/script.py index 09f866046..54dfcc806 100644 --- a/examples/script.py +++ b/examples/script.py @@ -3,6 +3,13 @@ import tempfile from aignostics import platform +from tests.constants_test import ( + SPOT_1_CRC32C, + SPOT_1_GS_URL, + SPOT_1_HEIGHT, + SPOT_1_RESOLUTION_MPP, + SPOT_1_WIDTH, +) # initialize the client client = platform.Client() @@ -16,14 +23,12 @@ input_artifacts=[ platform.InputArtifact( name="user_slide", - download_url=platform.generate_signed_url( - "gs://aignx-storage-service-dev/sample_data_formatted/9375e3ed-28d2-4cf3-9fb9-8df9d11a6627.tiff" - ), + download_url=platform.generate_signed_url(SPOT_1_GS_URL), metadata={ - "checksum_base64_crc32c": "N+LWCg==", - "resolution_mpp": 0.46499982, - "width_px": 3728, - "height_px": 3640, + "checksum_base64_crc32c": SPOT_1_CRC32C, + "resolution_mpp": SPOT_1_RESOLUTION_MPP, + "width_px": SPOT_1_WIDTH, + "height_px": SPOT_1_HEIGHT, }, ) ], diff --git a/src/aignostics/dataset/_cli.py b/src/aignostics/dataset/_cli.py index d17f6fa0a..5e7938828 100644 --- a/src/aignostics/dataset/_cli.py +++ b/src/aignostics/dataset/_cli.py @@ -177,7 +177,7 @@ def aignostics_download( str, typer.Argument( help="URL to download." - " Example: gs://aignx-storage-service-dev/sample_data_formatted/9375e3ed-28d2-4cf3-9fb9-8df9d11a6627.tiff" + " Example: gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/9375e3ed-28d2-4cf3-9fb9-8df9d11a6627.tiff" ), ], destination_directory: Annotated[ diff --git a/src/aignostics/dataset/_service.py b/src/aignostics/dataset/_service.py index 775e6d211..f013037ca 100644 --- a/src/aignostics/dataset/_service.py +++ b/src/aignostics/dataset/_service.py @@ -407,7 +407,7 @@ def download_aignostics( """Download from bucket to folder via a bucket URL. Args: - source_url (str): URL to download, e.g. gs://aignx-storage-service-dev/sample_data_formatted/... + source_url (str): URL to download, e.g. gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/... destination_directory (Path): Destination directory to download to. download_progress_callable (Callable[[int, int, str], None] | None): Optional callback for progress updates. Called with (bytes_downloaded, total_size, filename). diff --git a/tests/constants_test.py b/tests/constants_test.py index 6c7c35576..6932e8021 100644 --- a/tests/constants_test.py +++ b/tests/constants_test.py @@ -8,7 +8,7 @@ TEST_SUITE = "AIGNOSTICS" -SPOT_0_GS_URL = "gs://platform-api-application-test-data/heta/slides/8fafc17d-a5cc-4e9d-a982-030b1486ca88.tiff" +SPOT_0_GS_URL = "gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/8fafc17d-a5cc-4e9d-a982-030b1486ca88.tiff" SPOT_0_FILENAME = "8fafc17d-a5cc-4e9d-a982-030b1486ca88.tiff" SPOT_0_CRC32C = "5onqtA==" SPOT_0_FILESIZE = 10562338 @@ -16,7 +16,7 @@ SPOT_0_WIDTH = 7447 SPOT_0_HEIGHT = 7196 -SPOT_1_GS_URL = "gs://aignx-storage-service-dev/sample_data_formatted/9375e3ed-28d2-4cf3-9fb9-8df9d11a6627.tiff" +SPOT_1_GS_URL = "gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/9375e3ed-28d2-4cf3-9fb9-8df9d11a6627.tiff" SPOT_1_FILENAME = "9375e3ed-28d2-4cf3-9fb9-8df9d11a6627.tiff" SPOT_1_CRC32C = "9l3NNQ==" SPOT_1_FILESIZE = 14681750 @@ -24,14 +24,14 @@ SPOT_1_WIDTH = 3728 SPOT_1_HEIGHT = 3640 -SPOT_2_GS_URL = "gs://aignx-storage-service-dev/sample_data_formatted/8c7b079e-8b8a-4036-bfde-5818352b503a.tiff" +SPOT_2_GS_URL = "gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/8c7b079e-8b8a-4036-bfde-5818352b503a.tiff" SPOT_2_FILENAME = "8c7b079e-8b8a-4036-bfde-5818352b503a.tiff" SPOT_2_CRC32C = "w+ud3g==" SPOT_2_RESOLUTION_MPP = 0.46499982 SPOT_2_WIDTH = 3616 SPOT_2_HEIGHT = 3400 -SPOT_3_GS_URL = "gs://aignx-storage-service-dev/sample_data_formatted/1f4f366f-a2c5-4407-9f5e-23400b22d50e.tiff" +SPOT_3_GS_URL = "gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/1f4f366f-a2c5-4407-9f5e-23400b22d50e.tiff" SPOT_3_FILENAME = "1f4f366f-a2c5-4407-9f5e-23400b22d50e.tiff" SPOT_3_CRC32C = "Zmx0wA==" SPOT_3_RESOLUTION_MPP = 0.46499982 From b18b6c64fa838f6c4ae88713ea82ba8f59bbdc1c Mon Sep 17 00:00:00 2001 From: Ari Angelo Date: Fri, 27 Feb 2026 17:51:04 +0100 Subject: [PATCH 2/3] chore: Add Claude's settings.local.json file to the gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b096e0b67..dbf4155af 100644 --- a/.gitignore +++ b/.gitignore @@ -78,6 +78,7 @@ node_modules/ # AI workflow .fixme CLAUDE.local.md +**/settings.local.json # Copier *.rej From a1cd355c51b8464b694f0d0aec4555ad9b0c0876 Mon Sep 17 00:00:00 2001 From: Ari Angelo Date: Fri, 27 Feb 2026 17:51:20 +0100 Subject: [PATCH 3/3] style: make lint_fix --- tests/constants_test.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/constants_test.py b/tests/constants_test.py index 6932e8021..787378b2e 100644 --- a/tests/constants_test.py +++ b/tests/constants_test.py @@ -8,7 +8,9 @@ TEST_SUITE = "AIGNOSTICS" -SPOT_0_GS_URL = "gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/8fafc17d-a5cc-4e9d-a982-030b1486ca88.tiff" +SPOT_0_GS_URL = ( + "gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/8fafc17d-a5cc-4e9d-a982-030b1486ca88.tiff" +) SPOT_0_FILENAME = "8fafc17d-a5cc-4e9d-a982-030b1486ca88.tiff" SPOT_0_CRC32C = "5onqtA==" SPOT_0_FILESIZE = 10562338 @@ -16,7 +18,9 @@ SPOT_0_WIDTH = 7447 SPOT_0_HEIGHT = 7196 -SPOT_1_GS_URL = "gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/9375e3ed-28d2-4cf3-9fb9-8df9d11a6627.tiff" +SPOT_1_GS_URL = ( + "gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/9375e3ed-28d2-4cf3-9fb9-8df9d11a6627.tiff" +) SPOT_1_FILENAME = "9375e3ed-28d2-4cf3-9fb9-8df9d11a6627.tiff" SPOT_1_CRC32C = "9l3NNQ==" SPOT_1_FILESIZE = 14681750 @@ -24,14 +28,18 @@ SPOT_1_WIDTH = 3728 SPOT_1_HEIGHT = 3640 -SPOT_2_GS_URL = "gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/8c7b079e-8b8a-4036-bfde-5818352b503a.tiff" +SPOT_2_GS_URL = ( + "gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/8c7b079e-8b8a-4036-bfde-5818352b503a.tiff" +) SPOT_2_FILENAME = "8c7b079e-8b8a-4036-bfde-5818352b503a.tiff" SPOT_2_CRC32C = "w+ud3g==" SPOT_2_RESOLUTION_MPP = 0.46499982 SPOT_2_WIDTH = 3616 SPOT_2_HEIGHT = 3400 -SPOT_3_GS_URL = "gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/1f4f366f-a2c5-4407-9f5e-23400b22d50e.tiff" +SPOT_3_GS_URL = ( + "gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/1f4f366f-a2c5-4407-9f5e-23400b22d50e.tiff" +) SPOT_3_FILENAME = "1f4f366f-a2c5-4407-9f5e-23400b22d50e.tiff" SPOT_3_CRC32C = "Zmx0wA==" SPOT_3_RESOLUTION_MPP = 0.46499982