Skip to content

Commit fb5d0fb

Browse files
committed
Merge branch 'main' into no-tomo-tilt-input
2 parents eaad1b6 + e1fa429 commit fb5d0fb

35 files changed

+509
-830
lines changed

.bumpclient.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.bumpversion]
2-
current_version = "0.17.8"
2+
current_version = "0.17.9"
33
commit = true
44
tag = false
55

.bumpversion.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.bumpversion]
2-
current_version = "0.17.8"
2+
current_version = "0.17.9"
33
commit = true
44
tag = true
55

Helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
name: murfey-services
33
description: Umbrella Helm chart for deploying the servers and daemons needed to enable Murfey to transfer and process data
4-
version: 0.17.8
4+
version: 0.17.9
55
dependencies:
66
- name: murfey-instrument-server-clem
77
- name: murfey-instrument-server-tem
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: v1
22
name: murfey-instrument-server-clem
33
description: Helm chart for deploying a Murfey instrument server, which executes orders to detect, modify, and transfer files on the instrument PC, and notifies the backend server about transferred files
4-
version: 0.17.8
4+
version: 0.17.9
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: v1
22
name: murfey-rsync
33
description: Helm chart for deploying an rsync daemon, which is responsible for executing the transfer of files from the client storage directory to the server storage system
4-
version: 0.17.8
4+
version: 0.17.9
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: v1
22
name: murfey-server
33
description: Helm chart for deploying a Murfey backend server, which is responsible for orchestrating the data transfer and processing workflow between the client PC and the storage system
4-
version: 0.17.8
4+
version: 0.17.9

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ requires = [
77

88
[project]
99
name = "murfey"
10-
version = "0.17.8"
10+
version = "0.17.9"
1111
description = "Client-Server architecture hauling Cryo-EM data"
1212
readme = "README.md"
1313
keywords = [

src/murfey/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from __future__ import annotations
22

3-
__version__ = "0.17.8"
4-
__supported_client_version__ = "0.17.8"
3+
__version__ = "0.17.9"
4+
__supported_client_version__ = "0.17.9"

src/murfey/client/__init__.py

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import argparse
44
import configparser
5-
6-
# import json
75
import logging
86
import os
97
import platform
@@ -12,57 +10,26 @@
1210
import time
1311
import webbrowser
1412
from datetime import datetime
15-
from functools import partial
1613
from pathlib import Path
1714
from queue import Queue
1815
from typing import List, Literal
1916
from urllib.parse import ParseResult, urlparse
2017

2118
import requests
22-
23-
# from multiprocessing import Process, Queue
2419
from rich.prompt import Confirm
2520

26-
import murfey.client.rsync
2721
import murfey.client.update
2822
import murfey.client.watchdir
2923
import murfey.client.websocket
3024
from murfey.client.customlogging import CustomHandler, DirectableRichHandler
3125
from murfey.client.instance_environment import MurfeyInstanceEnvironment
3226
from murfey.client.tui.app import MurfeyTUI
3327
from murfey.client.tui.status_bar import StatusBar
34-
from murfey.util import _get_visit_list
35-
36-
# from asyncio import Queue
37-
38-
39-
# from rich.prompt import Prompt
40-
28+
from murfey.util.client import _get_visit_list, authorised_requests, read_config
4129

4230
log = logging.getLogger("murfey.client")
4331

44-
45-
def read_config() -> configparser.ConfigParser:
46-
config = configparser.ConfigParser()
47-
try:
48-
mcch = os.environ.get("MURFEY_CLIENT_CONFIG_HOME")
49-
murfey_client_config_home = Path(mcch) if mcch else Path.home()
50-
with open(murfey_client_config_home / ".murfey") as configfile:
51-
config.read_file(configfile)
52-
except FileNotFoundError:
53-
log.warning(
54-
f"Murfey client configuration file {murfey_client_config_home / '.murfey'} not found"
55-
)
56-
if "Murfey" not in config:
57-
config["Murfey"] = {}
58-
return config
59-
60-
61-
token = read_config()["Murfey"].get("token", "")
62-
63-
requests.get = partial(requests.get, headers={"Authorization": f"Bearer {token}"})
64-
requests.post = partial(requests.post, headers={"Authorization": f"Bearer {token}"})
65-
requests.delete = partial(requests.delete, headers={"Authorization": f"Bearer {token}"})
32+
requests.get, requests.post, requests.put, requests.delete = authorised_requests()
6633

6734

6835
def write_config(config: configparser.ConfigParser):

src/murfey/client/analyser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from murfey.client.instance_environment import MurfeyInstanceEnvironment
2323
from murfey.client.rsync import RSyncerUpdate, TransferResult
2424
from murfey.client.tui.forms import FormDependency
25-
from murfey.util import Observer, get_machine_config_client
25+
from murfey.util.client import Observer, get_machine_config_client
2626
from murfey.util.mdoc import get_block
2727
from murfey.util.models import ProcessingParametersSPA, ProcessingParametersTomo
2828

0 commit comments

Comments
 (0)