Skip to content

De-duplicate Pydantic models in lib_channels.py and lib_ngff.py #540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tcompa opened this issue Sep 27, 2023 · 0 comments
Open

De-duplicate Pydantic models in lib_channels.py and lib_ngff.py #540

tcompa opened this issue Sep 27, 2023 · 0 comments

Comments

@tcompa
Copy link
Collaborator

tcompa commented Sep 27, 2023

Likely the solution will be to import models from lib_ngff.py into lib_channels.py, and then add/override methods or attributes (e.g. as in Channel and FractalChannel(Channel)). The goal is clearly to avoid having two definitions of the same model.

Also: functions like get_channel_from_image_zarr should probably become methods of the appropriate object (NgffImageMeta, if they are sufficiently general).

Ideally this should not lead to any change of existing JSON Schemas.

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

No branches or pull requests

2 participants