-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,9 @@ | |
- once copy is complete aggregate the qc from file. | ||
""" | ||
import yaml | ||
import uuid | ||
import logging | ||
import socket | ||
from pathlib import Path | ||
from copy import deepcopy | ||
|
||
|
@@ -32,8 +34,6 @@ | |
from iblutil.io.params import FileLock | ||
from packaging import version | ||
|
||
from ibllib.pipes.misc import create_basic_transfer_params | ||
|
||
_logger = logging.getLogger(__name__) | ||
SPEC_VERSION = '1.0.0' | ||
|
||
|
@@ -440,7 +440,7 @@ def get_remote_stub_name(session_path, device_id=None): | |
>>> get_remote_stub_name(Path.home().joinpath('subject', '2020-01-01', '001'), 'host-123') | ||
Path.home() / 'subject/2020-01-01/001/_devices/[email protected]' | ||
""" | ||
device_id = device_id or create_basic_transfer_params()['TRANSFER_LABEL'] | ||
device_id = device_id or f'{socket.gethostname()}_{uuid.getnode()}' | ||
exp_ref = '{date}_{sequence:d}_{subject:s}'.format(**ConversionMixin.path2ref(session_path)) | ||
remote_filename = f'{exp_ref}@{device_id}.yaml' | ||
return session_path / '_devices' / remote_filename |