Skip to content

Add all IDR images to fixtures#82

Merged
AlexSurtees merged 11 commits into
devfrom
idr_image_tests
May 27, 2026
Merged

Add all IDR images to fixtures#82
AlexSurtees merged 11 commits into
devfrom
idr_image_tests

Conversation

@AlexSurtees

Copy link
Copy Markdown
Collaborator

Description

Adds the full suite of IDR images to the test suite, with a flag for whether they are 'testable'. Images that are not flagged as 'testable' are not currently supported by the viewer and therefore are not tested. These can be changed to 'testable' when support is added.

Thought needs to be given to how exactly to organise the test suites. As a baseline all images in the IDR dataset should go through a 'generic' test. In addition to these tests it is likely that we will want additional tests with more concrete/specific expectations, possibly but not necessarily with data from other sources, whether that is external or internally created test datasets.

The .yaml files should be organised in some way, e.g. all IDR images in a single directory, in order to facilitate giving a snapshot of the current capabilities of the viewer.

Type of change

  • 🐛 Bug fix (non-breaking change that resolves an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • ⚡ Optimisation (non-breaking improvement to performance or efficiency)
  • 🧩 Documentation (adds or improves documentation)
  • [x ] 🧱 Maintenance (refactor, dependency update, CI/CD, etc.)
  • 🔥 Breaking change (fix or feature that causes existing functionality to change)

@netlify

netlify Bot commented May 18, 2026

Copy link
Copy Markdown

Deploy Preview for biongff-vizarr ready!

Name Link
🔨 Latest commit 268dcf4
🔍 Latest deploy log https://app.netlify.com/projects/biongff-vizarr/deploys/6a169930f8bed80008239c51
😎 Deploy Preview https://deploy-preview-82--biongff-vizarr.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented May 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AlexSurtees

Copy link
Copy Markdown
Collaborator Author

Name of fixture file derived from URL (rather than ID) - hash/uuid

@AlexSurtees AlexSurtees requested a review from davehorsfall May 21, 2026 09:42
@AlexSurtees AlexSurtees marked this pull request as ready for review May 21, 2026 09:44
@davehorsfall davehorsfall requested a review from Copilot May 21, 2026 16:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a “generic” fixtures suite for IDR (and related) Zarr sources and updates the viewer test harness to only run against fixtures flagged as testable, so unsupported datasets can be included without failing CI.

Changes:

  • Add testable flag to YAML fixture metadata and gate the generic “can read without error” test on it.
  • Move the generic test fixture lookup to fixtures/generic and add many new generic fixture YAMLs.
  • Add a Codecov config to ignore viewer/tests/.

Reviewed changes

Copilot reviewed 95 out of 97 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
viewer/tests/metadata.js Adds testable to generated metadata and introduces an untestable-yaml writer helper.
viewer/tests/images.test.js Switches tests to fixtures/generic and skips fixtures where testable is false.
pnpm-workspace.yaml Formatting-only change.
fixtures/kingsnake.yaml Adds testable: true to existing root fixture.
fixtures/6001240_labels.yaml Adds testable: true to existing root fixture.
.github/codecov.yml Ignores viewer/tests/ in Codecov.
fixtures/generic/ffa293ab-7bea-4464-9865-b5dfea286ab9.yaml Adds generic fixture entry (untestable).
fixtures/generic/fcd03633-67ec-4089-9732-20e39d95a1f5.yaml Adds generic fixture entry (testable).
fixtures/generic/fa237fbb-6a92-4998-85d3-1ec795baf516.yaml Adds generic fixture entry (testable).
fixtures/generic/f960e2d2-3c9a-48c5-9721-1f57af27abec.yaml Adds generic fixture entry (untestable).
fixtures/generic/f8545197-952d-4c23-94fa-af1e9fdb9f7d.yaml Adds generic fixture entry (testable).
fixtures/generic/f2d97fd4-c825-47bf-9f33-19a8d2b9da88.yaml Adds generic fixture entry (testable).
fixtures/generic/ef272493-28b8-4a46-a5b4-744ab8556e13.yaml Adds generic fixture entry (testable).
fixtures/generic/dacb2378-aa3d-4835-8878-37e6737cee9e.yaml Adds generic fixture entry (untestable).
fixtures/generic/d283bb51-3b33-413a-af55-0ce861858e59.yaml Adds generic fixture entry (testable).
fixtures/generic/cb2244ef-3881-4736-858f-fad8f3aef12e.yaml Adds generic fixture entry (testable).
fixtures/generic/ca28beae-f25a-45d9-baeb-d82dd6a33f61.yaml Adds generic fixture entry (testable).
fixtures/generic/c4904df5-0005-4a80-953e-62b1ede447b4.yaml Adds generic fixture entry (testable).
fixtures/generic/c4163d01-b3d0-4c7c-939f-f2390d68ceea.yaml Adds generic fixture entry (testable).
fixtures/generic/bbfb44b9-5505-401b-8d82-318f646cd06f.yaml Adds generic fixture entry (testable).
fixtures/generic/bacb4799-7d22-4e2b-89bc-0fb6af476b8a.yaml Adds generic fixture entry (testable).
fixtures/generic/b9bd91c9-a7a6-481c-9dfd-d0950a71a477.yaml Adds generic fixture entry (testable).
fixtures/generic/b702ca85-9fd8-4598-8d90-64b484a1b695.yaml Adds generic fixture entry (testable).
fixtures/generic/b34c35db-3e0e-4951-b765-ed8b6617fb2f.yaml Adds generic fixture entry (untestable).
fixtures/generic/b0d67e24-de5b-4866-8fbd-cf51a00cdbcf.yaml Adds generic fixture entry (testable).
fixtures/generic/b019a099-9205-489c-ae84-1d95c43c3b0a.yaml Adds generic fixture entry (testable).
fixtures/generic/ae184d89-7410-4ea0-a0ad-267590eaf7e4.yaml Adds generic fixture entry (testable).
fixtures/generic/a9da3c6c-d2a1-42d4-9bc0-2b3dfefc2012.yaml Adds generic fixture entry (testable).
fixtures/generic/a8dc80a9-a3a7-47d0-bfbe-62245e9e2019.yaml Adds generic fixture entry (testable).
fixtures/generic/a6e4722e-85c7-40e2-8e8f-84ec55117186.yaml Adds generic fixture entry (testable).
fixtures/generic/a410e397-651e-4eea-a6f2-f30aa8d8a9f0.yaml Adds generic fixture entry (testable).
fixtures/generic/a105f5b7-7e76-42cc-9652-5c051e122f59.yaml Adds generic fixture entry (untestable).
fixtures/generic/9f8b6511-3a57-4945-8ff4-11ad1fdde54b.yaml Adds generic fixture entry (testable).
fixtures/generic/9f1a11eb-29ae-469b-93fd-a404b28755ee.yaml Adds generic fixture entry (testable).
fixtures/generic/9eacd3fe-9f15-432c-8b2b-9b3e54b06828.yaml Adds generic fixture entry (testable).
fixtures/generic/9bd6b892-fdf9-4caf-931b-186f535885f7.yaml Adds generic fixture entry (testable).
fixtures/generic/9b5b4fc7-de59-42f9-b161-2fe47c89b3a0.yaml Adds generic fixture entry (testable).
fixtures/generic/91ab4871-f9fc-4174-abec-866a14ea0ce3.yaml Adds generic fixture entry (untestable).
fixtures/generic/90f2c920-90f7-4b28-bf21-b1367a009940.yaml Adds generic fixture entry (untestable).
fixtures/generic/8eadf4da-2c9a-4743-bdb8-f2082ab9a062.yaml Adds generic fixture entry (testable).
fixtures/generic/8a38b941-51b1-4d63-ba43-64b688e7d576.yaml Adds generic fixture entry (testable).
fixtures/generic/883cb4c2-e5ce-46f2-aa8c-464af9704e8c.yaml Adds generic fixture entry (untestable).
fixtures/generic/86c1338f-59aa-4627-a352-2bf3334b39ae.yaml Adds generic fixture entry (untestable).
fixtures/generic/7953a88e-2110-44b4-a41f-4c4d13f17065.yaml Adds generic fixture entry (testable).
fixtures/generic/77aa71ae-e067-41e4-a24a-8c694160f8f7.yaml Adds generic fixture entry (testable).
fixtures/generic/74cbdfb2-dfd1-4e28-b09a-2c3eacc2d1ea.yaml Adds generic fixture entry (testable).
fixtures/generic/747e9ae7-6eae-4bb7-897a-e2180e703616.yaml Adds generic fixture entry (testable).
fixtures/generic/710d0093-e694-4cfe-aa49-9e03cd439c5d.yaml Adds generic fixture entry (untestable).
fixtures/generic/6c3ca6ef-7570-4126-9e53-7e9436ed54d1.yaml Adds generic fixture entry (testable).
fixtures/generic/698053e3-d485-4469-9245-caa6c3ec9fe1.yaml Adds generic fixture entry (testable).
fixtures/generic/68d9072d-da3c-4670-ab93-40164d34f962.yaml Adds generic fixture entry (testable).
fixtures/generic/65b1be90-370e-4661-b35a-6f20417a8b55.yaml Adds generic fixture entry (testable).
fixtures/generic/64075c0b-45d6-48cb-87b2-6e8c30ef9d69.yaml Adds generic fixture entry (testable).
fixtures/generic/623fb91b-1389-4eff-ac1a-b637f67bddc8.yaml Adds generic fixture entry (testable).
fixtures/generic/60ad7d2e-64ca-4680-8be4-ce8cadaa57b4.yaml Adds generic fixture entry (testable).
fixtures/generic/5e24ceaa-6c15-4c83-aeef-2eef5cda9767.yaml Adds generic fixture entry (testable).
fixtures/generic/5e1df35f-6417-4ca5-8dd9-19a1efdf87eb.yaml Adds generic fixture entry (testable).
fixtures/generic/5d3e3fb3-05eb-43d6-8061-9ad463612d4e.yaml Adds generic fixture entry (untestable).
fixtures/generic/5c2bd073-a256-4047-be0a-1768938caf61.yaml Adds generic fixture entry (testable).
fixtures/generic/5bcaa16a-1468-4ee9-822b-87866483bba6.yaml Adds generic fixture entry (testable).
fixtures/generic/5a273ada-1109-4948-a3f5-8703a6d0e3fb.yaml Adds generic fixture entry (testable).
fixtures/generic/55fa5fb3-8ea9-4725-afe9-2591e8d5489b.yaml Adds generic fixture entry (testable).
fixtures/generic/55e542b3-8927-4719-8ec0-b1d33cd8bd41.yaml Adds generic fixture entry (testable).
fixtures/generic/55abbf8f-2813-4d5e-86b8-8dca71b44103.yaml Adds generic fixture entry (testable).
fixtures/generic/5359e36c-c6a3-4d0c-ae75-d8d189c95f18.yaml Adds generic fixture entry (testable).
fixtures/generic/52f36829-a6c1-4f56-9982-c29610d15f85.yaml Adds generic fixture entry (testable).
fixtures/generic/50622cae-103d-4d14-ad48-4a4379e4b885.yaml Adds generic fixture entry (testable).
fixtures/generic/4bfbd46d-30d6-4b9e-a842-cc9d6ea2f713.yaml Adds generic fixture entry (testable).
fixtures/generic/4611aa11-c9c4-4459-bf61-b97d68693627.yaml Adds generic fixture entry (testable).
fixtures/generic/4101281b-abe0-4199-9fa7-2ea96a200c29.yaml Adds generic fixture entry (testable).
fixtures/generic/3e33a0e8-d4ea-4027-ba2a-e64150d957d8.yaml Adds generic fixture entry (untestable).
fixtures/generic/3dd517fc-9b4b-4aae-bb90-afb2f334b60f.yaml Adds generic fixture entry (testable).
fixtures/generic/2d52ade7-81eb-426e-9181-3aca6e1e18d8.yaml Adds generic fixture entry (untestable).
fixtures/generic/2ca15d77-3970-4fe5-ba52-ac5773c13466.yaml Adds generic fixture entry (testable).
fixtures/generic/2c35dfdf-0206-4d1e-a9a5-7899407918ad.yaml Adds generic fixture entry (testable).
fixtures/generic/2bc2e49d-8771-40c4-87e4-5b141da5c66f.yaml Adds generic fixture entry (testable).
fixtures/generic/2abeddbb-e0fd-411d-81c9-40f49eb457a2.yaml Adds generic fixture entry (untestable).
fixtures/generic/2a6ef65b-82c3-4840-b2aa-48b5421e010a.yaml Adds generic fixture entry (testable).
fixtures/generic/2a5229a7-d6e3-4288-a6c0-1c0a8351cbb7.yaml Adds generic fixture entry (testable).
fixtures/generic/273ac7ef-8a87-425e-9c70-1f3f5000023e.yaml Adds generic fixture entry (testable).
fixtures/generic/2729b5d9-5d5a-4869-a49e-fbae7bfc981e.yaml Adds generic fixture entry (testable).
fixtures/generic/26aa2b14-b04e-4abb-b080-6e8dcc3e8406.yaml Adds generic fixture entry (testable).
fixtures/generic/25ac3825-bd3f-458d-8966-090c4894314e.yaml Adds generic fixture entry (testable).
fixtures/generic/2486d06d-4081-430e-9d00-d2c0dd8b3757.yaml Adds generic fixture entry (testable).
fixtures/generic/1ec4fbba-11db-42c2-948c-f373d7a0b6e8.yaml Adds generic fixture entry (testable).
fixtures/generic/1c0fbd52-7971-4095-9f90-669cc6728973.yaml Adds generic fixture entry (untestable).
fixtures/generic/1bc4a58c-392a-4168-8713-94a85df1832a.yaml Adds generic fixture entry (testable).
fixtures/generic/1ae8a9db-3c11-4cd4-85e0-205240e0fc37.yaml Adds generic fixture entry (testable).
fixtures/generic/19e98a94-27af-481a-8aea-0ce09df4b145.yaml Adds generic fixture entry (untestable).
fixtures/generic/13834ee8-6e10-4898-8cd5-76545ba98793.yaml Adds generic fixture entry (testable).
fixtures/generic/123062e1-46ad-474a-b308-d488073ccb7d.yaml Adds generic fixture entry (testable).
fixtures/generic/0d8964be-d8ed-4642-b490-8733bc4cb588.yaml Adds generic fixture entry (testable).
fixtures/generic/0d594022-23f2-4c61-9141-0a5a433e6606.yaml Adds generic fixture entry (untestable).
fixtures/generic/0a11ad7d-ed50-4cbe-affa-0355148c9595.yaml Adds generic fixture entry (testable).
fixtures/generic/0838583a-af6a-488a-b93d-3e86a912219a.yaml Adds generic fixture entry (testable).
fixtures/generic/0259e1da-a6f6-4966-977f-8a6eda01a9c6.yaml Adds generic fixture entry (untestable).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread viewer/tests/metadata.js Outdated
Comment on lines +26 to +33
export function writeUntestableYaml(url, imageName, savePath, testable) {
fs.writeFileSync(
path.join(savePath, `${imageName}.yaml`),
stringify({
source: url,
name: imageName,
testable: false,
}),
Comment on lines 5 to 7
import { createSourceData } from "../src/io";
import { getYamlFileNames, writeImageYaml } from "./metadata";
import { getYamlFileNames, writeImageYaml, writeUntestableYaml } from "./metadata";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Valid?

Comment on lines +17 to +22
test(`Can read ${description.name} without error`, async () => {
await createSourceData({
source: description.source,
});
await writeImageYaml(description.source, description.name, imagesPath);
}, 20000);
Comment on lines +1 to +4
source: https://livingobjects.ebi.ac.uk/idr/zarr/v0.5/idr0157/Asterella gracilis
SWE/IMG_1033-1112 Asterella gracilis (Mannia gracilis) stature.ome.zarr
name: 15154182
testable: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Happy for this to be a follow up, but spaces in URLs (who does this?) is a valid point to raise.

Comment on lines 12 to +17
files.map(async (file) => {
const filePath = path.join(imagesPath, file);
const description = yaml.parse(fs.readFileSync(filePath, "utf8"));
test(`Can read ${description.name} without error`, async () => {
await createSourceData({
source: description.source,
});
await writeImageYaml(description.source, description.name, imagesPath);
}, 20000);

if (description.testable) {
test(`Can read ${description.name} without error`, async () => {
Comment thread fixtures/kingsnake.yaml Outdated
Comment on lines 1 to 4
source: https://ome-zarr-scivis.s3.us-east-1.amazonaws.com/v0.5/96x2-ozx/kingsnake.ozx
name: kingsnake
testable: true
type: dask_image_gaussian
Comment thread fixtures/6001240_labels.yaml Outdated
@@ -1,5 +1,6 @@
source: https://livingobjects.ebi.ac.uk/idr/zarr/v0.5/idr0062A/6001240_labels.zarr
name: 6001240_labels
testable: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This URL does appear to be included in fixtures, so perhaps this needs to be removed before merge?

Comment on lines +16 to +22
if (description.testable) {
test(`Can read ${description.name} without error`, async () => {
await createSourceData({
source: description.source,
});
await writeImageYaml(description.source, description.name, imagesPath);
}, 20000);

@davehorsfall davehorsfall left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@AlexSurtees I've approved so you can merge and proceed with stuff next week. However, there are couple of remedial points that have been picked up by co-pilot that would be good to address. Please review them, make changes, and then merge when you're happy thanks.

Comment on lines +1 to +4
source: https://livingobjects.ebi.ac.uk/idr/zarr/v0.5/idr0157/Asterella gracilis
SWE/IMG_1033-1112 Asterella gracilis (Mannia gracilis) stature.ome.zarr
name: 15154182
testable: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Happy for this to be a follow up, but spaces in URLs (who does this?) is a valid point to raise.

Comment thread fixtures/6001240_labels.yaml Outdated
@@ -1,5 +1,6 @@
source: https://livingobjects.ebi.ac.uk/idr/zarr/v0.5/idr0062A/6001240_labels.zarr
name: 6001240_labels
testable: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This URL does appear to be included in fixtures, so perhaps this needs to be removed before merge?

Comment thread fixtures/kingsnake.yaml Outdated
@@ -1,5 +1,6 @@
source: https://ome-zarr-scivis.s3.us-east-1.amazonaws.com/v0.5/96x2-ozx/kingsnake.ozx

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Again, this URL does appear to be replicated in fixtures, so assuming these are legacy copies and can probably be removed?

Comment on lines 5 to 7
import { createSourceData } from "../src/io";
import { getYamlFileNames, writeImageYaml } from "./metadata";
import { getYamlFileNames, writeImageYaml, writeUntestableYaml } from "./metadata";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Valid?

@AlexSurtees AlexSurtees merged commit bf3c117 into dev May 27, 2026
7 checks passed
@AlexSurtees AlexSurtees deleted the idr_image_tests branch May 27, 2026 07:16
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.

3 participants