-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add entry points for viewer registry #411
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
from .layer_artist import * # noqa | ||
from .viewer import * # noqa | ||
|
||
|
||
def setup(): | ||
from viewer import BqplotHistogramView # noqa | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
from .layer_artist import * # noqa | ||
from .viewer import * # noqa | ||
|
||
|
||
def setup(): | ||
from viewer import BqplotImageView # noqa |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
from .layer_artist import * # noqa | ||
from .viewer import * # noqa | ||
|
||
|
||
def setup(): | ||
from viewer import BqplotProfileView # noqa |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
from .layer_artist import * # noqa | ||
from .viewer import * # noqa | ||
|
||
|
||
def setup(): | ||
from viewer import BqplotScatterView # noqa |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
from .volume.viewer import IpyvolumeVolumeView # noqa | ||
from .scatter.viewer import IpyvolumeScatterView # noqa | ||
|
||
|
||
def setup(): | ||
from viewer import IpyvolumeVolumeView # noqa |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
from .layer_artist import * # noqa | ||
from .layer_style_widget import * # noqa | ||
from .viewer import * # noqa | ||
|
||
|
||
def setup(): | ||
from viewer import IpyvolumeScatterView # noqa |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
from glue_jupyter.common.state3d import Scatter3DViewerState | ||
from glue_jupyter.registries import viewer_registry | ||
|
||
from .layer_artist import IpyvolumeScatterLayerArtist | ||
from .layer_style_widget import Scatter3DLayerStateWidget | ||
from ..common.viewer_options_widget import Viewer3DStateWidget | ||
|
@@ -7,6 +9,7 @@ | |
__all__ = ['IpyvolumeScatterView'] | ||
|
||
|
||
@viewer_registry("scatter3d") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The registration of the viewer should be done in |
||
class IpyvolumeScatterView(IpyvolumeBaseView): | ||
|
||
allow_duplicate_data = False | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
from .viewer import TableViewer # noqa | ||
|
||
|
||
def setup(): | ||
from viewer import TableViewer # noqa |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,16 @@ install_requires = | |
bqplot-gl | ||
scikit-image | ||
|
||
[options.entry_points] | ||
glue.plugins = | ||
histogram = glue_jupyter.bqplot.histogram:setup | ||
image = glue_jupyter.bqplot.image:setup | ||
profile = glue_jupyter.bqplot.profile:setup | ||
scatter = glue_jupyter.bqplot.scatter:setup | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These plugin names might conflict with the ones from glue-core - the entry point names should be unique across the glue ecosystem. |
||
table = glue_jupyter.table:setup | ||
scatter3d = glue_jupyter.ipyvolume.scatter:setup | ||
volume = glue_jupyter.ipyvolume.volume:setup | ||
|
||
[options.extras_require] | ||
test = | ||
pytest | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is needed, since * is already imported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I think I got confused because I forgot that you have to manually rerun pip install to rebuild the entry points when I was developing this. And yes, this means we can simplify glue-solara to just build a list of viewers from the registry.