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

ui: better progress bars #2148

Closed
Suor opened this issue Jun 18, 2019 · 2 comments · Fixed by #2333
Closed

ui: better progress bars #2148

Suor opened this issue Jun 18, 2019 · 2 comments · Fixed by #2333
Assignees
Labels
p1-important Important, aka current backlog of things to do refactoring Factoring and re-factoring ui user interface / interaction

Comments

@Suor
Copy link
Contributor

Suor commented Jun 18, 2019

Currently we have progress bars for each individual file, which is not helpful when we have many of them. Furthermore when using several threads - a common case - they just fill up a screen, with no indication of where we are.

So I propose switch to using one progress bar for a single mass operation. There was a question from @efiop: how do we show all the filenames that are being processed? I would say we can only show single file taking longest so far like:

[========                             ] 17% big-dataset.csv + 7 other files

Or we can list them in a second line after the progress bar, but I don't think it matters too much.

Another thing that we should probably approach simultaneously is how we code that. Now we pass flags like no_progress_bar, sometimes deep enough to make code ugly. I suggest using global progress bar variable, like logger instances so we won't need pass anything. To guarantee that scope won't leek we can use context managers:

with progress(name=..., total=...):
    # ...
    progress.update(value)  # This may come in some nested func
    # ...

Or wrap iterables:

for item in progress(seq, name=..., total=...):
    # process item

To hide progress bars in all called code, without any flags passing:

with progress.hide():
    # ...
@efiop efiop added p3-nice-to-have It should be done this or next sprint ui user interface / interaction refactoring Factoring and re-factoring labels Jun 18, 2019
@shcheklein
Copy link
Member

Can we somehow show a progress for the whole operation (vs per file)? For example count the total files size and show progress by bytes transferred, also would be great to see total speed per second and other stats.

+1 on refactoring the code.

@shcheklein shcheklein added p1-important Important, aka current backlog of things to do and removed p3-nice-to-have It should be done this or next sprint labels Jul 20, 2019
@ghost
Copy link

ghost commented Jul 27, 2019

Hello, @casperdcl ! Not directly related to progress bar but I would like to hear your input on this one #2329 (also related to UI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1-important Important, aka current backlog of things to do refactoring Factoring and re-factoring ui user interface / interaction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants