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

Remove napi functions from NexusClasses #38884

Merged
merged 2 commits into from
Feb 20, 2025
Merged

Remove napi functions from NexusClasses #38884

merged 2 commits into from
Feb 20, 2025

Conversation

rboston628
Copy link
Contributor

@rboston628 rboston628 commented Feb 18, 2025

Description of work

Summary of work

This finishes un-reverting work in PR #38791 .

This will remove all instances of napi functions from NexusClasses, which also finishes the process of consolidating access of NeXus through NeXus::File.

The NXDataSetTyped::load method was gently refactored to remove the k,l parameters, which are never used, as well as the branching logic for those being non-negative, which never happened.

Changes to NeXus::File are minimal, including adding additional constructors, and an assignment operator.

Related to #38332

Further detail of work

To test:

Windows build from commit bfd6f25 (NOT tip of branch)
Build Status

Windows build NOT re-run on commit de12700, but this should not impact any behavior.


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

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

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.

@rboston628 rboston628 added ORNL Team Issues and pull requests managed by the ORNL development team Technical Debt Marks a piece of work to address technical debt introduced to solve a problem quickly labels Feb 18, 2025
@rboston628 rboston628 added this to the Release 6.13 milestone Feb 18, 2025
@rboston628 rboston628 force-pushed the ewm9174-nexusclass-again branch 2 times, most recently from 5643baf to 451e8f4 Compare February 19, 2025 18:56
@rboston628 rboston628 force-pushed the ewm9174-nexusclass-again branch from 451e8f4 to bfd6f25 Compare February 20, 2025 06:37
*/
File(NXhandle handle, bool close_handle = false);
Copy link
Member

Choose a reason for hiding this comment

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

I knew this day would come eventually

@rboston628 rboston628 marked this pull request as ready for review February 20, 2025 16:02
Copy link
Member

@peterfpeterson peterfpeterson left a comment

Choose a reason for hiding this comment

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

Changing the NXhandle to shared_ptr<::NeXus::File> is a great way to make sure things get cleaned up with less effort. I also like that you removed some (not used by the outside) variables from load() and cleaned up the method. I didn't realize how many different copy constructors would be needed for shared_ptr.

@jmborr jmborr merged commit 6238d08 into main Feb 20, 2025
10 checks passed
@jmborr jmborr deleted the ewm9174-nexusclass-again branch February 20, 2025 18:58
rboston628 pushed a commit that referenced this pull request Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ORNL Team Issues and pull requests managed by the ORNL development team Technical Debt Marks a piece of work to address technical debt introduced to solve a problem quickly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants