Add function to convert size from bytes to a more readable format#101
Add function to convert size from bytes to a more readable format#101ehrenfeu merged 4 commits intoimcf:develfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #101 +/- ##
====================================
Coverage 25% 25%
====================================
Files 25 25
Lines 1756 1761 +5
====================================
+ Hits 439 443 +4
- Misses 1317 1318 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ehrenfeu
left a comment
There was a problem hiding this comment.
The function name convert_bytes isn't really telling what it's actually doing, it only reveals the bytes are converted to something unknown.
Please rename it to human_bytes or similar.
|
Removed it from the current milestone as this is probably not blocking other code - feel free to re-add if you need it already now. |
6efda65 to
073a1f7
Compare
|
I rebased this PR onto current 🚨 @lguerard please make sure to Let me know if you need help with this! |
- Implemented `bytes_to_human_readable` function to convert byte sizes into a more readable format. - Added unit tests for the new function to ensure accuracy across various sizes.
* Ensure common sizes are formatted into human-readable strings. * Verify formatting for large sizes such as terabytes.
2f7d719 to
6e7b2fe
Compare
|
Rebased this onto current |
| def save_image_in_format( | ||
| imp, format, out_dir, series, pad_number, split_channels, suffix="" | ||
| ): | ||
| """Save an ImagePlus object in the specified format. |
There was a problem hiding this comment.
Please be more careful when crafting / assembling commits, those changes (originating from code linting and formatting tools) are completely unrelated to the PR and destroy the logical context of the code history when being committed with the message of the actual change.
Fixes #95