From d759276670ea5bd9c0282a4663dd7b21208102f4 Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Sun, 31 Dec 2023 15:32:44 +0000 Subject: [PATCH 1/5] Fix bad naming of data construction method in bqplot test classes. --- glue_plotly/html_exporters/bqplot/tests/test_base.py | 2 +- glue_plotly/html_exporters/bqplot/tests/test_histogram.py | 2 +- glue_plotly/html_exporters/bqplot/tests/test_image.py | 2 +- glue_plotly/html_exporters/bqplot/tests/test_profile.py | 2 +- glue_plotly/html_exporters/bqplot/tests/test_scatter2d.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/glue_plotly/html_exporters/bqplot/tests/test_base.py b/glue_plotly/html_exporters/bqplot/tests/test_base.py index 0792efd..87400d1 100644 --- a/glue_plotly/html_exporters/bqplot/tests/test_base.py +++ b/glue_plotly/html_exporters/bqplot/tests/test_base.py @@ -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) diff --git a/glue_plotly/html_exporters/bqplot/tests/test_histogram.py b/glue_plotly/html_exporters/bqplot/tests/test_histogram.py index ebf4ceb..163c4db 100644 --- a/glue_plotly/html_exporters/bqplot/tests/test_histogram.py +++ b/glue_plotly/html_exporters/bqplot/tests/test_histogram.py @@ -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') diff --git a/glue_plotly/html_exporters/bqplot/tests/test_image.py b/glue_plotly/html_exporters/bqplot/tests/test_image.py index ed95e57..ebc1175 100644 --- a/glue_plotly/html_exporters/bqplot/tests/test_image.py +++ b/glue_plotly/html_exporters/bqplot/tests/test_image.py @@ -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): diff --git a/glue_plotly/html_exporters/bqplot/tests/test_profile.py b/glue_plotly/html_exporters/bqplot/tests/test_profile.py index a221d4e..ac4cbfa 100644 --- a/glue_plotly/html_exporters/bqplot/tests/test_profile.py +++ b/glue_plotly/html_exporters/bqplot/tests/test_profile.py @@ -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') diff --git a/glue_plotly/html_exporters/bqplot/tests/test_scatter2d.py b/glue_plotly/html_exporters/bqplot/tests/test_scatter2d.py index 66797f8..70c81a9 100644 --- a/glue_plotly/html_exporters/bqplot/tests/test_scatter2d.py +++ b/glue_plotly/html_exporters/bqplot/tests/test_scatter2d.py @@ -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): From b8fc4e7890bc998080244d73358ccedf302826a0 Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Sun, 31 Dec 2023 16:05:29 +0000 Subject: [PATCH 2/5] Add testing environments for specific glue versions. --- tox.ini | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 07132dc..2426638 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{36,37,38,39,310,311}-test +envlist = py{38,39,310,311}-glue{113,114,115,116,117}-test requires = pip >= 18.0 setuptools >= 30.3.0 @@ -9,6 +9,12 @@ passenv = HOME changedir = test: .tmp/{envname} +deps = + glue113: glue-core==1.13.* + glue114: glue-core==1.14.* + glue115: glue-core==1.15.* + glue116: glue-core==1.16.* + glue117: glue-core==1.17.* extras = test: test,qt,jupyter commands = From 88fd8dd7f5f2bfd48b5c81ba822a0966a8d7050e Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Sun, 31 Dec 2023 17:41:13 +0000 Subject: [PATCH 3/5] Add new version-specific environments to workflow file. --- .github/workflows/ci_workflows.yml | 71 +++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 2d4df63..b31718d 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -32,20 +32,67 @@ jobs: - libhdf5-dev envs: | # Standard tests - - linux: py38-test - - linux: py39-test - - linux: py310-test - - linux: py311-test + - linux: py38-glue113-test + - linux: py38-glue114-test + - linux: py38-glue115-test + - linux: py38-glue116-test + - linux: py38-glue117-test + - linux: py39-glue113-test + - linux: py39-glue114-test + - linux: py39-glue115-test + - linux: py39-glue116-test + - linux: py39-glue117-test + - linux: py310-glue113-test + - linux: py310-glue114-test + - linux: py310-glue115-test + - linux: py310-glue116-test + - linux: py310-glue117-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: py38-glue113-test + - macos: py38-glue114-test + - macos: py38-glue115-test + - macos: py38-glue116-test + - macos: py38-glue117-test + - macos: py39-glue113-test + - macos: py39-glue114-test + - macos: py39-glue115-test + - macos: py39-glue116-test + - macos: py39-glue117-test + - macos: py310-glue113-test + - macos: py310-glue114-test + - macos: py310-glue115-test + - macos: py310-glue116-test + - macos: py310-glue117-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: py38-glue113-test + - windows: py38-glue114-test + - windows: py38-glue115-test + - windows: py38-glue116-test + - windows: py38-glue117-test + - windows: py39-glue113-test + - windows: py39-glue114-test + - windows: py39-glue115-test + - windows: py39-glue116-test + - windows: py39-glue117-test + - windows: py310-glue113-test + - windows: py310-glue114-test + - windows: py310-glue115-test + - windows: py310-glue116-test + - windows: py310-glue117-test + - windows: py311-glue113-test + - windows: py311-glue114-test + - windows: py311-glue115-test + - windows: py311-glue116-test publish: needs: tests From 50613d4d5714266c3a599a3f5940c7568138d813 Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Mon, 1 Jan 2024 13:27:06 +0000 Subject: [PATCH 4/5] Install specific package versions in commands rather than deps. --- tox.ini | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tox.ini b/tox.ini index 2426638..9a8843a 100644 --- a/tox.ini +++ b/tox.ini @@ -9,15 +9,14 @@ passenv = HOME changedir = test: .tmp/{envname} -deps = - glue113: glue-core==1.13.* - glue114: glue-core==1.14.* - glue115: glue-core==1.15.* - glue116: glue-core==1.16.* - glue117: glue-core==1.17.* 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} From 317fd0576f5645ba54e19eac69c1cbeaaf49fe52 Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Mon, 1 Jan 2024 16:05:19 +0000 Subject: [PATCH 5/5] Trim down test environment matrix a bit. --- .github/workflows/ci_workflows.yml | 58 +++++++----------------------- tox.ini | 2 +- 2 files changed, 14 insertions(+), 46 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index b31718d..90c108d 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -32,67 +32,35 @@ jobs: - libhdf5-dev envs: | # Standard tests - - linux: py38-glue113-test - - linux: py38-glue114-test - - linux: py38-glue115-test - - linux: py38-glue116-test - - linux: py38-glue117-test - - linux: py39-glue113-test - - linux: py39-glue114-test - - linux: py39-glue115-test - - linux: py39-glue116-test - - linux: py39-glue117-test - - linux: py310-glue113-test - - linux: py310-glue114-test - - linux: py310-glue115-test - - linux: py310-glue116-test - - linux: py310-glue117-test + - linux: py38-test + - 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-glue113-test - - macos: py38-glue114-test - - macos: py38-glue115-test - - macos: py38-glue116-test - - macos: py38-glue117-test - - macos: py39-glue113-test - - macos: py39-glue114-test - - macos: py39-glue115-test - - macos: py39-glue116-test - - macos: py39-glue117-test - - macos: py310-glue113-test - - macos: py310-glue114-test - - macos: py310-glue115-test - - macos: py310-glue116-test - - macos: py310-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-glue113-test - - windows: py38-glue114-test - - windows: py38-glue115-test - - windows: py38-glue116-test - - windows: py38-glue117-test - - windows: py39-glue113-test - - windows: py39-glue114-test - - windows: py39-glue115-test - - windows: py39-glue116-test - - windows: py39-glue117-test - - windows: py310-glue113-test - - windows: py310-glue114-test - - windows: py310-glue115-test - - windows: py310-glue116-test - - windows: py310-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 diff --git a/tox.ini b/tox.ini index 9a8843a..315dde5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{38,39,310,311}-glue{113,114,115,116,117}-test +envlist = py{38,39,310,311}-test, py311-glue{113,114,115,116,117}-test requires = pip >= 18.0 setuptools >= 30.3.0