From 1f2ab97f47f65ba1b0b6356a069c95bf5a943fef Mon Sep 17 00:00:00 2001 From: owinter Date: Thu, 5 Dec 2024 16:30:51 +0000 Subject: [PATCH 1/3] registration tests fixed as alyx collections are empty strings now --- one/tests/test_registration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/one/tests/test_registration.py b/one/tests/test_registration.py index 9fd37cde..0828b38e 100644 --- a/one/tests/test_registration.py +++ b/one/tests/test_registration.py @@ -318,7 +318,7 @@ def test_register_files(self): r, = self.client.register_files(file_list=[file]) self.assertEqual(r['revision'], rev['name']) self.assertTrue(r['default']) - self.assertIsNone(r['collection']) + self.assertEqual('', r['collection']) # Register exact dataset revision again - it should append an 'a' # When we re-register the original it should move them into revision with today's date @@ -337,7 +337,7 @@ def test_register_files(self): file = files[1].parent.joinpath(f'#{r2["revision"]}#', file.name) self.assertTrue(file.exists()) - self.assertIsNone(r3['revision']) + self.assertEqual('', r3['revision']) self.assertTrue(files[2].exists()) # Protect the latest datasets From 6e9dc873d30f42b87d265505ab192fec0b6e3651 Mon Sep 17 00:00:00 2001 From: owinter Date: Thu, 5 Dec 2024 16:31:13 +0000 Subject: [PATCH 2/3] list/filter datasets: revision argument needs to be passed down --- one/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/one/api.py b/one/api.py index 52fffd50..d92b7cb1 100644 --- a/one/api.py +++ b/one/api.py @@ -1013,7 +1013,7 @@ def load_object(self, """ query_type = query_type or self.mode datasets = self.list_datasets( - eid, details=True, query_type=query_type, keep_eid_index=True) + eid, details=True, query_type=query_type, keep_eid_index=True, revision=revision) if len(datasets) == 0: raise alferr.ALFObjectNotFound(obj) From 83767c57617e0af4298c642299bec25e0ba491a8 Mon Sep 17 00:00:00 2001 From: owinter Date: Thu, 5 Dec 2024 16:34:53 +0000 Subject: [PATCH 3/3] bump version number 2.11.2 --- CHANGELOG.md | 9 ++++++++- one/__init__.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91c2c6da..d399a662 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog -## [Latest](https://github.com/int-brain-lab/ONE/commits/main) [2.11.1] +## [Latest](https://github.com/int-brain-lab/ONE/commits/main) [2.11.2] + +### Modified + +- HOTFIX: non-default specified revisions are not ignored anymore (passed down revision argument) +- Registration tests against Alyx > 3.2 expect empty strings as Null collections + +## [2.11.1] ### Modified diff --git a/one/__init__.py b/one/__init__.py index 59a7140d..b617816b 100644 --- a/one/__init__.py +++ b/one/__init__.py @@ -1,2 +1,2 @@ """The Open Neurophysiology Environment (ONE) API.""" -__version__ = '2.11.1' +__version__ = '2.11.2'