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

Progressbar #10755

Merged
merged 7 commits into from Aug 26, 2017

Conversation

Projects
None yet
4 participants
@mariusvniekerk
Contributor

mariusvniekerk commented Aug 26, 2017

This can be used from the notebook to do some simple progress information.

cc @rgbkrk

mariusvniekerk added some commits Aug 26, 2017

Minimal progressbar primitive
This can be used from  the notebook to do some simple progress information.
Show outdated Hide outdated IPython/core/display.py Outdated
@rgbkrk

This comment has been minimized.

Show comment
Hide comment
@rgbkrk

rgbkrk Aug 26, 2017

Member

An example notebook would be great to have as well.

Member

rgbkrk commented Aug 26, 2017

An example notebook would be great to have as well.

@rgbkrk

rgbkrk approved these changes Aug 26, 2017

@rgbkrk

This comment has been minimized.

Show comment
Hide comment
@rgbkrk

rgbkrk Aug 26, 2017

Member

Can you add this to the whatsnew collection in here: https://github.com/ipython/ipython/tree/master/docs/source/whatsnew/pr

Member

rgbkrk commented Aug 26, 2017

Can you add this to the whatsnew collection in here: https://github.com/ipython/ipython/tree/master/docs/source/whatsnew/pr

@rgbkrk rgbkrk merged commit 0a36ff7 into ipython:master Aug 26, 2017

4 checks passed

codecov/patch 96.66% of diff hit (target 0%)
Details
codecov/project 67.08% (+0.02%) compared to ea43274
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rgbkrk rgbkrk added this to the 5.5 milestone Aug 26, 2017

@rgbkrk

This comment has been minimized.

Show comment
Hide comment
@rgbkrk

rgbkrk Aug 26, 2017

Member

@meeseeksdev backport

Member

rgbkrk commented Aug 26, 2017

@meeseeksdev backport

@meeseeksdev

This comment has been minimized.

Show comment
Hide comment
@meeseeksdev

meeseeksdev bot Aug 26, 2017

Contributor

There seem to be a conflict, please backport manually

Contributor

meeseeksdev bot commented Aug 26, 2017

There seem to be a conflict, please backport manually

@rgbkrk

This comment has been minimized.

Show comment
Hide comment
@rgbkrk

rgbkrk Aug 26, 2017

Member

No.

Member

rgbkrk commented Aug 26, 2017

No.

@rgbkrk

This comment has been minimized.

Show comment
Hide comment
@rgbkrk

rgbkrk Aug 26, 2017

Member

@meeseeksdev backport

Member

rgbkrk commented Aug 26, 2017

@meeseeksdev backport

@meeseeksdev

This comment has been minimized.

Show comment
Hide comment
@meeseeksdev

meeseeksdev bot Aug 26, 2017

Contributor

There seem to be a conflict, please backport manually

Contributor

meeseeksdev bot commented Aug 26, 2017

There seem to be a conflict, please backport manually

@rgbkrk

This comment has been minimized.

Show comment
Hide comment
@rgbkrk

rgbkrk Aug 26, 2017

Member

😉

/cc @Carreau

Member

rgbkrk commented Aug 26, 2017

😉

/cc @Carreau

@rgbkrk

This comment has been minimized.

Show comment
Hide comment
@rgbkrk

rgbkrk Aug 26, 2017

Member

@meeseeksdev coffee please

Member

rgbkrk commented Aug 26, 2017

@meeseeksdev coffee please

@rgbkrk

This comment has been minimized.

Show comment
Hide comment
@rgbkrk
Member

rgbkrk commented Aug 26, 2017

@Carreau Carreau self-assigned this Sep 12, 2017

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Sep 13, 2017

Member

hum.. we should likely try to make it work better in the terminal as it does not erase the previous version of the progressbar, leading to a progress Triangle:

In [6]: pb = ProgressBar(100)
   ...: for i in range(25):
   ...:     pb.progress = i*4
   ...:
   ...:
[                                                            ] 0/100
[==                                                          ] 4/100
[====                                                        ] 8/100
[=======                                                     ] 12/100
[=========                                                   ] 16/100
[============                                                ] 20/100
[==============                                              ] 24/100
[================                                            ] 28/100
[===================                                         ] 32/100
[=====================                                       ] 36/100
[========================                                    ] 40/100
[==========================                                  ] 44/100
[============================                                ] 48/100
[===============================                             ] 52/100
[=================================                           ] 56/100
[====================================                        ] 60/100
[======================================                      ] 64/100
[========================================                    ] 68/100
[===========================================                 ] 72/100
[=============================================               ] 76/100
[================================================            ] 80/100
[==================================================          ] 84/100
[====================================================        ] 88/100
[=======================================================     ] 92/100
[=========================================================   ] 96/100
Member

Carreau commented Sep 13, 2017

hum.. we should likely try to make it work better in the terminal as it does not erase the previous version of the progressbar, leading to a progress Triangle:

In [6]: pb = ProgressBar(100)
   ...: for i in range(25):
   ...:     pb.progress = i*4
   ...:
   ...:
[                                                            ] 0/100
[==                                                          ] 4/100
[====                                                        ] 8/100
[=======                                                     ] 12/100
[=========                                                   ] 16/100
[============                                                ] 20/100
[==============                                              ] 24/100
[================                                            ] 28/100
[===================                                         ] 32/100
[=====================                                       ] 36/100
[========================                                    ] 40/100
[==========================                                  ] 44/100
[============================                                ] 48/100
[===============================                             ] 52/100
[=================================                           ] 56/100
[====================================                        ] 60/100
[======================================                      ] 64/100
[========================================                    ] 68/100
[===========================================                 ] 72/100
[=============================================               ] 76/100
[================================================            ] 80/100
[==================================================          ] 84/100
[====================================================        ] 88/100
[=======================================================     ] 92/100
[=========================================================   ] 96/100

Carreau added a commit to Carreau/ipython that referenced this pull request Sep 13, 2017

@rgbkrk

This comment has been minimized.

Show comment
Hide comment
@rgbkrk

rgbkrk Sep 13, 2017

Member

Oh hey, we better stick some \r in there.

Member

rgbkrk commented Sep 13, 2017

Oh hey, we better stick some \r in there.

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Sep 13, 2017

Member
Member

Carreau commented Sep 13, 2017

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Sep 13, 2017

Member
Member

Carreau commented Sep 13, 2017

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Sep 13, 2017

Member

And if something else is displayed interleaved, printing with end='' will mean it's further messed up, unfortunately.

I think it might work to print with end='\r' - it shouldn't clear the line until more stuff is printed to overwrite it. Not 100% sure of that, though

Member

takluyver commented Sep 13, 2017

And if something else is displayed interleaved, printing with end='' will mean it's further messed up, unfortunately.

I think it might work to print with end='\r' - it shouldn't clear the line until more stuff is printed to overwrite it. Not 100% sure of that, though

Carreau added a commit that referenced this pull request Sep 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment