-
-
Notifications
You must be signed in to change notification settings - Fork 346
Add human readable size for No. bytes stored to info_complete
#3190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
69e423e
1e77827
8fdc8f6
e68cfc9
8be47e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add human readable size for No. bytes stored to `info_complete` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,7 +133,7 @@ def __repr__(self) -> str: | |
|
||
if self._count_bytes_stored is not None: | ||
template += "\nNo. bytes stored : {_count_bytes_stored}" | ||
kwargs["_count_stored"] = byte_info(self._count_bytes_stored) | ||
kwargs["_count_bytes_stored"] = byte_info(self._count_bytes_stored) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we got bitten by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for posterity, if we really want to use |
||
|
||
if ( | ||
self._count_bytes is not None | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,7 +79,7 @@ def test_array_info(zarr_format: ZarrFormat) -> None: | |
|
||
|
||
@pytest.mark.parametrize("zarr_format", ZARR_FORMATS) | ||
@pytest.mark.parametrize("bytes_things", [(1_000_000, "976.6K", 500_000, "500000", "2.0", 5)]) | ||
@pytest.mark.parametrize("bytes_things", [(1_000_000, "976.6K", 500_000, "488.3K", "2.0", 5)]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i love "bytes_things" |
||
def test_array_info_complete( | ||
zarr_format: ZarrFormat, bytes_things: tuple[int, str, int, str, str, int] | ||
) -> None: | ||
|
@@ -120,7 +120,7 @@ def test_array_info_complete( | |
Serializer : BytesCodec(endian=<Endian.little: 'little'>) | ||
Compressors : () | ||
No. bytes : {count_bytes} ({count_bytes_formatted}) | ||
No. bytes stored : {count_bytes_stored_formatted} | ||
No. bytes stored : {count_bytes_stored} ({count_bytes_stored_formatted}) | ||
Storage ratio : {storage_ratio_formatted} | ||
Chunks Initialized : 5""") | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the only real change to docs. Seems like if you are explaining about compression it's useful to show this extra information.