Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bc15f7e
First pass of removing files and attributes related to the Murfey TUI…
tieneupin Dec 11, 2025
761ff35
Simplified optional dependency keys used in 'pyproject.toml'; 'instru…
tieneupin Dec 11, 2025
a5b2ee8
Removed 'tui' folder from tests
tieneupin Dec 11, 2025
ce6d2fd
Added a HTTPS-based log handler to post logs in batches to a specifie…
tieneupin Dec 12, 2025
b76c121
Added new backend router for logging-related endpoints
tieneupin Dec 12, 2025
277cca3
Replaced CustomHandler with HTTPSHandler in instrument server
tieneupin Dec 12, 2025
d3effca
Removed all websocket components from the client side
tieneupin Dec 12, 2025
ff1856b
Removed apparently unused endpoints and functions from websocket router
tieneupin Dec 12, 2025
30004b1
Created 'murfey.util.logging' to store LogFilter and HTTPSHandler cla…
tieneupin Dec 12, 2025
69efbf0
Merge recent changes from 'main' branch
tieneupin Dec 12, 2025
f001b9c
Forgot to update router path
tieneupin Dec 12, 2025
a7c7deb
Fixed broken test
tieneupin Dec 12, 2025
8c2351c
Minor updates to comments and iteration logic
tieneupin Dec 12, 2025
d4e7e16
Added unit test for the HTTPS log handler
tieneupin Dec 12, 2025
f0284f1
Resolved merge conflicts with 'main' branch
tieneupin Dec 12, 2025
b35d452
Don't assert 'https_handler.close()', just run it
tieneupin Dec 12, 2025
d75cee7
Attempt at fixing warnings raised by CodeQL
tieneupin Dec 12, 2025
d7bdd8f
Fixed incorrectly named loggers
tieneupin Dec 12, 2025
bfa7ab3
Added unit test for the 'forward_logs' API endpoint
tieneupin Dec 15, 2025
ac158c0
Make test file names more specific
tieneupin Dec 15, 2025
9d36424
Updated code to remove references to the 'client' optional dependency…
tieneupin Dec 15, 2025
52e4d50
Updated documentation
tieneupin Dec 15, 2025
c9fe70c
Missed a couple of 'pip install' commands in GitHub workflows
tieneupin Dec 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Install Murfey
run: |
set -eux
pip install --disable-pip-version-check -e "."[cicd,client,server,developer]
pip install --disable-pip-version-check -e "."[cicd,server,developer]

- uses: shogo82148/actions-setup-mysql@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Check current tag
id: checkTag
run: |
pip install --disable-pip-version-check -e "."[cicd,client,server,developer]
pip install --disable-pip-version-check -e "."[cicd,server,developer]
VERSION=$(python -c "import murfey; print(murfey.__version__)")
echo "newVersion=v$VERSION" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Install package
run: |
set -eux
pip install --disable-pip-version-check -e "."[cicd,client,server,developer]
pip install --disable-pip-version-check -e "."[cicd,server,developer]
- name: Run bumpversion and push tag
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/murfey-instrument-server
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN apt-get update && \
pip \
build \
importlib-metadata && \
/venv/bin/python -m pip install /python-murfey[client]
/venv/bin/python -m pip install /python-murfey


# Transfer completed Murfey build to base image
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ then install using the following command.
```text
$ git clone git@github.com:DiamondLightSource/python-murfey.git
$ cd python-murfey
$ pip install -e .[client,server,developer]
$ pip install -e .[server,developer]
```

The packages included under the `[developer]` installation key contain some helpful tools to aid you with developing Murfey further:
Expand All @@ -43,7 +43,7 @@ $ murfey.server
and connect the client with

```text
$ murfey --server http://127.0.0.1:8000
$ murfey.instrument_server --port 8000
```

You can also install a client on a remote machine. This machine only needs to have
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ dependencies = [
cicd = [
"pytest-cov", # Used for generating PyTest coverage reports
]
client = [
"websocket-client",
]
developer = [
"bump-my-version", # Version control
"ipykernel", # Enable interactive coding with VS Code and Jupyter Notebook
"pre-commit", # Formatting, linting, type checking, etc.
"pytest", # Test code functionality
"pytest-asyncio", # For testing async functions
"pytest-mock", # Additional mocking tools for unit tests
]
server = [
Expand Down
2 changes: 1 addition & 1 deletion src/murfey/bootstrap/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _download_to_file(url: str, outfile: str):
murfey_hostname,
"-i",
f"{murfey_base}{url_path_for('bootstrap.pypi', 'get_pypi_index')}",
"murfey[client]",
"murfey",
]
)
if result.returncode:
Expand Down
28 changes: 0 additions & 28 deletions src/murfey/client/customlogging.py

This file was deleted.

27 changes: 0 additions & 27 deletions src/murfey/client/multigrid_control.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import json
import logging
import subprocess
import threading
Expand All @@ -10,7 +9,6 @@
from typing import Dict, List, Optional
from urllib.parse import urlparse

import murfey.client.websocket
from murfey.client.analyser import Analyser
from murfey.client.context import ensure_dcg_exists
from murfey.client.contexts.spa import SPAModularContext
Expand Down Expand Up @@ -97,11 +95,6 @@ def __post_init__(self):
self.rsync_processes = self.rsync_processes or {}
self.analysers = self.analysers or {}

self.ws = murfey.client.websocket.WSApp(
server=self.murfey_url,
register_client=False,
)

# Calculate the time offset between the client and the server
current_time = datetime.now()
server_timestamp = capture_get(
Expand Down Expand Up @@ -182,17 +175,6 @@ def clean_up_once_dormant(self, running_threads: list[threading.Thread]):
if not success:
log.warning(f"Could not delete database data for {self.session_id}")

# Send message to frontend to trigger a refresh
self.ws.send(
json.dumps(
{
"message": "refresh",
"target": "sessions",
"instrument_name": self.instrument_name,
}
)
)

# Mark as dormant
self.dormant = True

Expand Down Expand Up @@ -293,15 +275,6 @@ def _start_rsyncer_multigrid(
transfer=machine_data.get("data_transfer_enabled", True),
restarted=str(source) in self.rsync_restarts,
)
self.ws.send(
json.dumps(
{
"message": "refresh",
"target": "rsyncer",
"session_id": self.session_id,
}
)
)

def _rsyncer_stopped(self, source: Path, explicit_stop: bool = False):
if explicit_stop:
Expand Down
2 changes: 1 addition & 1 deletion src/murfey/client/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def install_murfey(api_base: ParseResult, version: str) -> bool:
path=f"{proxy_path}{url_path_for('bootstrap.pypi', 'get_pypi_index')}",
query="",
).geturl(),
f"murfey[client]=={version}",
f"murfey=={version}",
]
)
return result.returncode == 0
191 changes: 0 additions & 191 deletions src/murfey/client/websocket.py

This file was deleted.

Loading