Skip to content

Test - add new slide urls for a non-deprecated bucket#454

Open
ari-nz wants to merge 3 commits intomainfrom
test/new-slide-urls
Open

Test - add new slide urls for a non-deprecated bucket#454
ari-nz wants to merge 3 commits intomainfrom
test/new-slide-urls

Conversation

@ari-nz
Copy link
Collaborator

@ari-nz ari-nz commented Feb 27, 2026

…ervice 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
Copilot AI review requested due to automatic review settings February 27, 2026 17:25
str,
typer.Argument(
help="URL to download."
" Example: gs://aignx-storage-service-dev/sample_data_formatted/9375e3ed-28d2-4cf3-9fb9-8df9d11a6627.tiff"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure this will still work for a non aignx user

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates test slide GCS URLs to point to a non-deprecated bucket, and aligns related user-facing examples/documentation strings in the dataset download CLI/service.

Changes:

  • Update SPOT_*_GS_URL constants in tests to use the new gs://aignostics-platform-ext-a4f7e9/python-sdk-tests/he-tme/slides/... bucket path.
  • Refresh example URLs in dataset service docstring and CLI help text.
  • Adjust examples/script.py to reuse slide constants (currently via tests.constants_test), and extend .gitignore for local editor/config files.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/constants_test.py Switches slide GCS URLs to the new non-deprecated bucket.
src/aignostics/dataset/_service.py Updates docstring example to reflect the new bucket URL format.
src/aignostics/dataset/_cli.py Updates CLI help example URL to the new bucket path.
examples/script.py Replaces hardcoded slide metadata/URL with imported constants (currently from tests).
.gitignore Ignores .vscode/* and **/settings.local.json local configuration files.

Comment on lines +6 to 13
from tests.constants_test import (
SPOT_1_CRC32C,
SPOT_1_GS_URL,
SPOT_1_HEIGHT,
SPOT_1_RESOLUTION_MPP,
SPOT_1_WIDTH,
)

Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

examples is packaged into the wheel (see pyproject.toml), but tests is not. Importing tests.constants_test will therefore raise ModuleNotFoundError for installed users running this example. Consider moving these shared slide constants into a runtime module (e.g., src/aignostics/...) or duplicating them locally within examples/ so the example is self-contained.

Suggested change
from tests.constants_test import (
SPOT_1_CRC32C,
SPOT_1_GS_URL,
SPOT_1_HEIGHT,
SPOT_1_RESOLUTION_MPP,
SPOT_1_WIDTH,
)
# Constants for the example slide; duplicated here so the example is self-contained
# and does not depend on the uninstalled `tests` package.
SPOT_1_CRC32C = "INSERT_BASE64_CRC32C_CHECKSUM_HERE"
SPOT_1_GS_URL = "gs://INSERT_BUCKET_NAME/INSERT_OBJECT_PATH"
SPOT_1_HEIGHT = 0
SPOT_1_RESOLUTION_MPP = 0.0
SPOT_1_WIDTH = 0

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Feb 27, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
685 1 684 14
View the full list of 1 ❄️ flaky test(s)
tests.aignostics.dataset.cli_test::test_cli_aignostics_download_sample

Flake rate in main: 8.82% (Passed 31 times, Failed 3 times)

Stack Traces | 6.13s run time
runner = <typer.testing.CliRunner object at 0x7f64a18247c0>
tmp_path = PosixPath('.../pytest-18/popen-gw3/test_cli_aignostics_download_s1')
record_property = <function record_property.<locals>.append_property at 0x7f6488b9efb0>

    @pytest.mark.e2e
    @pytest.mark.flaky(retries=1, delay=5)
    @pytest.mark.timeout(timeout=60 * 2)
    def test_cli_aignostics_download_sample(runner: CliRunner, tmp_path: Path, record_property) -> None:
        """Check download functionality with dry-run option."""
        record_property("tested-item-id", "TC-DATASET-CLI-01")
        result = runner.invoke(
            cli,
            [
                "dataset",
                "aignostics",
                "download",
                SPOT_1_GS_URL,
                str(tmp_path),
            ],
        )
>       assert result.exit_code == 0
E       assert 1 == 0
E        +  where 1 = <Result SystemExit(1)>.exit_code

.../aignostics/dataset/cli_test.py:145: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants