You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pydistcheck should support overriding that heuristic and saying "print all sizes in exactly this unit".
How would implementing this improve pydistcheck?
Some rounding is done and therefore precision lost when pydistcheck automatically converts a size in bytes to a human-readable string. If it were possible to force pydistcheck to use exactly bytes for every size, no rounding would happen and you could get exact sizes.
Forcing the same units is also helpful for doing quick at-a-glance comparisons (e.g. it's easy to tell that 800M is 8x larger than 100M... not so with 0.8G).
Might also be useful to simplify things for programmatic consumers of this data... e.g. code processing a bunch of pydistcheck summaries created from a collection of many packages (related: #116).
What change would you like to see?
There are several places in log messages and
--inspect
output wherepydistcheck
refers to file sizes.For example, in
--inspect
:It uses a heuristic to decide which unit to display (e.g., where 50 million bytes should be
0.05G
or50M
or50000K
or50000000B
).pydistcheck/src/pydistcheck/utils.py
Lines 27 to 35 in 471660e
pydistcheck
should support overriding that heuristic and saying "print all sizes in exactly this unit".How would implementing this improve
pydistcheck
?Some rounding is done and therefore precision lost when
pydistcheck
automatically converts a size in bytes to a human-readable string. If it were possible to forcepydistcheck
to use exactly bytes for every size, no rounding would happen and you could get exact sizes.Forcing the same units is also helpful for doing quick at-a-glance comparisons (e.g. it's easy to tell that
800M
is 8x larger than100M
... not so with0.8G
).Might also be useful to simplify things for programmatic consumers of this data... e.g. code processing a bunch of
pydistcheck
summaries created from a collection of many packages (related: #116).Notes
For inspiration, see how
du
handles this (docs)This should affect all the following:
--inspect
output--inspect
results in a machine-readable format #116 is implemented)The text was updated successfully, but these errors were encountered: