Skip to content

Conversation

@lguerard
Copy link
Contributor

@lguerard lguerard commented May 6, 2025

Fixes #95

@codecov
Copy link

codecov bot commented May 6, 2025

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 25%. Comparing base (1a0f954) to head (2f7d719).
⚠️ Report is 12 commits behind head on devel.

Files with missing lines Patch % Lines
src/imcflibs/imagej/misc.py 88% 1 Missing ⚠️
Additional details and impacted files
@@         Coverage Diff          @@
##           devel   #101   +/-   ##
====================================
  Coverage     25%    25%           
====================================
  Files         25     25           
  Lines       1766   1776   +10     
====================================
+ Hits         435    441    +6     
- Misses      1331   1335    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ehrenfeu ehrenfeu added this to the 2.0.0 milestone Jan 14, 2026
@ehrenfeu ehrenfeu added enhancement New feature or request new-minor Change introduced in PR will require a new minor release. labels Jan 14, 2026
@ehrenfeu ehrenfeu linked an issue Jan 14, 2026 that may be closed by this pull request
@ehrenfeu ehrenfeu moved this to In review in imcflibs Jan 14, 2026
@ehrenfeu ehrenfeu self-requested a review January 14, 2026 12:51
Copy link
Member

@ehrenfeu ehrenfeu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ehrenfeu ehrenfeu moved this from In review to In progress in imcflibs Jan 14, 2026
@ehrenfeu ehrenfeu removed this from the 2.0.0 milestone Jan 14, 2026
@ehrenfeu
Copy link
Member

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.

@ehrenfeu ehrenfeu added the changelog Needs to be mentioned in release changelogs label Jan 14, 2026
@ehrenfeu
Copy link
Member

#126

@ehrenfeu ehrenfeu force-pushed the add_byte_conversion branch from 10cfce6 to 6efda65 Compare January 21, 2026 11:20
@ehrenfeu ehrenfeu force-pushed the add_byte_conversion branch from 6efda65 to 073a1f7 Compare January 21, 2026 11:23
@ehrenfeu
Copy link
Member

ehrenfeu commented Jan 21, 2026

I rebased this PR onto current devel in order to reduce the complexity of merging it (misc.py had many other changes already in devel, resulting in a lot of potential conflicts).

🚨 @lguerard please make sure to git pull delete your local branch and create a new one from the PR before continuing your work on this!! 🚨

Let me know if you need help with this!

@ehrenfeu ehrenfeu added this to the 2.0.0 milestone Jan 21, 2026
- 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.
@lguerard lguerard requested a review from ehrenfeu January 21, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Needs to be mentioned in release changelogs enhancement New feature or request new-minor Change introduced in PR will require a new minor release.

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

Add method to convert bytes

2 participants