-
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 all commits
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(): | ||
pass | ||
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(): | ||
pass |
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(): | ||
pass |
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(): | ||
pass |
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(): | ||
pass |
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(): | ||
pass |
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(): | ||
pass |
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.
Ideally the
setup
function should actually be adding the viewer to the registry (rather than using the decorator) - @CyclingNinja is working on improvements toload_plugins
that means that users will be able to opt-in to specific plugins, so we need the viewer to not be added if the entry point is not called.