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

Move progress() here #4

Closed
wants to merge 6 commits into from
Closed

Conversation

pfitzseb
Copy link
Member

and document it. Also add a new method that will show the remaining time as requested in #3.

Defining view in Juno might not be strictly necessary, but I think it fixed some bug... can't quite remember ;)

Copy link
Member

@ChrisRackauckas ChrisRackauckas left a comment

Choose a reason for hiding this comment

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

I like this addition. It could be useful to give extra information from a program in this tooltip instead of printing it all out to the console. I will need to see what kind of window it uses / play with it to really know.

x > 1 ? 1 :
x))

progress(x::Real, message::String) =
Atom.msg("progress", (x < 0.01 ? "indeterminate" :
Copy link
Member

Choose a reason for hiding this comment

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

Will this write "indeterminate" instead of the message whenever x<0.01? I think it would be good to still show the message. I think this message would be a good place to show verbose information, like I would like to say "Initial dt: ####" at the start, and other information.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, the message will be displayed no matter what.
Indeterminate just means the progress bar will display the moving gray stripes you already see e.g. on julia startup instead of the blue colored progress bar. The x < 0.1 is more or less a hack to show that something is going on even though you wouldn't be able to see the progress because the progress bar is to small.

Copy link
Member

Choose a reason for hiding this comment

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

Okay. Thanks for clearing that up.

@pfitzseb
Copy link
Member Author

pfitzseb commented Sep 16, 2016

Also, currently the tooltip looks like this:
progress
Aligning the contents to the left would probably make sense, just like allowing arbitrary objects inside instead of only text.

@ChrisRackauckas
Copy link
Member

Does it accept Markdown?

@pfitzseb
Copy link
Member Author

No, but it could ;) I think it should be easy to enable rendering of everything you can render in inline results...

@ChrisRackauckas
Copy link
Member

Maybe Markdown might be too much (since it might add too much overhead?). I've found that I only hit the progressbar every few iterations or so since doing it every iteration causes a noticeable performance hit. Increasing that performance hit too much for minor gains I think would be the wrong direction.

The only other thing I would suggest is for more progressbars that are available as popout windows (in MATLAB this is done with https://www.mathworks.com/matlabcentral/fileexchange/6922-progressbar). That sounds like another PR though, but it would allow layered progresses which can be crucial for multi-scale or Monte Carlo simulations.

Great work on this. It looks nice and it's definitely a large usability enhancement. I'll give this a whirl when it's merged in. FYI I'll be timing my next release with whenever you plan on registering the next Juno version (and register Juno.jl) since I'll be adding Juno as a dependency and change the progressbar to this new version.

@pfitzseb
Copy link
Member Author

pfitzseb commented Sep 16, 2016

Okay, so rendering stuff (Markdown or whatever you want) is possible:
progress
Not sure if it's absolutely necessary though.

Multiple progress bars where originally supposed to be in that tooltip -- maybe I can come up with a somewhat nice(ish) API and implementation for that, but haven't had much success so far :D

@pfitzseb pfitzseb mentioned this pull request Oct 22, 2016
@pfitzseb pfitzseb closed this Oct 22, 2016
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.

2 participants