Skip to content

chore(tests): bump HETA to 1.2.0, update SPOT_0/1 file sizes, remove special app#610

Open
ari-nz wants to merge 5 commits into
mainfrom
chore/app-version-bumps
Open

chore(tests): bump HETA to 1.2.0, update SPOT_0/1 file sizes, remove special app#610
ari-nz wants to merge 5 commits into
mainfrom
chore/app-version-bumps

Conversation

@ari-nz
Copy link
Copy Markdown
Collaborator

@ari-nz ari-nz commented Apr 28, 2026

Summary

  • Bumps HETA_APPLICATION_VERSION to 1.2.0 for both production and staging environments
  • Adds the new SPOT_1 breast cancer slide (1603ba4c) to the external test bucket and updates SPOT_1_EXPECTED_RESULT_FILES with the correct 9-file sizes for HETA 1.2.0
  • Updates SPOT_0_EXPECTED_RESULT_FILES with the correct 9-file sizes from a HETA 1.2.0 production run
  • Removes the SPECIAL_APPLICATION constant and guards all tests that previously depended on it (staging environment does not have a special app)

Test plan

  • Unit/integration tests pass without changes
  • Long-running e2e tests (test_gui_run_download, test_cli_run_execute) verify the updated file sizes against a real HETA 1.2.0 run

Copilot AI review requested due to automatic review settings April 28, 2026 07:40
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
873 3 870 19
View the top 2 failed test(s) by shortest run time
tests.aignostics.application.cli_test::test_cli_application_dump_schemata
Stack Traces | 0.063s run time
runner = <typer.testing.CliRunner object at 0x7fc4f0a8a250>
tmp_path = PosixPath('.../pytest-18/popen-gw0/test_cli_application_dump_sche0')
record_property = <function record_property.<locals>.append_property at 0x7fc4f07bd430>

    @pytest.mark.e2e
    @pytest.mark.timeout(timeout=60)
    def test_cli_application_dump_schemata(runner: CliRunner, tmp_path: Path, record_property) -> None:
        """Check application dump schemata works as expected."""
        record_property("tested-item-id", "SPEC-APPLICATION-SERVICE")
        result = runner.invoke(
            cli,
            [
                "application",
                "dump-schemata",
                HETA_APPLICATION_ID,
                "--application-version",
                HETA_APPLICATION_VERSION,
                "--destination",
                str(tmp_path),
                "--zip",
            ],
        )
        assert result.exit_code == 0
>       assert "Zipped 11 files" in normalize_output(result.output)
E       AssertionError: assert 'Zipped 11 files' in 'Zipped 16 files to .../pytest-18/popen-gw0/test_cli_application_dump_sche0/he-tme_1.2.0_schemata.zip'
E        +  where 'Zipped 16 files to .../pytest-18/popen-gw0/test_cli_application_dump_sche0/he-tme_1.2.0_schemata.zip' = normalize_output('Zipped 16 files to .../pytest-18/popen-gw0/test_cli_application_dump_sche0/he-tme_1.2.0_schemata.zip\n')
E        +    where 'Zipped 16 files to .../pytest-18/popen-gw0/test_cli_application_dump_sche0/he-tme_1.2.0_schemata.zip\n' = <Result okay>.output

.../aignostics/application/cli_test.py:227: AssertionError
tests.aignostics.application.gui_test::test_gui_download_dataset_via_application_to_run_cancel_to_find_back
Stack Traces | 3.48s run time
user = <nicegui.testing.user.User object at 0x7fd68b5dca50>
runner = <typer.testing.CliRunner object at 0x7fd653d7b750>
silent_logging = None
record_property = <function record_property.<locals>.append_property at 0x7fd6586c92d0>

    @pytest.mark.e2e
    @pytest.mark.long_running
    @pytest.mark.flaky(retries=1, delay=5)
    @pytest.mark.timeout(timeout=60 * 10)
    @pytest.mark.sequential
    async def test_gui_download_dataset_via_application_to_run_cancel_to_find_back(  # noqa: PLR0915
        user: User, runner: CliRunner, silent_logging: None, record_property
    ) -> None:
        """Test that the user can download a dataset via the application page and cancel the run, then find it back."""
        record_property("tested-item-id", "TC-APPLICATION-GUI-04, SPEC-GUI-SERVICE")
        with tempfile.TemporaryDirectory() as tmpdir:
            tmp_path = Path(tmpdir)
    
            with patch(
                "aignostics.application._gui._page_application_describe.Path.home",
                return_value=tmp_path,
            ):
                # Download example wsi
                result = runner.invoke(
                    cli,
                    [
                        "dataset",
                        "aignostics",
                        "download",
                        SPOT_1_GS_URL,
                        str(tmp_path),
                    ],
                )
                assert result.exit_code == 0
                assert "Successfully downloaded" in normalize_output(result.stdout)
                assert SPOT_1_FILENAME in normalize_output(result.stdout)
                expected_file = Path(tmp_path) / SPOT_1_FILENAME
                assert expected_file.exists(), f"Expected file {expected_file} not found"
>               assert expected_file.stat().st_size == 14681750
E               AssertionError: assert 8942460 == 14681750
E                +  where 8942460 = os.stat_result(st_mode=33188, st_ino=9764232, st_dev=2049, st_nlink=1, st_uid=1001, st_gid=1001, st_size=8942460, st_atime=1778594889, st_mtime=1778594890, st_ctime=1778594890).st_size
E                +    where os.stat_result(st_mode=33188, st_ino=9764232, st_dev=2049, st_nlink=1, st_uid=1001, st_gid=1001, st_size=8942460, st_atime=1778594889, st_mtime=1778594890, st_ctime=1778594890) = stat()
E                +      where stat = PosixPath('.../tmp/tmpqtyumlws/1603ba4c-398a-49db-926b-c14d8f17dc83.tiff').stat

.../aignostics/application/gui_test.py:217: AssertionError
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 | 3.89s run time
runner = <typer.testing.CliRunner object at 0x7f8d96b6e690>
tmp_path = PosixPath('.../pytest-18/popen-gw3/test_cli_aignostics_download_s1')
record_property = <function record_property.<locals>.append_property at 0x7f8d988d03b0>

    @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
    
        assert "Successfully downloaded" in result.stdout
        assert SPOT_1_FILENAME in result.stdout
    
        expected_file = tmp_path / SPOT_1_FILENAME
        assert expected_file.exists(), f"Expected file {expected_file} not found"
>       assert expected_file.stat().st_size == 14681750
E       AssertionError: assert 8942460 == 14681750
E        +  where 8942460 = os.stat_result(st_mode=33188, st_ino=9451681, st_dev=2049, st_nlink=1, st_uid=1001, st_gid=1001, st_size=8942460, st_atime=1778594533, st_mtime=1778594534, st_ctime=1778594534).st_size
E        +    where os.stat_result(st_mode=33188, st_ino=9451681, st_dev=2049, st_nlink=1, st_uid=1001, st_gid=1001, st_size=8942460, st_atime=1778594533, st_mtime=1778594534, st_ctime=1778594534) = stat()
E        +      where stat = PosixPath('.../pytest-18/popen-gw3/test_cli_aignostics_download_s1/1603ba4c-398a-49db-926b-c14d8f17dc83.tiff').stat

.../aignostics/dataset/cli_test.py:152: 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.

@ari-nz ari-nz force-pushed the chore/app-version-bumps branch 2 times, most recently from b985ce5 to bd5f44a Compare May 12, 2026 08:31
@ari-nz ari-nz changed the title chore(tests): bump staging app versions and drop special-app constant chore(tests): bump HETA to 1.2.0, update SPOT_0/1 file sizes, remove special app May 12, 2026
ari-nz and others added 5 commits May 12, 2026 15:39
- test-app: 0.0.6 → 1.0.0 (new version uses same he-tme input schema)
- he-tme: 1.1.0 → 1.1.1 on staging
- Remove SPECIAL_APPLICATION_ID/VERSION from staging (no longer needed)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…alization artifact

- Re-add SPECIAL_APPLICATION_ID/VERSION to staging pointing to test-app 1.0.0
  so e2e_test.py imports resolve on staging
- Remove normalization:wsi input artifact from _get_spots_payload_for_special;
  test-app 1.0.0 only requires whole_slide_image, matching the he-tme schema

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Remove SPECIAL_APPLICATION_ID/VERSION from staging constants entirely
- Guard the import in e2e_test.py with try/except so staging doesn't NameError
- Add skipif(SPECIAL_APPLICATION_ID is None) to both special-app tests
  so they are silently skipped on staging but still run on production (0.99.0)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Simpler than a try/except guard: staging defines SPECIAL_APPLICATION_ID
and SPECIAL_APPLICATION_VERSION as None, the regular import works, and
the existing skipif(SPECIAL_APPLICATION_ID is None) handles the rest.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…e-tme 1.2.0

- Replace SPOT_1 with breast cancer slide 1603ba4c (BREAST/BREAST_CANCER,
  6649×6578 at 0.25 MPP); preserve old 9375e3ed data as SPOT_4
- Add VIPS 10x resolution ambiguity note for SPOT_2, SPOT_3, SPOT_4
- Bump HETA_APPLICATION_VERSION to 1.2.0, TEST_APPLICATION_VERSION to 1.0.0
- Remove SPECIAL_APPLICATION concept; restore stress tests against test-app 1.0.0
- Unify payload builders via _build_wsi_input_item / _build_minimal_wsi_input_item
- Update SPOT_1_EXPECTED_RESULT_FILES sizes from staging run 43a3bcd2
- Reduce PIPELINE_NODE_ACQUISITION_TIMEOUT_MINUTES to 25
@ari-nz ari-nz force-pushed the chore/app-version-bumps branch from bd5f44a to 1a3e050 Compare May 12, 2026 13:41
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
11.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

1 participant