From 47c3699948871534fa38f49938763da3e2677ed0 Mon Sep 17 00:00:00 2001 From: Dmitri Gavrilov Date: Wed, 3 Dec 2025 13:02:54 -0500 Subject: [PATCH 1/6] CI: use bluesky-queueserver and bluesky-httpserver from main branch for building docs --- .github/workflows/docs.yml | 19 +++++++++++++++++++ .github/workflows/docs_publish.yml | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 603c665..3105444 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,6 +26,25 @@ jobs: # installation problems if out of date. python -m pip install --upgrade pip setuptools numpy + mkdir ~/repos + pushd ~/repos + echo $PWD + + git clone https://github.com/bluesky/bluesky-queueserver.git + pushd bluesky-queueserver + pip install . + popd + echo $PWD + + git clone https://github.com/bluesky/bluesky-httpserver.git + pushd bluesky-httpserver + pip install . + popd + echo $PWD + + popd + echo $PWD + pip install . pip install -r requirements-dev.txt pip list diff --git a/.github/workflows/docs_publish.yml b/.github/workflows/docs_publish.yml index 8923ed4..77a03a7 100644 --- a/.github/workflows/docs_publish.yml +++ b/.github/workflows/docs_publish.yml @@ -35,6 +35,25 @@ jobs: # installation problems if out of date. python -m pip install --upgrade pip setuptools numpy + mkdir ~/repos + pushd ~/repos + echo $PWD + + git clone https://github.com/bluesky/bluesky-queueserver.git + pushd bluesky-queueserver + pip install . + popd + echo $PWD + + git clone https://github.com/bluesky/bluesky-httpserver.git + pushd bluesky-httpserver + pip install . + popd + echo $PWD + + popd + echo $PWD + pip install . pip install -r requirements-dev.txt pip list From a05d3cf66a26bc7064caf6f635336dfd766c53c4 Mon Sep 17 00:00:00 2001 From: Dmitri Gavrilov Date: Wed, 3 Dec 2025 13:05:07 -0500 Subject: [PATCH 2/6] STY: remove trailing whitespace --- docs/source/api-reference.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/api-reference.rst b/docs/source/api-reference.rst index c579091..2dc6b47 100644 --- a/docs/source/api-reference.rst +++ b/docs/source/api-reference.rst @@ -262,8 +262,8 @@ API for monitoring system info of RE Manager Each instance of ``REManagerAPI`` holds a reference to System Info Monitor. The monitor operates similary to the Console Monitor and allows to receive streamed system information in real time. -The stream currently contains only messages with RE Manager *status*. Additional messages may be -added to the stream later. +The stream currently contains only messages with RE Manager *status*. Additional messages may be +added to the stream later. .. autosummary:: :nosignatures: From 3d2f06f4c384f44955fd7dcaa80689189a56c526 Mon Sep 17 00:00:00 2001 From: Dmitri Gavrilov Date: Wed, 3 Dec 2025 13:21:17 -0500 Subject: [PATCH 3/6] CI: remove unit tests for Python 3.9 --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index cbbb0da..8d32907 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13"] group: [1, 2, 3] fail-fast: false From 1baab486e46a5647f5657c19d6ad576c80120c4e Mon Sep 17 00:00:00 2001 From: Dmitri Gavrilov Date: Wed, 3 Dec 2025 13:24:31 -0500 Subject: [PATCH 4/6] ENH: install Redis using GH actions --- .github/workflows/docs_publish.yml | 5 ++++- .github/workflows/testing.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs_publish.yml b/.github/workflows/docs_publish.yml index 77a03a7..354ccd6 100644 --- a/.github/workflows/docs_publish.yml +++ b/.github/workflows/docs_publish.yml @@ -22,9 +22,12 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - uses: shogo82148/actions-setup-redis@v1 + with: + redis-version: "7.x" - name: Install dependencies run: | - sudo apt install redis + # sudo apt install redis # Versioneer uses the most recent git tag to generate __version__, which appears # in the published documentation. diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 8d32907..4456a2a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -20,9 +20,12 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - uses: shogo82148/actions-setup-redis@v1 + with: + redis-version: "7.x" - name: Install dependencies run: | - sudo apt install redis + # sudo apt install redis # These packages are installed in the base environment but may be older # versions. Explicitly upgrade them because they often create From 85b606cae11348ae319d565cc78adc230dbf2537 Mon Sep 17 00:00:00 2001 From: Dmitri Gavrilov Date: Wed, 3 Dec 2025 19:14:08 -0500 Subject: [PATCH 5/6] TST: add timeout to '_get_last_status()' --- bluesky_queueserver_api/tests/test_api.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bluesky_queueserver_api/tests/test_api.py b/bluesky_queueserver_api/tests/test_api.py index 6a60a45..552cbf4 100644 --- a/bluesky_queueserver_api/tests/test_api.py +++ b/bluesky_queueserver_api/tests/test_api.py @@ -4235,8 +4235,9 @@ def check_status(status, manager_state, worker_environment_exists): RM = instantiate_re_api_class(rm_api_class) assert RM.system_info_monitor.enabled is False - def _get_last_status(): + def _get_last_status(timeout=10): st = None + t0 = ttime.time() while True: try: msg = RM.system_info_monitor.next_msg(timeout=0.1) @@ -4244,6 +4245,8 @@ def _get_last_status(): except RM.RequestTimeoutError: if st is not None: break + if ttime.time() < t0 + timeout: + raise TimeoutError() return st if option == "single_enable": @@ -4294,8 +4297,9 @@ async def testing(): RM = instantiate_re_api_class(rm_api_class) assert RM.system_info_monitor.enabled is False - async def _get_last_status(): + async def _get_last_status(timeout=10): st = None + t0 = ttime.time() while True: try: msg = await RM.system_info_monitor.next_msg(timeout=0.1) @@ -4303,6 +4307,8 @@ async def _get_last_status(): except RM.RequestTimeoutError: if st is not None: break + if ttime.time() < t0 + timeout: + raise TimeoutError() return st if option == "single_enable": From 705e9ed9156cc74c569f82e9ccec6913d2ffc1d3 Mon Sep 17 00:00:00 2001 From: Dmitri Gavrilov Date: Wed, 3 Dec 2025 22:24:02 -0500 Subject: [PATCH 6/6] FIX: add 'websockets' as dependency --- bluesky_queueserver_api/tests/test_api.py | 4 ++-- requirements.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bluesky_queueserver_api/tests/test_api.py b/bluesky_queueserver_api/tests/test_api.py index 552cbf4..1824c8d 100644 --- a/bluesky_queueserver_api/tests/test_api.py +++ b/bluesky_queueserver_api/tests/test_api.py @@ -4245,7 +4245,7 @@ def _get_last_status(timeout=10): except RM.RequestTimeoutError: if st is not None: break - if ttime.time() < t0 + timeout: + if ttime.time() >= t0 + timeout: raise TimeoutError() return st @@ -4307,7 +4307,7 @@ async def _get_last_status(timeout=10): except RM.RequestTimeoutError: if st is not None: break - if ttime.time() < t0 + timeout: + if ttime.time() >= t0 + timeout: raise TimeoutError() return st diff --git a/requirements.txt b/requirements.txt index 8167191..b1bdbe5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ # List required packages in this file, one per line. bluesky-queueserver +websockets httpx