Conversation
Contributor
There was a problem hiding this comment.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.