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

add progress bars #4072

Merged
merged 10 commits into from
Mar 29, 2023
Merged

add progress bars #4072

merged 10 commits into from
Mar 29, 2023

Conversation

SophiaRuan
Copy link
Contributor

@SophiaRuan SophiaRuan commented Mar 14, 2023

Fixes #4070

Changes made in this Pull Request:

  • add progress bars to _conclude()

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

@SophiaRuan
Copy link
Contributor Author

Hi @orbeckst @hmacdope, I tried to add progress bars to _conclude_simple and _conclude_fft. I installed the module progressbar locally and the code pass the msd_test locally. How can I install the progressbar for remote repo here or is there any other solution?

@hmacdope
Copy link
Member

@SophiaRuan normally we use the tqdm package for progress bars rather than "progress bars" You will need to test on your local machines

@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (1207578) 93.58% compared to head (6421c00) 93.58%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4072   +/-   ##
========================================
  Coverage    93.58%   93.58%           
========================================
  Files          192      192           
  Lines        25132    25133    +1     
  Branches      4056     4056           
========================================
+ Hits         23519    23520    +1     
  Misses        1093     1093           
  Partials       520      520           
Impacted Files Coverage Δ
package/MDAnalysis/analysis/msd.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@orbeckst
Copy link
Member

@hmacdope sorry to butt in... we do indeed have our own ProgressBar! The question is if the customizations in ProgressBar makes sense, it's a thin wrapper around tqdm.

@SophiaRuan
Copy link
Contributor Author

Hi @hmacdope @orbeckst, I am wondering how to pass the dark_lint test. I am not sure if the current code aligns with the requirement.

@RMeli
Copy link
Member

RMeli commented Mar 15, 2023

@SophiaRuan the dark_lint test is optional, see #4067. Here it seems that it is only asking to add a blank line after the from tqdm import tqdm.

@hmacdope
Copy link
Member

@RMeli is correct. @SophiaRuan would you be able to share a screenshot showing that the progress bars work? Otherwise looks good to me!

package/MDAnalysis/analysis/msd.py Outdated Show resolved Hide resolved
@SophiaRuan
Copy link
Contributor Author

@RMeli is correct. @SophiaRuan would you be able to share a screenshot showing that the progress bars work? Otherwise looks good to me!

Hi @hmacdope, I am wondering how to check if progress bars work. I only used the pytest on my local machine to check if the code pass the test, but I can't see the progress bars.

@hmacdope
Copy link
Member

@RMeli is correct. @SophiaRuan would you be able to share a screenshot showing that the progress bars work? Otherwise looks good to me!

Hi @hmacdope, I am wondering how to check if progress bars work. I only used the pytest on my local machine to check if the code pass the test, but I can't see the progress bars.

You should set up an example piece of code (copying one of the tests is fine) and then run it to see if progress bars appear.

@hmacdope
Copy link
Member

You may need to use the verbose=True flag to run I can't remember.

@SophiaRuan
Copy link
Contributor Author

Hi @hmacdope, I tried to run the test_msd.py in Pycharm. Does this look good to you?
Screen Shot 2023-03-16 at 12 03 19

Copy link
Member

@hmacdope hmacdope left a comment

Choose a reason for hiding this comment

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

Could you add a CHANGELOG entry?

SophiaRuan added a commit to SophiaRuan/mdanalysis that referenced this pull request Mar 20, 2023
03/20/23 SophiaRuan

* 2.5.0

Changes
  * Add progress bar to track the progress of  _conclude() functions  (_conclude_simple() and _conclude_fft()) in msd.py (PR MDAnalysis#4072)
@SophiaRuan
Copy link
Contributor Author

#4070
Hi @hmacdope, I just changed the CHANGELOG. Could you have a look? Thank you!
[(https://github.com/MDAnalysis/mdanalysis/compare/develop...SophiaRuan:mdanalysis:patch-1)]

@hmacdope
Copy link
Member

@SophiaRuan you need to add them in this same PR

@@ -13,7 +13,15 @@ The rules for this file:
* release numbers follow "Semantic Versioning" http://semver.org

------------------------------------------------------------------------------


03/20/23 SophiaRuan
Copy link
Member

Choose a reason for hiding this comment

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

This needs to go with the other 2.5.0 entries, just add it to the list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @hmacdope, I just added the change to the 2.5.0 entries.

Copy link
Member

@hmacdope hmacdope left a comment

Choose a reason for hiding this comment

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

Would you also be able to addd your name to AUTHORS if you havn't already. other than that looks good!

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

Just a couple of small review comments on changelog formatting from me please.

Comment on lines 53 to 54
* Add progress bars to track the progress of _conclude() functions
(_conclude_simple() and _conclude_fft()) in msd.py (Issue #4070, PR #4072)
Copy link
Member

Choose a reason for hiding this comment

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

Entries should be newest first (please see line 7 in the instructions at the top of the file). This helps us easily scan the ordered history of changes in the repository.

@@ -50,6 +50,9 @@ Changes
analysis.nucleicacids' NucPairDist and WatsonCrickDist classes has been
removed. Please use the `results.pair_distances` and `times` attributes
instead (Issue #3744)
* Add progress bars to track the progress of _conclude() functions
(_conclude_simple() and _conclude_fft()) in msd.py (Issue #4070, PR #4072)

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

Sorry this might look overly pedantic but we try to keep the empty line formatting fixed in this file.

??/??/?? IAlibay, pgbarletta, mglagolev, hmacdope, manuel.nuno.melo, chrispfae,
ooprathamm, MeetB7, BFedder, v-parmar, MoSchaeffler, jbarnoud, jandom,
xhgchen, jaclark5, DrDomenicoMarson
xhgchen, jaclark5, DrDomenicoMarson, SophiaRuan

Copy link
Member

Choose a reason for hiding this comment

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

I know this is annoying @SophiaRuan but this should show no diff except your name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @hmacdope, I just made some changes. Could you help me check a bit? Thank you for your help!

@SophiaRuan
Copy link
Contributor Author

Hi @hmacdope, I made some changes to the Author and CHANGELOG recently. Could you help me check on this?
Also, I find there are some conflicts in Author and CHANGELOG constantly. Should I solve the conflicts remotely or on my local machine? Previously, I find I need to solve conflicts both remotely and locally in order to push my next change. Sorry for asking so many questions. Thank you for your help!

Copy link
Member

@hmacdope hmacdope left a comment

Choose a reason for hiding this comment

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

Apply this suggestion and should be good to go.

package/CHANGELOG Outdated Show resolved Hide resolved
Co-authored-by: Hugo MacDermott-Opeskin <hugomacdermott@gmail.com>
@github-actions
Copy link

github-actions bot commented Mar 27, 2023

Linter Bot Results:

Hi @SophiaRuan! Thanks for making this PR. We linted your code and found the following:

Some issues were found with the formatting of your code.

Code Location Outcome
main package ⚠️ Possible failure
testsuite ⚠️ Possible failure

Please have a look at the darker-main-code and darker-test-code steps here for more details: https://github.com/MDAnalysis/mdanalysis/actions/runs/4549141753/jobs/8020908277


Please note: The black linter is purely informational, you can safely ignore these outcomes if there are no flake8 failures!

@SophiaRuan
Copy link
Contributor Author

Apply this suggestion and should be good to go.

Hi @hmacdope, I have made the change! Thank you!

Copy link
Member

@hmacdope hmacdope left a 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 !

@hmacdope
Copy link
Member

@SophiaRuan resolve conflicts and then good to go.

@SophiaRuan
Copy link
Contributor Author

@SophiaRuan resolve conflicts and then good to go.

Hi @hmacdope @IAlibay, I have solved the conflicts. Thank you for your help!

@hmacdope hmacdope requested a review from IAlibay March 28, 2023 22:40
@hmacdope hmacdope merged commit 75f0fb9 into MDAnalysis:develop Mar 29, 2023
@SophiaRuan SophiaRuan deleted the msd_pbar branch March 29, 2023 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENH]: Add a progress bar to postprocessing in _conclude() functions in MSD.py
5 participants