Skip to content

Add flag to render in binary/decimal suffix in DownloadColumn - #380

Merged
willmcgugan merged 10 commits into
Textualize:masterfrom
amartya-dev:master
Oct 16, 2020
Merged

Add flag to render in binary/decimal suffix in DownloadColumn#380
willmcgugan merged 10 commits into
Textualize:masterfrom
amartya-dev:master

Conversation

@amartya-dev

@amartya-dev amartya-dev commented Oct 13, 2020

Copy link
Copy Markdown
Contributor

Add a test for rendering binary suffix in test_progress.py

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Please describe your changes here. If this fixes a bug, please link to the issue, if possible.
An additional feature in #323

 Add a test for rendering binary suffix in test_progress.py
@codecov

codecov Bot commented Oct 13, 2020

Copy link
Copy Markdown

Codecov Report

Merging #380 into master will decrease coverage by 0.16%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #380      +/-   ##
==========================================
- Coverage   99.59%   99.42%   -0.17%     
==========================================
  Files          52       51       -1     
  Lines        4441     4379      -62     
==========================================
- Hits         4423     4354      -69     
- Misses         18       25       +7     
Flag Coverage Δ
#unittests 99.42% <100.00%> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
rich/progress.py 94.72% <100.00%> (-1.66%) ⬇️
rich/bar.py 100.00% <0.00%> (ø)
rich/color.py 100.00% <0.00%> (ø)
rich/style.py 100.00% <0.00%> (ø)
rich/progress_bar.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e875a4...c65f0ee. Read the comment docs.

@amartya-dev

Copy link
Copy Markdown
Contributor Author

@willmcgugan I have added the discussed feature, let me know in case anything else is required

@willmcgugan willmcgugan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rather than "decimal_suffix", let's call it "binary_units" which should default to False.

Comment thread rich/progress.py Outdated
"""

def __init__(self, decimal_suffix: bool = True) -> None:
self.decimal_ssuffix = decimal_suffix

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note typo in attribute name

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Alright!!

@amartya-dev

Copy link
Copy Markdown
Contributor Author

@willmcgugan Sorry for some unnecessary commits, I think this should be it let me know in case you need something else, should I also resolve conflicts in Changelog?

@willmcgugan
willmcgugan merged commit ef5c7e0 into Textualize:master Oct 16, 2020
@willmcgugan

Copy link
Copy Markdown
Member

LGTM. Thanks.

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