From 93cab668201710367b6727f7a8c266a09e98496c Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Fri, 20 Feb 2026 13:25:54 +0000 Subject: [PATCH 1/4] correct handling of pyfive.Dataset for https too --- activestorage/active.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activestorage/active.py b/activestorage/active.py index dfab6f81..438c52c0 100644 --- a/activestorage/active.py +++ b/activestorage/active.py @@ -250,7 +250,7 @@ def __init__(self, elif input_variable and self.interface_type == "s3": self.filename = self.ds.id._filename elif input_variable and self.interface_type == "https": - self.filename = self.ds + self.filename = self.ds.id._filename # get storage_options self.storage_options = storage_options @@ -726,7 +726,7 @@ def _process_chunk(self, elif self.interface_type == "https" and self._version == 2: tmp, count = reductionist.reduce_chunk(session, self.active_storage_url, - f"{self.uri}", + self.filename, offset, size, compressor, From 090f9299fc4214445117422961ee2bc8971964df Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Fri, 20 Feb 2026 13:26:13 +0000 Subject: [PATCH 2/4] pop test --- tests/test_real_https.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_real_https.py b/tests/test_real_https.py index b8baa814..e3cef862 100644 --- a/tests/test_real_https.py +++ b/tests/test_real_https.py @@ -92,6 +92,20 @@ def test_https(): assert result.shape == (1, 1, 144, 192) assert result[0, 0, 0, 0] == f_1 assert result[0, 0, 143, 191] == f_2 + + # run with pyfive.Dataset instead of File + dataset = load_from_https(test_file_uri) + av = dataset['ta'] + active = Active(av, + active_storage_url=active_storage_url) + active._version = 2 + print("Interface type", active.interface_type) + result = active.min(axis=(0, 1))[:] + print("Result is", result) + print("Result shape is", result.shape) + assert result.shape == (1, 1, 144, 192) + assert result[0, 0, 0, 0] == f_1 + assert result[0, 0, 143, 191] == f_2 @pytest.mark.skip( From b64aa363882aadf7a1b84c23408d0f88f93eb069 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Fri, 20 Feb 2026 13:39:50 +0000 Subject: [PATCH 3/4] add TODO item --- tests/test_real_s3.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_real_s3.py b/tests/test_real_s3.py index decc2ffd..37d26589 100644 --- a/tests/test_real_s3.py +++ b/tests/test_real_s3.py @@ -61,6 +61,7 @@ def test_s3_small_file(): assert result == 222.09129333496094 +# TODO un-xfail immediately after Pyfive released with PR #197 @pytest.mark.xfail(reason="Pyfive needs PR #197") def test_s3_small_dataset(): """Run an S3 test on a small file.""" From 459e96fca6271fbf5f22acfa8902f7c4d2aa9d6c Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Fri, 20 Feb 2026 16:43:48 +0000 Subject: [PATCH 4/4] remove todo since pyfive/197 merged --- tests/test_real_s3.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test_real_s3.py b/tests/test_real_s3.py index 37d26589..1af391d9 100644 --- a/tests/test_real_s3.py +++ b/tests/test_real_s3.py @@ -61,8 +61,6 @@ def test_s3_small_file(): assert result == 222.09129333496094 -# TODO un-xfail immediately after Pyfive released with PR #197 -@pytest.mark.xfail(reason="Pyfive needs PR #197") def test_s3_small_dataset(): """Run an S3 test on a small file.""" storage_options = {