Skip to content

Commit 9247982

Browse files
committed
Gain is better as a string in the client
1 parent 7228715 commit 9247982

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/murfey/client/instance_environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class MurfeyInstanceEnvironment(BaseModel):
4848
visit: str = ""
4949
processing_only_mode: bool = False
5050
dose_per_frame: Optional[float] = None
51-
gain_ref: Optional[Path] = None
51+
gain_ref: Optional[str] = None
5252
symmetry: Optional[str] = None
5353
eer_fractionation: Optional[int] = None
5454
superres: bool = False

src/murfey/client/tui/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __init__(
8484
self._environment = environment or MurfeyInstanceEnvironment(
8585
urlparse("http://localhost:8000")
8686
)
87-
self._environment.gain_ref = gain_ref
87+
self._environment.gain_ref = str(gain_ref)
8888
self._sources = self._environment.sources or [Path(".")]
8989
self._url = self._environment.url
9090
self._default_destinations = self._environment.default_destinations
@@ -217,7 +217,7 @@ def _start_rsyncer(
217217
# Set up rsync command
218218
rsync_cmd = [
219219
"rsync",
220-
f"{posix_path(self._environment.gain_ref)!r}",
220+
f"{posix_path(Path(self._environment.gain_ref))!r}",
221221
f"{self._url.hostname}::{self._machine_config.get('rsync_module', 'data')}/{visit_path}/processing",
222222
]
223223
# Encase in bash shell
@@ -230,7 +230,7 @@ def _start_rsyncer(
230230
gain_rsync = subprocess.run(cmd)
231231
if gain_rsync.returncode:
232232
log.warning(
233-
f"Gain reference file {posix_path(self._environment.gain_ref)!r} was not successfully transferred to {visit_path}/processing"
233+
f"Gain reference file {posix_path(Path(self._environment.gain_ref))!r} was not successfully transferred to {visit_path}/processing"
234234
)
235235
if transfer:
236236
self.rsync_processes[source] = RSyncer(

0 commit comments

Comments
 (0)