Skip to content

Conversation

@will-moore
Copy link
Member

@will-moore will-moore commented Jul 24, 2025

Fixes #460

Use ome-zarr-models-py to validate data written in tests.

@will-moore
Copy link
Member Author

There are 25 failing tests with that last commit, although they are all passing locally, where I have:

$ pip freeze | grep zarr
-e git+ssh://[email protected]/ome/ome-zarr-py.git@99c9a7ef917187b9368e6496c0266602f055c8de#egg=ome_zarr
ome-zarr-models==0.1.8
pydantic-zarr==0.7.0
zarr==2.18.4

The errors are all like this:

pydantic.errors.PydanticUserError: `HCS` is not fully defined; you should define `ArraySpec`, then call `HCS.model_rebuild()`.
pydantic.errors.PydanticUserError: `Well` is not fully defined; you should define `ArraySpec`, then call `Well.model_rebuild()`.
pydantic.errors.PydanticUserError: `Labels` is not fully defined; you should define `ArraySpec`, then call `Labels.model_rebuild()`.

@dstansby - Any ideas what might be causing these?

@dstansby
Copy link
Contributor

Oh no, I know exactly what's causing that... fixed in ome-zarr-models/ome-zarr-models-py#212, I've just tagged a new release. Let me know if it's not fixed in ome-zarr-models 0.1.9

@will-moore
Copy link
Member Author

Great, thanks. Re-ran the tests and they passed 👍

@will-moore will-moore requested a review from jburel July 28, 2025 12:46
@jburel
Copy link
Member

jburel commented Jul 31, 2025

@will-moore Looks good

@jburel
Copy link
Member

jburel commented Jul 31, 2025

@dstansby we would like to push out a release candidate with #413 included.
This will obviously clash with this PR.
Do you have a timeline for support of version 0.5 in ome-zarr-models-py?

@codecov
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.02%. Comparing base (7df023e) to head (e508895).
⚠️ Report is 50 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #461      +/-   ##
==========================================
+ Coverage   87.00%   87.02%   +0.01%     
==========================================
  Files          13       13              
  Lines        1770     1772       +2     
==========================================
+ Hits         1540     1542       +2     
  Misses        230      230              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@will-moore
Copy link
Member Author

ome-zarr-models/ome-zarr-models-py#211 has been fixed in https://github.com/ome-zarr-models/ome-zarr-models-py/releases/tag/v0.1.10 so last commit removes the workaround. Tests still passing.

@dstansby
Copy link
Contributor

dstansby commented Aug 1, 2025

Do you have a timeline for support of version 0.5 in ome-zarr-models-py?

It's in progress, see https://github.com/ome-zarr-models/ome-zarr-models-py/milestone/1. Not sure on a timeline, maybe a couple of weeks? PRs welcome to fix the outstanding issues 😄

@will-moore will-moore marked this pull request as draft August 5, 2025 09:22
@will-moore will-moore force-pushed the tests_ome-zarr-models-py branch from c25b8c8 to 40562ef Compare August 5, 2025 12:30
@will-moore will-moore marked this pull request as ready for review August 5, 2025 12:40
@joshmoore
Copy link
Member

The clean diff of this looks great! will-moore/ome-zarr-py@ome-zarr-v0.5_writing...will-moore:ome-zarr-py:tests_ome-zarr-models-py

@will-moore will-moore force-pushed the tests_ome-zarr-models-py branch from 78ce68d to 3fa40e6 Compare August 20, 2025 14:45
@will-moore
Copy link
Member Author

will-moore commented Aug 20, 2025

The 4 tests failing now are due to Models05HCS.from_zarr(self.root_v3) failing validation:

  E       pydantic_core._pydantic_core.ValidationError: 1 validation error for HCS
  E       attributes.ome.plate.version

Reported at ome-zarr-models/ome-zarr-models-py#218 but this is actually due to a bug in the spec, see ome/ngff#322

Possible solutions:

  • Ignore/skip the ValidationError in these 4 tests
  • Update ome-zarr-py to write the plate.version = "0.5" for v0.5 to match what the spec requires

@will-moore
Copy link
Member Author

Tests green now @jburel

@jburel
Copy link
Member

jburel commented Sep 1, 2025

https://github.com/ome-zarr-models/ome-zarr-models-py/tree/v1.0.0 is now out. Description should be updated

@will-moore
Copy link
Member Author

@jburel Done

@will-moore
Copy link
Member Author

@jburel @joshmoore Good to merge?

@jburel jburel merged commit b49986e into ome:master Sep 4, 2025
10 checks passed
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.

Use ome-zarr-models-py for integration tests validation

4 participants