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

Updates for ipyvolume viewer issues #456

Merged
merged 8 commits into from
Aug 6, 2024
Merged
Prev Previous commit
Next Next commit
Update scatter tests to match axis updates.
Carifio24 committed Jul 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 9b9fe631fa56164d9c0b5c5addc5030c8c4f43ec
8 changes: 4 additions & 4 deletions glue_jupyter/ipyvolume/tests/test_ipyvolume.py
Original file line number Diff line number Diff line change
@@ -36,16 +36,16 @@ def test_scatter3d(app, dataxyz, dataxz):
assert s.layers[1].layer['y'].tolist() == [4]
assert s.layers[1].layer['z'].tolist() == [7]

assert s.layers[1].scatter.x.tolist() == [1, 2, 3]
assert s.layers[1].scatter.z.tolist() == [2, 3, 4]
assert s.layers[1].scatter.z.tolist() == [1, 2, 3]
assert s.layers[1].scatter.x.tolist() == [2, 3, 4]
assert s.layers[1].scatter.y.tolist() == [5, 6, 7]
assert s.layers[1].scatter.selected == [2]

s.state.x_att = dataxyz.id['y']
s.state.y_att = dataxyz.id['z']
s.state.z_att = dataxyz.id['x']
assert s.layers[1].scatter.x.tolist() == [2, 3, 4]
assert s.layers[1].scatter.z.tolist() == [5, 6, 7]
assert s.layers[1].scatter.z.tolist() == [2, 3, 4]
assert s.layers[1].scatter.x.tolist() == [5, 6, 7]
assert s.layers[1].scatter.y.tolist() == [1, 2, 3]
assert s.layers[1].scatter.selected == [2]


Unchanged files with check annotations Beta

# TODO: this could be cached based on the limits, but is not urgent
aspect = np.array([1, 1, 1], dtype=float)
if self.native_aspect:
aspect[0] = 1.0

Check warning on line 88 in glue_jupyter/common/state3d.py

Codecov / codecov/patch

glue_jupyter/common/state3d.py#L88

Added line #L88 was not covered by tests
aspect[1] = (self.z_max - self.z_min) / (self.x_max - self.x_min)
aspect[2] = (self.y_max - self.y_min) / (self.x_max - self.x_min)
aspect /= aspect.max()