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

Do not use CellWatcher outside of notebook env #726

Merged

Conversation

bnmajor
Copy link
Collaborator

@bnmajor bnmajor commented Dec 29, 2023

No description provided.

@bnmajor bnmajor requested a review from thewtex December 31, 2023 22:46
Copy link
Member

@thewtex thewtex left a comment

Choose a reason for hiding this comment

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

@bnmajor thanks!

Minor refactor requested inline.

@@ -40,7 +40,8 @@

_viewer_count = 1
_codecs_registered = False
Copy link
Member

Choose a reason for hiding this comment

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

Can we have something like:

_cell_watcher = None
if ENVIRONMENT is not Env.HYPHA:
    _cell_watcher = CellWatcher() # Instantiate the singleton class right away

[...]
# CellWatcher().add_viewer(self.parent) to
_cell_watcher and _cell_watcher.add_viewer(self.parent)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure thing!

Signed-off-by: Brianna Major <brianna.major@kitware.com>
@bnmajor bnmajor force-pushed the standalone-viewer-fixes branch from ac60a45 to 81958d0 Compare January 3, 2024 15:55
Copy link
Member

@thewtex thewtex left a comment

Choose a reason for hiding this comment

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

💯

@thewtex thewtex merged commit 5349eeb into InsightSoftwareConsortium:main Jan 3, 2024
5 checks passed
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.

None yet

2 participants