-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from Carifio24/ipyvolume
Add support for ipyvolume viewers
- Loading branch information
Showing
17 changed files
with
179 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
glue_plotly/html_exporters/jupyter/tests/test_ipyvolume_scatter3d.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
|
||
from glue.core import Data | ||
from glue_plotly.html_exporters.jupyter.tests.test_base import BaseTestJupyterExporter | ||
|
||
from pytest import importorskip | ||
|
||
importorskip('glue_jupyter') | ||
|
||
from glue_jupyter.ipyvolume import IpyvolumeScatterView # noqa: E402 | ||
|
||
|
||
class TestScatter3D(BaseTestJupyterExporter): | ||
|
||
viewer_type = IpyvolumeScatterView | ||
tool_id = 'save:jupyter_plotly3dscatter' | ||
|
||
def make_data(self): | ||
return Data(x=[1, 2, 3], y=[4, 5, 6], z=[7, 8, 9], label='d1') | ||
|
||
def test_default(self, tmpdir): | ||
output_path = self.export_figure(tmpdir, 'test_default.html') | ||
assert os.path.exists(output_path) |
28 changes: 28 additions & 0 deletions
28
glue_plotly/html_exporters/jupyter/tests/test_ipyvolume_volume.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import os | ||
|
||
from glue.core import Data | ||
from glue_plotly.html_exporters.jupyter.tests.test_base import BaseTestJupyterExporter | ||
|
||
from pytest import importorskip | ||
|
||
importorskip('glue_jupyter') | ||
|
||
from glue_jupyter.ipyvolume import IpyvolumeVolumeView # noqa: E402 | ||
|
||
from numpy import arange, ones # noqa: E402 | ||
|
||
|
||
class TestVolume(BaseTestJupyterExporter): | ||
|
||
viewer_type = IpyvolumeVolumeView | ||
tool_id = 'save:jupyter_plotlyvolume' | ||
|
||
def make_data(self): | ||
return Data(label='d1', | ||
x=arange(24).reshape((2, 3, 4)), | ||
y=ones((2, 3, 4)), | ||
z=arange(100, 124).reshape((2, 3, 4))) | ||
|
||
def test_default(self, tmpdir): | ||
output_path = self.export_figure(tmpdir, 'test_default.html') | ||
assert os.path.exists(output_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters