Skip to content

Commit

Permalink
Merge pull request #55 from Carifio24/test-glue-versions
Browse files Browse the repository at this point in the history
Test against older glue versions and update bqplot tests
  • Loading branch information
Carifio24 authored Jan 1, 2024
2 parents 908d453 + 317fd05 commit 8707c32
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 6 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,31 @@ jobs:
- linux: py39-test
- linux: py310-test
- linux: py311-test
- linux: py311-glue113-test
- linux: py311-glue114-test
- linux: py311-glue115-test
- linux: py311-glue116-test
- linux: py311-glue117-test
- macos: py38-test
- macos: py39-test
- macos: py310-test
- macos: py311-test
- macos: py311-glue113-test
- macos: py311-glue114-test
- macos: py311-glue115-test
- macos: py311-glue116-test
- macos: py311-glue117-test
- windows: py38-test
- windows: py39-test
- windows: py310-test
- windows: py311-test
- windows: py311-glue113-test
- windows: py311-glue114-test
- windows: py311-glue115-test
- windows: py311-glue116-test
- windows: py311-glue117-test
publish:
needs: tests
Expand Down
2 changes: 1 addition & 1 deletion glue_plotly/html_exporters/bqplot/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class TestBqplotExporter:
tool_id = None

def setup_method(self, method):
self.data = self.test_data()
self.data = self.make_data()
self.app = jglue()
self.app.session.data_collection.append(self.data)
self.viewer = self.app.new_data_viewer(self.viewer_type)
Expand Down
2 changes: 1 addition & 1 deletion glue_plotly/html_exporters/bqplot/tests/test_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TestHistogram(TestBqplotExporter):
viewer_type = BqplotHistogramView
tool_id = 'save:bqplot_plotlyhist'

def test_data(self):
def make_data(self):
return Data(x=[40, 41, 37, 63, 78, 35, 19, 100, 35, 86, 84, 99,
87, 56, 2, 71, 22, 36, 10, 1, 26, 70, 45, 20, 8],
label='d1')
Expand Down
2 changes: 1 addition & 1 deletion glue_plotly/html_exporters/bqplot/tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TestImage(TestBqplotExporter):
viewer_type = BqplotImageView
tool_id = 'save:bqplot_plotlyimage2d'

def test_data(self):
def make_data(self):
return Data(label='d1', x=arange(24).reshape((2, 3, 4)), y=ones((2, 3, 4)))

def test_default(self, tmpdir):
Expand Down
2 changes: 1 addition & 1 deletion glue_plotly/html_exporters/bqplot/tests/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TestProfile(TestBqplotExporter):
viewer_type = BqplotProfileView
tool_id = 'save:bqplot_plotlyprofile'

def test_data(self):
def make_data(self):
return Data(x=[40, 41, 37, 63, 78, 35, 19, 100, 35, 86, 84, 99,
87, 56, 2, 71, 22, 36, 10, 1, 26, 70, 45, 20, 8],
label='d1')
Expand Down
2 changes: 1 addition & 1 deletion glue_plotly/html_exporters/bqplot/tests/test_scatter2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TestScatter2D(TestBqplotExporter):
viewer_type = BqplotScatterView
tool_id = 'save:bqplot_plotly2d'

def test_data(self):
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):
Expand Down
7 changes: 6 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{36,37,38,39,310,311}-test
envlist = py{38,39,310,311}-test, py311-glue{113,114,115,116,117}-test
requires = pip >= 18.0
setuptools >= 30.3.0

Expand All @@ -12,6 +12,11 @@ changedir =
extras =
test: test,qt,jupyter
commands =
glue113: pip install glue-core==1.13.* glue-jupyter<=0.19
glue114: pip install glue-core==1.14.* glue-jupyter<=0.19
glue115: pip install glue-core==1.15.* glue-jupyter<=0.19
glue116: pip install glue-core==1.16.* glue-jupyter<=0.19
glue117: pip install glue-core==1.17.*
test: pip freeze
test: pytest --pyargs glue_plotly --cov glue_plotly {posargs}

Expand Down

0 comments on commit 8707c32

Please sign in to comment.