Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions activestorage/active.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
14 changes: 14 additions & 0 deletions tests/test_real_https.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion tests/test_real_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def test_s3_small_file():
assert result == 222.09129333496094


@pytest.mark.xfail(reason="Pyfive needs PR #197")
def test_s3_small_dataset():
"""Run an S3 test on a small file."""
storage_options = {
Expand Down
Loading