Skip to content

Conversation

gselzer
Copy link

@gselzer gselzer commented Aug 25, 2025

Was just looking though pymmcore-plus#469 and wanted to check whether I could fix some of the test errors...this changeset fixes the errors coming out of test_config_groups_widget.py.

Feel free to use or discard if you don't want it.

@tlambert03
Copy link
Owner

yeah, unfortunately... while this certainly fixes the issues, it goes in a direction I was hoping we wouldn't have to go in, which is to bring in the core to something that was otherwise purely model. The entire config group stuff so far needs no "maintained" awareness of a core, but rather checks in with the core just once in create_from_core after which everything is pure model. I'm not yet ready to lose that nice decoupling just to fix this issue. thanks for the PR

@tlambert03 tlambert03 closed this Aug 25, 2025
@gselzer
Copy link
Author

gselzer commented Aug 25, 2025

The entire config group stuff so far needs no "maintained" awareness of a core, but rather checks in with the core just once in create_from_core after which everything is pure model.

That's not quite true though - if you run examples/config_presets_table.py, you'll find that StandardIcon, which is really the problematic class here, checks in with the core constantly after the create_from_core call. Maybe a better fix is to then pre-fetch icons for each device in the core?

@tlambert03
Copy link
Owner

Maybe a better fix is to then pre-fetch icons for each device in the core?

yes that's what I meant by "grab the device type at model creation time, not to preserve the core" in pymmcore-plus#469 (comment)

in any case... this has already been on my radar, and it's all part of pymmcore-plus#451 which is still an active work in progress. I know where I'm going with that and this will be modified in the course of that PR.

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.

2 participants