Skip to content
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

Best design for plugins? #206

Closed
constantinpape opened this issue Sep 22, 2023 · 2 comments
Closed

Best design for plugins? #206

constantinpape opened this issue Sep 22, 2023 · 2 comments
Milestone

Comments

@constantinpape
Copy link
Contributor

constantinpape commented Sep 22, 2023

Currently, the annotation tools are all implemented using separate functions that duplicate quite some functionality.
It would be better to find a design that enables sharing more of the common functionality between them.
There are two different approaches:

@tlambert03
Copy link

tlambert03 commented Sep 22, 2023

It's a bit unclear to us how exactly this would work with magicgui

also consider dataclasses: https://pyapp-kit.github.io/magicgui/dataclasses/

(much better for inheritance... and really, much better all around)

@constantinpape
Copy link
Contributor Author

We have decided now to go with a "normal" class design and use inheritance, see #304. I decided against dataclasses because the logic for initializing the plugins here is a bit more complex and requires a full fledged init.

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

No branches or pull requests

2 participants