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

use registry for defining viewer choices #1

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

kecnry
Copy link
Collaborator

@kecnry kecnry commented Jun 7, 2024

This PR swaps out the manual definitions of individual viewers with iterating through the glue registry. Note that:

  • the viewers are only visible in the registry after they are actually imported, so histogram, image, and scatter are imported here.
  • there is no current way from the registry to lookup the glue method for creating the viewer, so that mapping is manually created here along with a "manual" fallback which will not set all attributes correctly.

Copy link
Collaborator

@iisakkirotko iisakkirotko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @kecnry!

The PR looks good. If you can rebase it onto master, I'll merge it. Let me know if you'd rather I rebase it!

Copy link
Collaborator Author

@kecnry kecnry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @iisakkirotko! I rebased locally but don't seem to have permissions to force push. The conflicts were quite straightforward though (mainly updating to keep the new grid layout changes from #11) if you'd rather just rebase on your end.

Comment on lines 96 to 103
except ValueError as error:
error_message.set(str(error))
show_error.set(True)
return
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is still useful, the entire getattr(app, ...) line could be wrapped in this to keep it for all viewers.

@iisakkirotko iisakkirotko merged commit 2892a39 into master Nov 12, 2024
8 checks passed
@iisakkirotko
Copy link
Collaborator

Thanks a lot!

@kecnry kecnry deleted the viewers-from-registry branch November 12, 2024 13:34
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