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

Add option to write elapsed time at the end of the line #99

Merged
merged 13 commits into from
Jan 22, 2021

Conversation

harenbrs
Copy link
Contributor

@harenbrs harenbrs commented Dec 15, 2020

>>> with yaspin(text="spinning", timer=True) as sp:
>>>     sleep(2)
⠼ spinning (0:00:01)
>>> with yaspin(text="spinning", timer=True) as sp:
>>>     sleep(2)
>>>     sp.ok("✔")
✔ spinning (0:00:02)

@codecov-io
Copy link

codecov-io commented Dec 15, 2020

Codecov Report

Merging #99 (ea7d6be) into master (19f2d96) will increase coverage by 0.24%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
+ Coverage   95.11%   95.35%   +0.24%     
==========================================
  Files           6        6              
  Lines         307      323      +16     
==========================================
+ Hits          292      308      +16     
  Misses         15       15              
Impacted Files Coverage Δ
yaspin/api.py 100.00% <ø> (ø)
yaspin/core.py 94.68% <100.00%> (+0.31%) ⬆️

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 2d6354b...ea7d6be. Read the comment docs.

@pavdmyt
Copy link
Owner

pavdmyt commented Dec 16, 2020

Hi @harenbrs

Thanks for your PR!
Could you please also add tests to avoid drop in codecov? Check test_properties.py to get an idea on writing tests for spinner properties.

@harenbrs
Copy link
Contributor Author

Sure thing, done—let me know if they're not up to snuff.

@harenbrs
Copy link
Contributor Author

harenbrs commented Dec 21, 2020

@pavdmyt I can't reproduce this test failure in a Python 2.7 environment:

================== 1225 passed, 714 skipped in 33.20 seconds ===================

I don't see how my PR could cause the failure, either, when all other versions pass. I'm adding an empty commit to run the check again.

@harenbrs
Copy link
Contributor Author

Hi @pavdmyt, happy new year -- are you happy enough with the tests and CI?

Copy link
Owner

@pavdmyt pavdmyt left a comment

Choose a reason for hiding this comment

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

Generally everything looks good 👍

There are some minor items that should be addressed before merging. Please let me know if some additional help / clarifications needed.

yaspin/core.py Show resolved Hide resolved
yaspin/core.py Outdated Show resolved Hide resolved
yaspin/core.py Outdated Show resolved Hide resolved
yaspin/core.py Outdated Show resolved Hide resolved
@pavdmyt pavdmyt merged commit 2ffa1eb into pavdmyt:master Jan 22, 2021
@pavdmyt
Copy link
Owner

pavdmyt commented Jan 22, 2021

@harenbrs Thanks again for your contribution!

Will be included into next release.

@pavdmyt pavdmyt mentioned this pull request Jan 24, 2021
@pavdmyt
Copy link
Owner

pavdmyt commented Feb 21, 2021

Included in yaspin v1.4.0

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