Skip to content
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

Make beautifyFileSize public #971

Merged
merged 1 commit into from
Jul 21, 2023
Merged

Make beautifyFileSize public #971

merged 1 commit into from
Jul 21, 2023

Conversation

juuz0
Copy link
Collaborator

@juuz0 juuz0 commented Jul 19, 2023

Requirement for kiwix/kiwix-desktop#946

@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (cb74c9c) 38.87% compared to head (5c3a997) 38.87%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #971   +/-   ##
=======================================
  Coverage   38.87%   38.87%           
=======================================
  Files          56       56           
  Lines        3974     3974           
  Branches     2187     2187           
=======================================
  Hits         1545     1545           
  Misses       1097     1097           
  Partials     1332     1332           
Impacted Files Coverage Δ
src/tools/stringTools.h 30.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kelson42 kelson42 added this to the 12.1.0 milestone Jul 20, 2023
@kelson42
Copy link
Collaborator

@juuz0 Not sure this function is documented properly (in readtjedocs), please add the necessary documentation.

@mgautierfr
Copy link
Member

Not sure this function is documented properly (in readtjedocs), please add the necessary documentation.

It will be documented this way : https://libkiwix--971.org.readthedocs.build/en/971/api/function_tools_8h_1a18e272a0e35c09646b78f566e92ac292.html

@kelson42
Copy link
Collaborator

kelson42 commented Jul 20, 2023

@mgautierfr actually not bad. LGTM if the number given is not expected to be in a specific unity (bytes for example)... because this is not written in the doc.

@mgautierfr
Copy link
Member

The name of the function is beautifyFileSize so yes, we expect a size and so the unit is B/KB/MB/GB

@kelson42
Copy link
Collaborator

kelson42 commented Jul 21, 2023

@mgautierfr If the result is given with a unity, then the unity of the input expected should be specified in the documentaiton. Here I guess Bytes. Otherwise, all good.

@juuz0 juuz0 force-pushed the beautifyPublic branch 2 times, most recently from b5232d1 to 88ec815 Compare July 21, 2023 13:38
@juuz0
Copy link
Collaborator Author

juuz0 commented Jul 21, 2023

@kelson42 updated the description

include/tools.h Outdated Show resolved Hide resolved
This general function will be useful in other kiwix apps
@mgautierfr mgautierfr merged commit de51733 into main Jul 21, 2023
13 checks passed
@mgautierfr mgautierfr deleted the beautifyPublic branch July 21, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants