Closed will-moore closed 10 months ago
@josh - I can have a go at fixing this, but given my lack of sql
skills, I would move the logic for finding a path/name
from the setup.sql
mkngff_fileset()
function into the main def sql()
function, to add an extra:
self.ctx.out(f"UPDATE pixels SET name = '{name}', path = '{path}' where image in (select id from Image where fileset ={args.fileset_id});
Logic would be: choose METADATA.ome.xml
if it's found, otherwise use top-level .zattrs
.
Let me know if you'd prefer to update mkngff_fileset()
yourself and keep the logic there? - I can hold off on this (and run sql manually for now as at https://github.com/IDR/idr-metadata/issues/650#issuecomment-1699502228 for testing)?
That doesn't sound too bad. I wasn't a huge fan of the if
block in the SQL to begin with.
I see from https://github.com/IDR/omero-mkngff/blob/4c1e32bb32a7b92f427634630e6b552cbb186509/src/omero_mkngff/__init__.py#L108 that mkngff expects to find a METADATA.xml with which to update the pixels table, but in the case of omero-cli-zarr-exported NGFF data, we don't have METADATA.xml, so the pixels table won't get updated, leading to the errors seen at https://github.com/IDR/idr-metadata/issues/650#issuecomment-1699412795.
We'll need to pick another file to update the pixels table with.