-
Notifications
You must be signed in to change notification settings - Fork 13
Add progress bar to phonon calculations #319
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 progress bar to phonon calculations #319
Conversation
|
Thanks for this!
I agree it's a bit confusing, so I'd say yes we probably do want some kind of output labelling the progress bar.
Thanks for the report! If you still encounter this after updating with the latest fixes, please open a new issue. |
-- tqdm docs |
|
I am looking into |
|
I have pushed the Additionally, as can be seen in the pictures I posted earlier, my terminal was interpreting the colour of the finished progress bar as grey (even though it should be a dark green), the same as the empty progress bar. Since I might not be the only one to run into this, we decided to change the colours of this progress bar to the janus (logo) colours of light ( I have also run ruff, so that should hopefully be ok, and I have also added rich as a dependency. Please let me know if you have any comments/suggestions/etc.! |
ElliottKasoar
left a comment
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.
This looks great, thanks!
I've added one suggestion that I think should fix the docs.
I think in terms of imports, I'd maybe move them to the top still, to be consistent with our current approach elsewhere.
We definitely want to address imports for the CLI (#272), since it's a much more noticeable issue for autocompletion, but otherwise it's not clear that it's a problem (I mentioned it just as something to keep in mind), and I think maintaining consistency will make it easier if we do decide to change our approach later.
|
Sure! I can definitely move the imports among the other imports; should I leave it in the |
Thanks! |
|
Should be fixed now |
ElliottKasoar
left a comment
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.
Looks good to me, thanks for this!
Closes #268
Adds a progress bar to phonon calculations using
tqdm, which is already a dependency. A new argument was added toPhonons.__init__to control the presence of this feature, disabled by default to minimise impact on code in general. However, the progress bar is always enabled for CLI.One issue that I and @ajjackson have noted is that the bar only shows the progress over displacements, meaning that when bands, DOS, or PDOS are chosen to be calculated, the 100% bar just continues sitting there despite the prolonged calculations. This could be confusing to users. One solution could be writing to stdout before/after the progress bar appears, saying what the bar is for, but we weren't sure what the best path forward is. What do you think?
Additionally, I should probably mention that I ran into #316 while working on this despite only running janus only in serial.