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: Align.py doctest error #4373

Closed

Conversation

HeetVekariya
Copy link
Contributor

@HeetVekariya HeetVekariya commented Dec 19, 2023

Partially address #3925

Changes made in this Pull Request:

  • Doctest for align.py (package/MDAnalysis/analysis/align.py) file contains error because wildcard match is not correctly implemented.
  • Removed > from the Expected output such that error can be solved.

PR Checklist

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

Developers certificate of origin


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

@HeetVekariya
Copy link
Contributor Author

I will update the change log when reviewed by maintainers, such that unnecessary merge conflicts can be avoided.

Copy link

github-actions bot commented Dec 19, 2023

Linter Bot Results:

Hi @HeetVekariya! 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 ✅ Passed

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/9726622099/job/26845277057


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

Copy link

codecov bot commented Dec 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.41%. Comparing base (b808ef1) to head (9f7a747).
Report is 85 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##           develop    #4373     +/-   ##
==========================================
  Coverage    93.41%   93.41%             
==========================================
  Files          171      185     +14     
  Lines        22512    23626   +1114     
  Branches      4129     4129             
==========================================
+ Hits         21029    22070   +1041     
- Misses         963     1036     +73     
  Partials       520      520             

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

@RMeli
Copy link
Member

RMeli commented Dec 19, 2023

@HeetVekariya CI is still showing errors with analysis/align.py, could you please look into it?

I'd also ask to change the "Fixes #3925" into something else like "Partially address #3925", otherwise the issue will be automatically closed when we merge this PR.

@HeetVekariya
Copy link
Contributor Author

  • @RMeli can you show me which type of error you got ?
  • Because for me it passes all the test cases.
/mdanalysis/package/MDAnalysis$ pytest -v --disable-pytest-warnings --doctest-modules analysis/align.py 
============================================================= test session starts ==============================================================
platform linux -- Python 3.10.13, pytest-7.4.3, pluggy-1.3.0 -- /home/heet/anaconda3/envs/mdanalysis-dev/bin/python
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/home/heet/Work/Development/mdanalysis/package/MDAnalysis/.hypothesis/examples'))
rootdir: /home/heet/Work/Development/mdanalysis/package
plugins: anyio-4.0.0, hypothesis-6.92.1
collected 2 items                                                                                                                              

analysis/align.py::MDAnalysis.analysis.align PASSED                                                                                      [ 50%]
analysis/align.py::MDAnalysis.analysis.align.rotation_matrix PASSED                                                                      [100%]

======================================================= 2 passed, 23 warnings in 12.43s ========================================================

@RMeli
Copy link
Member

RMeli commented Dec 21, 2023

@HeetVekariya I'm referring to the errors in the doctest CI.

@HeetVekariya
Copy link
Contributor Author

  • @RMeli from the logs i found that error is generated due to this 1 and 2.
  • But for my local set up i does not gives error.
  • So should i give it a chance by changing the code to this:

For 1:

>>> ref = mda.Universe(PDB_small)
>>> mobile = mda.Universe(PSF, DCD)
>>> rmsd(mobile.select_atoms('name CA').positions, ref.select_atoms('name CA').positions, center=True)
21.892591663632704

For 2:

>>> ref = mda.Universe(PDB_small)
>>> mobile = mda.Universe(PSF, DCD)
>>> rmsd(mobile.select_atoms('name CA').positions, ref.select_atoms('name CA').positions, 
...      superposition=True)
6.809396586471815

@RMeli
Copy link
Member

RMeli commented Dec 21, 2023

Thanks for looking into it. I'm not very well versed in doctests for MDAnalysis, I'll need a bit of time to understand why your setup is different from what we have in CI.

@orbeckst
Copy link
Member

@RMeli are you able to do a review here or should I try to find someone else?

@RMeli
Copy link
Member

RMeli commented Jun 29, 2024

Sorry, I completely missed this. =/ I'm cycling the PR so we can have access to the logs.

@RMeli RMeli closed this Jun 29, 2024
@RMeli RMeli reopened this Jun 29, 2024
@orbeckst
Copy link
Member

Hello @RMeli and @HeetVekariya — are you expecting to make progress on this PR? Or do you want to close it?

@orbeckst orbeckst added the close? Evaluate if issue/PR is stale and can be closed. label Oct 14, 2024
@HeetVekariya
Copy link
Contributor Author

@orbeckst I am not working on this PR.

@RMeli
Copy link
Member

RMeli commented Oct 14, 2024

Thanks for letting us know @HeetVekariya, I'm sorry this fell though the cracks (my bad)!

@RMeli RMeli closed this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
close? Evaluate if issue/PR is stale and can be closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants