ONE-api 3.0b1__py3-none-any.whl → 3.0b3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ONE_api-3.0b1.dist-info → ONE_api-3.0b3.dist-info}/METADATA +1 -1
- {ONE_api-3.0b1.dist-info → ONE_api-3.0b3.dist-info}/RECORD +9 -9
- one/__init__.py +1 -1
- one/alf/spec.py +17 -2
- one/api.py +1 -1
- one/converters.py +1 -1
- {ONE_api-3.0b1.dist-info → ONE_api-3.0b3.dist-info}/LICENSE +0 -0
- {ONE_api-3.0b1.dist-info → ONE_api-3.0b3.dist-info}/WHEEL +0 -0
- {ONE_api-3.0b1.dist-info → ONE_api-3.0b3.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
one/__init__.py,sha256=
|
|
2
|
-
one/api.py,sha256=
|
|
3
|
-
one/converters.py,sha256=
|
|
1
|
+
one/__init__.py,sha256=KcdCgWnX5AVpxo19hYfLuei_cm9V6MtyXKRWp5it9xI,78
|
|
2
|
+
one/api.py,sha256=ZmlPUScAe_6VhSlqZHyi5WmQ67So-ipSSnhQ5CS_w9s,133986
|
|
3
|
+
one/converters.py,sha256=Gdei9-8I9xj9RcC6m86mgieVnl4cUS92ktkWLjyDpPc,31583
|
|
4
4
|
one/params.py,sha256=lxUPVAHKAQo0-n1QDKpeLHLYoR4v2RJ6QJcBGwlEtMQ,15464
|
|
5
5
|
one/registration.py,sha256=EhiutAjAYob_rLjDSYi3MG-dkerk97VqZWYvITDNVXw,37022
|
|
6
6
|
one/util.py,sha256=5C-UV4kh4MMnwNM2EVIs-zWCehoRi8bnH9mBip5my1k,20697
|
|
@@ -10,7 +10,7 @@ one/alf/cache.py,sha256=q7YSxRF6Q5S4AbduLSOKKkJQrqzmebpOhLUj43BRRBg,23940
|
|
|
10
10
|
one/alf/exceptions.py,sha256=tCpKvnUW13luDwz4tShcbEXofQE4uHNod4ehs21KP30,3532
|
|
11
11
|
one/alf/io.py,sha256=eNWhnGks9R3bKepefle6BvEVtbPkcdRM3X3Yqt-7r84,31674
|
|
12
12
|
one/alf/path.py,sha256=nlncF2Exi3j0-xGpReks-nzUpBQ5omofwhKgs97bDic,48243
|
|
13
|
-
one/alf/spec.py,sha256=
|
|
13
|
+
one/alf/spec.py,sha256=P70NnEmPR04CHoxZ_pfOQpaQJtJu1lJDJhpqMgInJeE,21230
|
|
14
14
|
one/remote/__init__.py,sha256=QQvfF9q4Tr4UoZOl6qnpEc3PXqwUFBSHuD0pwXnldfY,41
|
|
15
15
|
one/remote/aws.py,sha256=MHw-LNxYpHZIQfiqT7DwalyCSPTTzX4FX1L6mWcqSGc,10554
|
|
16
16
|
one/remote/base.py,sha256=Fd-Y7dXpYu59qon5joajFqZQWvfeUwSjiyzFK8uIFjU,4548
|
|
@@ -30,8 +30,8 @@ one/tests/fixtures/rest_responses/6dc96f7e9bcc6ac2e7581489b9580a6cd3f28293,sha25
|
|
|
30
30
|
one/tests/fixtures/rest_responses/db1731fb8df0208944ae85f76718430813a8bf50,sha256=jMMgzW7-GzNNNK_nr8TLMrK3DvAuxr9QpOWzKLpUQh0,210
|
|
31
31
|
one/tests/fixtures/rest_responses/dcce48259bb929661f60a02a48563f70aa6185b3,sha256=C_qtHrdKEafJzWMRORXkJlb7o7vHM7ps7S9k0BjeicU,417
|
|
32
32
|
one/tests/fixtures/rest_responses/f530d6022f61cdc9e38cc66beb3cb71f3003c9a1,sha256=qUk9DOyKdcjwKXqD0KncNCtISLOk9SR20KG6Nn5APK8,22531
|
|
33
|
-
ONE_api-3.
|
|
34
|
-
ONE_api-3.
|
|
35
|
-
ONE_api-3.
|
|
36
|
-
ONE_api-3.
|
|
37
|
-
ONE_api-3.
|
|
33
|
+
ONE_api-3.0b3.dist-info/LICENSE,sha256=gOggw_WI-2-VQU2SIZgMoTygSzeLX25vOE-kMZMnAgo,1108
|
|
34
|
+
ONE_api-3.0b3.dist-info/METADATA,sha256=2olARSRem_AVec2dBj6bnGe1O7UtcIRqdnqz80nM8yU,4263
|
|
35
|
+
ONE_api-3.0b3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
36
|
+
ONE_api-3.0b3.dist-info/top_level.txt,sha256=LIsI2lzmA5jh8Zrw5dzMdE3ydLgmq-WF6rpoxSVDSAY,4
|
|
37
|
+
ONE_api-3.0b3.dist-info/RECORD,,
|
one/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""The Open Neurophysiology Environment (ONE) API."""
|
|
2
|
-
__version__ = '3.
|
|
2
|
+
__version__ = '3.0b3'
|
one/alf/spec.py
CHANGED
|
@@ -372,10 +372,25 @@ def is_uuid_string(string: str) -> bool:
|
|
|
372
372
|
return isinstance(string, str) and is_uuid(string, (3, 4, 5)) and str(UUID(string)) == string
|
|
373
373
|
|
|
374
374
|
|
|
375
|
-
def is_uuid(uuid: Union[str, int, bytes, UUID], versions=(4,)) -> bool:
|
|
375
|
+
def is_uuid(uuid: Union[str, int, bytes, UUID], versions=(4, 3)) -> bool:
|
|
376
376
|
"""Bool test for randomly generated hexadecimal uuid validity.
|
|
377
377
|
|
|
378
|
-
|
|
378
|
+
By default only uuid versions 3 and 4 are considered valid. Version 4 uuids are generated by
|
|
379
|
+
Alyx while version 3 uuids are generated by :mod:`one.alf.cache`.
|
|
380
|
+
|
|
381
|
+
Unlike `is_uuid_string`, this function accepts UUID objects and compatible representations.
|
|
382
|
+
|
|
383
|
+
Parameters
|
|
384
|
+
----------
|
|
385
|
+
uuid : str, int, bytes, UUID
|
|
386
|
+
An object to test for UUID validity.
|
|
387
|
+
versions : tuple of int
|
|
388
|
+
The UUID versions to considered valid, by default (4, 3).
|
|
389
|
+
|
|
390
|
+
Returns
|
|
391
|
+
-------
|
|
392
|
+
bool
|
|
393
|
+
True if the input can be cast to a UUID object and is of the specified version(s).
|
|
379
394
|
"""
|
|
380
395
|
if not isinstance(uuid, (UUID, str, bytes, int)):
|
|
381
396
|
return False
|
one/api.py
CHANGED
|
@@ -1008,7 +1008,7 @@ class One(ConversionMixin):
|
|
|
1008
1008
|
"""
|
|
1009
1009
|
query_type = query_type or self.mode
|
|
1010
1010
|
datasets = self.list_datasets(
|
|
1011
|
-
eid, details=True, query_type=query_type, keep_eid_index=True)
|
|
1011
|
+
eid, details=True, query_type=query_type, keep_eid_index=True, revision=revision)
|
|
1012
1012
|
|
|
1013
1013
|
if len(datasets) == 0:
|
|
1014
1014
|
raise alferr.ALFObjectNotFound(obj)
|
one/converters.py
CHANGED
|
@@ -173,7 +173,7 @@ class ConversionMixin:
|
|
|
173
173
|
"""
|
|
174
174
|
# If not valid return None
|
|
175
175
|
if not is_uuid(eid):
|
|
176
|
-
raise ValueError(eid
|
|
176
|
+
raise ValueError(f"{eid} is not a valid eID/UUID string")
|
|
177
177
|
if isinstance(eid, str):
|
|
178
178
|
eid = UUID(eid)
|
|
179
179
|
if self._cache['sessions'].size == 0:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|