Skip to content

Conversation

@lukaspie
Copy link
Collaborator

@lukaspie lukaspie commented Jul 8, 2024

This PR changes the pynxtools.testing framework such that it compares the read_nexus logs directly during the tests. This avoids having to store binary NeXus files in the repos. Instead, we only commit reference logs, which will lead to much smaller diffs and keep the repositories lighter.

For pynxtools-xps, I have a corresponding branch where this change in the testing is already implemented, including a script to autogenerate these log file consistently: https://github.com/FAIRmat-NFDI/pynxtools-xps/pull/69/files#diff-1ac04a8e7b33c27f6b8eea0d6f44313388de34a688758042f1ee9582f5b34ca2. This branch is also installed in the test_plugins pipeline here.

@RubelMozumder
Copy link
Collaborator

This is a good idea to prevent our plugin from unnecessarily weighing. We also have to replace nexus files by its log files.
Readme file also needs to updated.

@lukaspie lukaspie force-pushed the use-log-files-in-tests branch from da5df5b to 84b86a9 Compare July 12, 2024 13:42
@lukaspie lukaspie force-pushed the use-log-files-in-tests branch from 84b86a9 to 21c699f Compare August 30, 2024 13:54
@lukaspie lukaspie force-pushed the use-log-files-in-tests branch from 21c699f to 9c7fb87 Compare September 12, 2024 09:09
@lukaspie lukaspie linked an issue Sep 13, 2024 that may be closed by this pull request
@lukaspie lukaspie force-pushed the use-log-files-in-tests branch 2 times, most recently from df6a792 to 132274b Compare August 6, 2025 13:13
@lukaspie lukaspie marked this pull request as ready for review October 9, 2025 09:17
@lukaspie lukaspie force-pushed the use-log-files-in-tests branch from 132274b to e3c9e28 Compare October 9, 2025 09:17
@RubelMozumder
Copy link
Collaborator

I had an issue at the very beginning in FAIRmat with the log files, it came from float number precision related to hardware. The float numbers array came with different precision from different machines. I do not know how it works now. Do you think, we can also keep the test option with nexus_file, but we shall recommend using the log_file?

@lukaspie
Copy link
Collaborator Author

lukaspie commented Oct 9, 2025

I had an issue at the very beginning in FAIRmat with the log files, it came from float number precision related to hardware. The float numbers array came with different precision from different machines. I do not know how it works now. Do you think, we can also keep the test option with nexus_file, but we shall recommend using the log_file?

I believe I made a change in the read_nexus code that fixes this issue at some point, but I can't find it anymore. In any case, we should just fix it there (e.g., by forcing it to always use the same precisison). Can you try if this problem persists?

I am not a big fan of allowing the NeXus file as an alternative, because a) there should be one single way to do it, and b) there is a reason for not having the NeXus files - they are binary and thus there is not git difference, leading to unneccessary bloat of the plugin repos.

@lukaspie lukaspie force-pushed the use-log-files-in-tests branch from 9413f01 to 62e2909 Compare October 20, 2025 10:39
Copy link
Collaborator

@mkuehbach mkuehbach left a comment

Choose a reason for hiding this comment

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

Reasonable overall to move forward, but treatment of numeric edge cases is discussion-worthy, branch in need of sync with main, CI fixes

Copy link
Collaborator

@mkuehbach mkuehbach left a comment

Choose a reason for hiding this comment

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

Thanks for this addition, can be merged once updated by main and CI made passing.

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.

NOMAD tests in testing framework

4 participants