-
Notifications
You must be signed in to change notification settings - Fork 23
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
Conversation
There was a problem hiding this 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" : |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Does it accept Markdown? |
No, but it could ;) I think it should be easy to enable rendering of everything you can render in inline results... |
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. |
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 ;)