-
Notifications
You must be signed in to change notification settings - Fork 778
Add Type Hints to MDAnalysis.analysis.rms #5179
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
base: develop
Are you sure you want to change the base?
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.
Hello there first time contributor! Welcome to the MDAnalysis community! We ask that all contributors abide by our Code of Conduct and that first time contributors introduce themselves on GitHub Discussions so we can get to know you. You can learn more about participating here. Please also add yourself to package/AUTHORS as part of this PR.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5179 +/- ##
===========================================
- Coverage 92.73% 92.72% -0.01%
===========================================
Files 180 180
Lines 22475 22485 +10
Branches 3190 3190
===========================================
+ Hits 20842 20850 +8
- Misses 1176 1178 +2
Partials 457 457 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi, just a gentle follow-up on this PR. |
Description
This PR adds comprehensive type hints to the
MDAnalysis.analysis.rmsmodule as part of the ongoing effort to improve type safety, code documentation, and developer experience in MDAnalysis.Changes Made
New Imports
typingimports:Optional,Union,List,Dict,Any,Sequence,Tuple,TYPE_CHECKINGnumpy.typing.NDArrayfor array type hintsTYPE_CHECKINGguard forAtomGroupandUniverseimports to avoid circular import issues at runtimeFunction
rmsd()a: NDArray,b: NDArray- coordinate arraysweights: Optional[NDArray]- optional weight arraycenter: bool,superposition: bool- boolean flags-> floatFunction
process_selection()selectparameter:Union[str, Tuple[str, str], Dict[str, str]]-> Dict[str, Any]Class
RMSDatomgroup,reference,groupselections,weightsweights_groupselections,tol_mass,ref_frame__init__()parameters including complex union types_prepare()and_single_frame()methods:-> Nonemypywith type inference in complex control flowClass
RMSF__init__()parameters_prepare(),_single_frame(), and_conclude()methods:-> NoneConfiguration
mypy.inito enable type checking forMDAnalysis.analysis.rmsmodulePR Checklist
package/CHANGELOGfile updated?package/AUTHORS?Developers Certificate of Origin
I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.
📚 Documentation preview 📚: https://mdanalysis--5179.org.readthedocs.build/en/5179/