Skip to content

Commit fd9f1dc

Browse files
committed
fix globus-sdk compatibility break
1 parent 5c13c6b commit fd9f1dc

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

ibllib/oneibl/patcher.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,10 @@ def __init__(self, client_name='default', one=None, label='ibllib patch'):
243243
# transfers/delete from the current computer to the flatiron: mandatory and executed first
244244
local_id = self.endpoints['local']['id']
245245
self.globus_transfer = globus_sdk.TransferData(
246-
self.client, local_id, flatiron_id, verify_checksum=True, sync_level='checksum', label=label)
247-
self.globus_delete = globus_sdk.DeleteData(self.client, flatiron_id, label=label)
246+
source_endpoint=local_id, destination_endpoint=flatiron_id,
247+
verify_checksum=True, sync_level='checksum', label=label
248+
)
249+
self.globus_delete = globus_sdk.DeleteData(endpoint=flatiron_id, label=label)
248250
# transfers/delete from flatiron to optional third parties to synchronize / delete
249251
self.globus_transfers_locals = {}
250252
self.globus_deletes_locals = {}
@@ -303,7 +305,7 @@ def patch_datasets(self, file_list, **kwargs):
303305
# if there is no transfer already created, initialize it
304306
if repo_gid not in self.globus_transfers_locals:
305307
self.globus_transfers_locals[repo_gid] = globus_sdk.TransferData(
306-
self.client, flatiron_id, repo_gid, verify_checksum=True,
308+
source_endpoint=flatiron_id, destination_endpoint=repo_gid, verify_checksum=True,
307309
sync_level='checksum', label=f"{self.label} on {fr['data_repository']}")
308310
# get the local server path and create the transfer item
309311
local_server_path = self.to_address(fr['relative_path'], fr['data_repository'])
@@ -343,17 +345,15 @@ def _wait_for_task(resp):
343345
_wait_for_task(gtc.submit_transfer(self.globus_transfer))
344346
# re-initialize the globus_transfer property
345347
self.globus_transfer = globus_sdk.TransferData(
346-
gtc,
347-
self.globus_transfer['source_endpoint'],
348-
self.globus_transfer['destination_endpoint'],
348+
source_endpoint=self.globus_transfer['source_endpoint'],
349+
destination_endpoint=self.globus_transfer['destination_endpoint'],
349350
label=self.globus_transfer['label'],
350351
verify_checksum=True, sync_level='checksum')
351352

352353
# do the same for deletes
353354
if len(self.globus_delete['DATA']) > 0:
354355
_wait_for_task(gtc.submit_delete(self.globus_delete))
355356
self.globus_delete = globus_sdk.DeleteData(
356-
gtc,
357357
endpoint=self.globus_delete['endpoint'],
358358
label=self.globus_delete['label'])
359359

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ boto3
22
click>=7.0.0
33
colorlog>=4.0.2
44
flake8>=3.7.8
5-
globus-sdk
5+
globus-sdk>=4.0.0
66
graphviz
77
matplotlib>=3.0.3
88
numba>=0.56
@@ -28,7 +28,7 @@ iblutil>=1.13.0
2828
iblqt>=0.8.2
2929
mtscomp>=1.0.1
3030
ONE-api>=3.2.0
31-
phylib>=2.6.0
31+
phylib>=2.6.2
3232
psychofit
3333
slidingRP>=1.1.1 # steinmetz lab refractory period metrics
3434
pyqt5

0 commit comments

Comments
 (0)