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

Fix: Pca.py doctest error #4377

Merged
merged 7 commits into from
Apr 1, 2024

Conversation

HeetVekariya
Copy link
Contributor

@HeetVekariya HeetVekariya commented Dec 22, 2023

Partially address #3925

Changes made in this Pull Request:

  • Doctest for pca.py (package/MDAnalysis/analysis/pca.py) file contains two error (at two places: 1 and 2 ) due to wrong output in Expected:
    • 0.38147609331128324
    • 0.17478244043688052
  • Corrected expected output according to the generated output as below:
    • 0.3814760933112831
    • 0.17478244043688054

PR Checklist

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

Developers certificate of origin


📚 Documentation preview 📚: https://mdanalysis--4377.org.readthedocs.build/en/4377/

@HeetVekariya
Copy link
Contributor Author

I will update the change log when reviewed by maintainers.

Copy link

github-actions bot commented Dec 22, 2023

Linter Bot Results:

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

There are currently no issues detected! 🎉

Copy link

codecov bot commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.64%. Comparing base (93630da) to head (ea69941).

❗ Current head ea69941 differs from pull request most recent head de83fd1. Consider uploading reports for the commit de83fd1 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4377      +/-   ##
===========================================
- Coverage    93.66%   93.64%   -0.03%     
===========================================
  Files          168      180      +12     
  Lines        21248    22327    +1079     
  Branches      3917     3917              
===========================================
+ Hits         19902    20908    +1006     
- Misses         888      961      +73     
  Partials       458      458              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HeetVekariya HeetVekariya changed the title fix: rmsip error Fix: Pca.py doctest error Dec 22, 2023
@orbeckst
Copy link
Member

@lilyminium could please handle this PR? I think rmsip was your code, wasn't it?

Copy link
Member

@lilyminium lilyminium left a comment

Choose a reason for hiding this comment

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

Thanks for opening this PR, @HeetVekariya -- however, I'm not sure that changing the output is the best solution to the failing doctest. The differences are somewhere around the ~15th decimal place, which seems to me to simply arise from precision error. IMO a more permanent solution to this issue might be to change it into a format that only prints out maybe the first 6 decimal places, using something like string formatting (with print) or rounding -- what do you think?

@HeetVekariya
Copy link
Contributor Author

@lilyminium

  • At the start i am thinking about the rounding, but thought that it is meant to have upto 17 decimals.
  • But if you allow i can do round off upto 6 decimals.

@lilyminium
Copy link
Member

Yes sure please do, rounding seems like the best solution here.

@IAlibay IAlibay requested a review from lilyminium March 10, 2024 20:09
Copy link
Member

@lilyminium lilyminium left a comment

Choose a reason for hiding this comment

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

This LGTM but I'm confused why CI is failing -- restarting now.

@lilyminium
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lilyminium
Copy link
Member

Sorry for the delay -- thanks for fixing this @HeetVekariya! Could you please update the CHANGELOG?

@HeetVekariya
Copy link
Contributor Author

@lilyminium sorry for late response, I have updated the change log.

@orbeckst
Copy link
Member

@lilyminium could you please check in on this PR? You approved it a while back but it hasn't been merged. Thanks!

@lilyminium
Copy link
Member

Thanks @HeetVekariya -- merging now!

@lilyminium lilyminium merged commit 6ec838b into MDAnalysis:develop Apr 1, 2024
11 of 16 checks passed
@HeetVekariya
Copy link
Contributor Author

Thank you for merging 🙏

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.

3 participants