From c0ad9e9e45878b7dc938e4befacafcdfed1c2a2b Mon Sep 17 00:00:00 2001 From: Zachary Lentz Date: Wed, 27 Jul 2022 16:32:06 -0700 Subject: [PATCH 1/6] DOC: write release notes for v2.3.2 --- docs/source/release_notes.rst | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index a4a21d2b..52d34110 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -2,6 +2,37 @@ Release History ================= +v2.3.2 (2022-07-27) +=================== + +Description +----------- +This is a bugfix and maintenance release. + +Fixes +----- +- Fix various instances of clipping in the positioner widget. +- Show Python documentation when no web help is available. +- Fix issues with suite sidebar width. +- Lazy load all tools to improve performance. +- Fix the profiler to also profile class methods. +- Use cached paths for finding class templates. +- Properly handle various deprecations and deprecation warnings. + +Maintenance +----------- +- Log "unable to add device" without the traceback, which was previously unhelpful. +- Pin pyqt at 5.15 for test suite incompatibility in newer versions. +- Ensure that test.qss test suite artifact is cleaned up properly. +- Fix the broken test suite. + +Contributors +------------ +- anleslac +- klauer +- zllentz + + v2.3.1 (2022-05-02) =================== From 2e085d38531a83a5c2c691a5a18ac31a4339d64e Mon Sep 17 00:00:00 2001 From: Zachary Lentz Date: Wed, 27 Jul 2022 17:11:43 -0700 Subject: [PATCH 2/6] CI: pin jinja, fix release notes --- dev-requirements.txt | 1 + docs/source/release_notes.rst | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index c9a73088..14c787bd 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -3,6 +3,7 @@ doctr doctr-versions-menu flake8 ipython>=7.16 +jinja2<3.1 line_profiler pytest pytest-benchmark diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index 52d34110..fa0f786b 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -22,9 +22,10 @@ Fixes Maintenance ----------- - Log "unable to add device" without the traceback, which was previously unhelpful. -- Pin pyqt at 5.15 for test suite incompatibility in newer versions. +- Pin pyqt at 5.12 for test suite incompatibility in newer versions. - Ensure that test.qss test suite artifact is cleaned up properly. - Fix the broken test suite. +- Pin jinja2 at <3.1 in CI builds for sphinx <4.0.0 compatibility Contributors ------------ From 1d2676bb9b0027d956cea94b5b6f78f999f8626d Mon Sep 17 00:00:00 2001 From: Zachary Lentz Date: Thu, 28 Jul 2022 13:49:09 -0700 Subject: [PATCH 3/6] ENH: happi v1.14.0 test suite compatibility and deprecation handling --- conda-recipe/meta.yaml | 2 ++ docs/source/release_notes.rst | 3 ++- typhos/plugins/happi.py | 2 +- typhos/tests/happi.cfg | 2 +- typhos/utils.py | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 4cc23b2c..916f055d 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -33,8 +33,10 @@ requirements: - qtpy - timechart >=1.2.4 run_constrained: + - happi >=1.14.0 - jupyter_client <7.3.2 + about: home: https://github.com/pcdshub/typhos doc_url: https://pcdshub.github.io/typhos diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index fa0f786b..c5e8433b 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -2,7 +2,7 @@ Release History ================= -v2.3.2 (2022-07-27) +v2.3.2 (2022-07-28) =================== Description @@ -18,6 +18,7 @@ Fixes - Fix the profiler to also profile class methods. - Use cached paths for finding class templates. - Properly handle various deprecations and deprecation warnings. +- Fix usage of deprecated methods in happi (optional dependency). Maintenance ----------- diff --git a/typhos/plugins/happi.py b/typhos/plugins/happi.py index d35b2ae8..82ef6c57 100644 --- a/typhos/plugins/happi.py +++ b/typhos/plugins/happi.py @@ -43,7 +43,7 @@ def add_listener(self, channel): else: device, child = self.address, None # Load the device from the Client - md = HappiClientState.client.find_device(name=device) + md = HappiClientState.client.find_item(name=device) obj = from_container(md) md = md.post() # If we have a child grab it diff --git a/typhos/tests/happi.cfg b/typhos/tests/happi.cfg index 8fcdac79..3bb99631 100644 --- a/typhos/tests/happi.cfg +++ b/typhos/tests/happi.cfg @@ -1,2 +1,2 @@ [DEFAULT] -path=typhos/tests/happi.json +path=happi.json diff --git a/typhos/utils.py b/typhos/utils.py index 607ee832..8c7a3c3e 100644 --- a/typhos/utils.py +++ b/typhos/utils.py @@ -743,7 +743,7 @@ def code_from_device(device): import happi from happi.loader import from_container client = happi.Client.from_config() -md = client.find_device(name="{happi_name}") +md = client.find_item(name="{happi_name}") {device.name} = from_container(md) ''' From 45487d0f9857eb63bc23bdadc44eea981b3f659d Mon Sep 17 00:00:00 2001 From: Zachary Lentz Date: Fri, 29 Jul 2022 10:27:49 -0700 Subject: [PATCH 4/6] TST: update api of FakeClient in test suite --- typhos/tests/test_alarm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typhos/tests/test_alarm.py b/typhos/tests/test_alarm.py index 6eb7c2bf..022d3cf4 100644 --- a/typhos/tests/test_alarm.py +++ b/typhos/tests/test_alarm.py @@ -106,7 +106,7 @@ def fake_client(): class FakeClient: - def find_device(self, *args, name, **kwargs): + def find_item(self, *args, name, **kwargs): return HappiItem( name=name, device_class='typhos.tests.test_alarm.SimpleDevice', From eb258b72a5c5b71b3c7766f4c10d887c3727dcb7 Mon Sep 17 00:00:00 2001 From: Zachary Lentz Date: Fri, 29 Jul 2022 10:29:19 -0700 Subject: [PATCH 5/6] TST: find_device is deprecated --- typhos/tests/test_alarm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typhos/tests/test_alarm.py b/typhos/tests/test_alarm.py index 022d3cf4..b7d93a50 100644 --- a/typhos/tests/test_alarm.py +++ b/typhos/tests/test_alarm.py @@ -117,7 +117,7 @@ def find_item(self, *args, name, **kwargs): @pytest.mark.parametrize("metadata,response", alarm_cases) def test_one_alarm_happi_ch(alarm, qtbot, metadata, response, fake_client): name = 'happi_test_device_' + str(uuid4()).replace('-', '_') - item = fake_client.find_device(name=name) + item = fake_client.find_item(name=name) device = from_container(item) with qtbot.wait_signal(alarm.alarm_changed, timeout=1000): From 9ea3bc633e522c39ebf0a92e25da745dfbb01ad7 Mon Sep 17 00:00:00 2001 From: Zachary Lentz Date: Fri, 29 Jul 2022 11:38:58 -0700 Subject: [PATCH 6/6] TST: cannot add non-widget to qtbot --- typhos/tests/test_widgets.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/typhos/tests/test_widgets.py b/typhos/tests/test_widgets.py index 13440106..d05ed6eb 100644 --- a/typhos/tests/test_widgets.py +++ b/typhos/tests/test_widgets.py @@ -25,10 +25,9 @@ def widget_button(qtbot, monkeypatch): return button -def test_sidebar_item(qtbot): +def test_sidebar_item(): param = SidebarParameter(name='test', embeddable=True) item = TyphosSidebarItem(param, 0) - qtbot.addWidget(item) assert len(item.toolbar.actions()) == 3 assert item.open_action.isEnabled() assert item.embed_action.isEnabled()