Closed iProzd closed 4 months ago
The changes in the test_dipole_fitting.py
and test_polarizability_fitting.py
files focus on standardizing the use of the mixed_types
parameter across multiple test functions. Instead of iterating over [True, False]
or using fixed values, the mixed_types
parameter is now consistently set to self.dd0.mixed_types()
. These adjustments improve code consistency and maintainability.
Files | Change Summary |
---|---|
source/tests/pt/model/test_dipole_fitting.py |
Set mixed_types to self.dd0.mixed_types() in test_consistency , test_rot , test_permu , test_trans , and setUp methods. |
source/tests/pt/model/test_polarizability_fitting.py |
Set mixed_types to self.dd0.mixed_types() in test_consistency , test_rot , test_permu , test_trans , and setUp methods. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.53%. Comparing base (
12bcc50
) to head (f82c65f
). Report is 128 commits behind head on devel.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Fix following trivial bugs in dipole and polar fit uts:
box
was not used inextend_input_and_build_neighbor_list
(which means they were all tested in nopbc mode, if shifted coord is outside the box (sometimes) and normalized explicitly, results are not the same.) Input for fitting also used extended_atype instead of atype. (Only same when nopbc.)mixed_types
is disordered, mismatched with descriptor or sometimes with nlist. Now only usemixed_types
==False since the descriptor output is not in mixed types.Summary by CodeRabbit
mixed_types
parameter to dynamically useself.dd0.mixed_types()
across multiple test functions for better flexibility and accuracy.