-
Notifications
You must be signed in to change notification settings - Fork 126
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
Refactor SaveNXcanSAS algorithm to support different variants #38582
Conversation
… inherit from saveNXcanSASBase
1. There were doxygen lines in add2DData function that needed to be escaped with \. to avoid a warning, this was not detected before as doxygen does not look in anonymous namespaces for mantid. 2. There was a doxygen comment missing input parameters to the function addInstrument.
Can we get a milestone on this please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SaveNXcanSAS.cpp
was split into SaveNXcanSASBase.cpp
and NXcanSASHelper.cpp
, to prepare the base class for creating another diverging algorithm as specified by the original issue. The code looks good and from what I can tell no major changes were introduced.
There was no change to the unit tests, so checking that they run is enough to check that these changes were not disruptive.
I searched the logs from the CI to check these tests ran without issues and confirmed this was the case 👍
Description of work
This PR refactors current implementation of the SaveNXcanSAS algorithm to allow multiple variants of algorithms saving in NXcanSAS format ( like polarized data). Explained in #38503
The refactoring has mainly reorganized the code, the
SaveNXcanSAS
algorithm is now derived from a parentSaveNXcanSASBase
which contains different initializers and validator functions that specialize the algorithm to support different kinds of data and metadata. At this moment, it validates and adds what is considered standard metadata for a NXcanSAS format.A helper file has been also created to place common functions that add different groups and data to the H5 file. These were previously stored in an anonymous namespace in the SaveNXcanSAS algorithm, and now are accessible to other algorithms through the NXcanSAS namespace.
Summary of work
Fixes #38503.
Further detail of work
To test:
this does not required release notes as it is an internal reorganization and does not affect the user experience
Reviewer
Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Code Review
Functional Tests
Does everything look good? Mark the review as Approve. A member of
@mantidproject/gatekeepers
will take care of it.Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.