ONE-api 3.4.0__tar.gz → 3.4.1__tar.gz
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.4.0 → one_api-3.4.1/ONE_api.egg-info}/PKG-INFO +1 -1
- {one_api-3.4.0/ONE_api.egg-info → one_api-3.4.1}/PKG-INFO +1 -1
- {one_api-3.4.0 → one_api-3.4.1}/one/__init__.py +1 -1
- {one_api-3.4.0 → one_api-3.4.1}/one/webclient.py +11 -5
- {one_api-3.4.0 → one_api-3.4.1}/LICENSE +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/MANIFEST.in +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/ONE_api.egg-info/SOURCES.txt +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/ONE_api.egg-info/dependency_links.txt +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/ONE_api.egg-info/requires.txt +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/ONE_api.egg-info/top_level.txt +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/README.md +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/alf/__init__.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/alf/cache.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/alf/exceptions.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/alf/io.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/alf/path.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/alf/spec.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/api.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/converters.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/params.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/registration.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/remote/__init__.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/remote/aws.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/remote/base.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/remote/globus.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/datasets.pqt +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/params/.caches +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/params/.test.alyx.internationalbrainlab.org +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/rest_responses/1f187d80fd59677b395fcdb18e68e4401bfa1cc9 +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/rest_responses/3f51aa2e0baa42438467906f56a457c91a221898 +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/rest_responses/47893cf67c985e6361cdee009334963f49fb0746 +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/rest_responses/535d0e9a1e2c1efbdeba0d673b131e00361a2edb +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/rest_responses/5618bea3484a52cd893616f07903f0e49e023ba1 +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/rest_responses/6dc96f7e9bcc6ac2e7581489b9580a6cd3f28293 +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/rest_responses/coreapi.json +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/rest_responses/db1731fb8df0208944ae85f76718430813a8bf50 +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/rest_responses/dcce48259bb929661f60a02a48563f70aa6185b3 +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/rest_responses/f530d6022f61cdc9e38cc66beb3cb71f3003c9a1 +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/rest_responses/openapiv3.json +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/sessions.pqt +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/test_dbs.json +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/test_img.png +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/one/util.py +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/pyproject.toml +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/requirements.txt +0 -0
- {one_api-3.4.0 → one_api-3.4.1}/setup.cfg +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""The Open Neurophysiology Environment (ONE) API."""
|
|
2
|
-
__version__ = '3.4.
|
|
2
|
+
__version__ = '3.4.1'
|
|
@@ -134,12 +134,16 @@ def _cache_response(method):
|
|
|
134
134
|
# Reversible but length may exceed 255 chars
|
|
135
135
|
# name = base64.urlsafe_b64encode(args[2].encode('UTF-8')).decode('UTF-8')
|
|
136
136
|
files = list(rest_cache.glob(name))
|
|
137
|
-
cached = None
|
|
137
|
+
cached, when = None, None
|
|
138
138
|
if len(files) == 1 and not clobber:
|
|
139
139
|
_logger.debug('loading REST response from cache')
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
try:
|
|
141
|
+
with open(files[0], 'r') as f:
|
|
142
|
+
cached, when = json.load(f)
|
|
143
|
+
except json.JSONDecodeError as e:
|
|
144
|
+
_logger.debug(f'corrupted cache file {name}: {e}')
|
|
145
|
+
files[0].unlink() # delete corrupted cache file
|
|
146
|
+
if cached and datetime.fromisoformat(when) > datetime.now():
|
|
143
147
|
return cached
|
|
144
148
|
try:
|
|
145
149
|
response = method(alyx_client, *args, **kwargs)
|
|
@@ -1502,7 +1506,9 @@ class AlyxClient:
|
|
|
1502
1506
|
if len(set(kwargs.keys()) - set(self.rest_schemes.field_names(endpoint, action))):
|
|
1503
1507
|
missing = set(kwargs.keys()) - set(
|
|
1504
1508
|
self.rest_schemes.field_names(endpoint, action))
|
|
1505
|
-
|
|
1509
|
+
warnings.warn(
|
|
1510
|
+
f"Error: Unsupported fields '{missing}' in query parameters"
|
|
1511
|
+
f" for endpoint {endpoint}.")
|
|
1506
1512
|
query_params = {k: ','.join(map(str, ensure_list(v))) for k, v in kwargs.items()}
|
|
1507
1513
|
url = update_url_params(url, query_params)
|
|
1508
1514
|
return self.get('/' + url, **cache_args)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{one_api-3.4.0 → one_api-3.4.1}/one/tests/fixtures/params/.test.alyx.internationalbrainlab.org
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|