Skip to content
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

MDANSE UnitTest fixes #277

Merged
merged 23 commits into from
Jan 17, 2024
Merged

MDANSE UnitTest fixes #277

merged 23 commits into from
Jan 17, 2024

Conversation

ChiCheng45
Copy link
Collaborator

@ChiCheng45 ChiCheng45 commented Jan 17, 2024

Description of work
Code changes to get all MDANSE UnitTest working and removed either redundant or obsolete test e.g. test which use MMTK.
Added github workflow to run tests.
Removed python 3.8 support since MDANSE uses newer python features that are not supported in 3.8.
Test under FunctionalTests directory to be fixed in a later pull request.
Cython code changes were made, recompilation of the Cython code will be required.

Fixes
Various fixes across the MDANSE codebase.

To test
Build and run MDANSE UnitTests with pytest.

======================================================================================================= test session starts ======================================================================================================= 
platform win32 -- Python 3.11.7, pytest-7.4.4, pluggy-1.0.0
rootdir: C:\Users\xcb63893\PycharmProjects\MDANSE\MDANSE
plugins: cov-4.1.0
collected 435 items

test_analysis.py ..........                                                                                                                                                                                                  [  2%]
test_atom_selector.py ..................................                                                                                                                                                                     [ 10%]
test_chemical_entity.py ..................................................................................................................................................................................................   [ 54%]
test_configuration.py ...........................................                                                                                                                                                            [ 64%]
test_configurator.py ...                                                                                                                                                                                                     [ 65%]
test_databases.py ...........................................................................                                                                                                                                [ 82%]
test_geometry.py .                                                                                                                                                                                                           [ 82%]
test_molecular_dynamics.py ...                                                                                                                                                                                               [ 83%]
test_pdb_reader.py .                                                                                                                                                                                                         [ 83%]
test_trajectory.py ....                                                                                                                                                                                                      [ 84%]
test_trajectory_utils.py .........                                                                                                                                                                                           [ 86%]
test_unit_cell.py ........                                                                                                                                                                                                   [ 88%]
test_units.py ..............                                                                                                                                                                                                 [ 91%]
Analysis\test_dynamics.py ......                                                                                                                                                                                             [ 93%]
Analysis\test_meansquare.py ...                                                                                                                                                                                              [ 93%]
Analysis\test_qvectors.py .                                                                                                                                                                                                  [ 94%]
Analysis\test_resolutions.py .                                                                                                                                                                                               [ 94%]
Analysis\test_scattering.py ....                                                                                                                                                                                             [ 95%]
Analysis\test_thermodynamics.py .......                                                                                                                                                                                      [ 96%]
NeutronInstrument\test_instrument.py .                                                                                                                                                                                       [ 97%]
molecules\test_chemistry.py ..x                                                                                                                                                                                              [ 97%]
molecules\test_connectivity.py ......                                                                                                                                                                                        [ 99%]
molecules\test_rdkit.py ....                                                                                                                                                                                                 [100%]

================================================================================================= 434 passed, 1 xfailed in 43.78s =================================================================================================

)
self.assertTrue(np.allclose(com_trajectory, [[1.0, 1.0, 1.0]], rtol=1.0e-6))
self.assertTrue(np.allclose(com_trajectory, [[3.5, 3.5, 3.5]], rtol=1.0e-6))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a closer look at this part since the expected result has changed in this one, but it is clear that the new values are correct.

Copy link
Collaborator

@MBartkowiakSTFC MBartkowiakSTFC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the tests that were supposed to pass really pass. Thank you working on it. The changes can be merged.

@MBartkowiakSTFC MBartkowiakSTFC merged commit 5218f07 into protos Jan 17, 2024
54 checks passed
@ChiCheng45 ChiCheng45 deleted the chi/mdanse-unittest-fixes branch January 18, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants