-
Notifications
You must be signed in to change notification settings - Fork 5
Refactor atom density class #48
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
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.
Pull Request Overview
This PR refactors the AtomDensity analysis to introduce a standalone function run_atom_density_analysis, updates tests to use this function, and revises documentation to reflect the new API.
- Tests now import and call
run_atom_density_analysis, remove the class instantiation, and switch toassert_almost_equalfor float comparisons. - Documentation’s usage section shows how to build inputs, instantiate MDAnalysis objects, and call both the class and the new helper function.
- Added an “Old inputs” section recommending
run_atom_density_analysisfor users of the previous API.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/analysis/atom_density/test_atom_density.py | Switched to run_atom_density_analysis, updated fixture return, changed assertions to assert_almost_equal. |
| docs/analysis/atom_density.md | Expanded usage examples, added code snippet for MDAnalysis setup, introduced run_atom_density_analysis in legacy section. |
Comments suppressed due to low confidence (2)
docs/analysis/atom_density.md:80
- Include necessary imports for
UniverseandCell(e.g.,from MDAnalysis import Universeandfrom MDAnalysis.core.universe import Cell) at the top of this snippet so users can run the example successfully.
xyz_file = inp.get("xyz_file")
docs/analysis/atom_density.md:145
- The variable
input_dictis not defined; it should beinp_dictto match the example input object.
ad = run_atom_density_analysis(input_dict)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #48 +/- ##
==========================================
- Coverage 26.79% 26.18% -0.62%
==========================================
Files 23 23
Lines 3381 3468 +87
==========================================
+ Hits 906 908 +2
- Misses 2475 2560 +85 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.