-
Notifications
You must be signed in to change notification settings - Fork 528
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
Clean up unused methods in region.py
and preprocess.py
#3791
Comments
Affected: deepmd-kit/deepmd/pt/utils/region.py Lines 73 to 77 in fd2daeb
deepmd-kit/deepmd/pt/utils/preprocess.py Lines 28 to 32 in fd2daeb
|
all functions in preprocess except |
@wanghan-iapcm @iProzd could we find and remove all dead codes at once? |
May not necessarily do it at once ? or is there tools for automatically removing the dead codes? |
Indeed we can find them using Codecov, assuming all used functions are tested. |
I see |
good idea. I am wondering how much codes that are not dead are not covered by the UTs. |
I just found |
Since both code blocks are not used, I unassigned myself and moved from |
region.py
and preprocess.py
I've used deadcode to find out all used functions. Could you take a look? @wanghan-iapcm @iProzd
|
- #3791 - mainly preprocess and region - deepmd/pt/infer/deep_eval.py:595:0: DC02 Function `eval_model` is never used. used by test_unused_params, which seems not easy to remove <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - No new features introduced; significant code simplifications made. - **Bug Fixes** - No specific bug fixes identified; however, the removal of outdated functions may enhance overall stability. - **Refactor** - Removed the `Region3D` class and associated functions to streamline preprocessing logic. - Eliminated the `get_atom_axis` function to simplify atom axis determination. - Removed the `_to_face_distance` function, suggesting a refactor in distance calculations. - **Tests** - Removed the `TestLegacyRegion` class, reducing the scope of testing related to the `Region3D` functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>
The text was updated successfully, but these errors were encountered: