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

Fix "Save Other" Widget's Saving in ISIS SANS Interface #37221

Merged

Conversation

cailafinn
Copy link
Contributor

Description of work

Summary of work

Add the additional positional argument to the save_workspace_to_file method imported from batch_execution in the call from the Save Other widget.

Fixes #37219

Further detail of work

This seems not to have been covered by either our unit or manual testing. So appropriate tests have been added to to the docs and code to remedy this.

The unit tests added test the call two-fold. Once to make sure that any future changes to the save_workspace_to_file's positional arguments will cause a failure, and the other to make sure any unexpected changes to the call of save_workspace_to_file will also fail.

on_save() was completely untested. There is probably more that could be added, but that's beyond the scope of this PR.

To test:

  1. Open the ISIS SANS Interface
  2. Load the batch and user files from the loqdemo in the training course data.
  3. Process one of the rows.
  4. Click Save Other.
  5. In the widget, select one of the generated output workspaces.
  6. Provide a file name and a save path
  7. Click Save.
  8. No errors should appear (note that attempting to save a non-reduced workspace will produce an error, but this is expected and the error message should be reasonably clear to indicate this.)

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.

@cailafinn cailafinn added Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) SANS Issues and pull requests related to SANS ISIS Team: LSS Issue and pull requests managed by the LSS subteam at ISIS labels Apr 25, 2024
@cailafinn cailafinn changed the title Fix Save Other Saving in ISIS SANS Interface Fix "Save Other" Widget's Saving in ISIS SANS Interface Apr 25, 2024
@rbauststfc rbauststfc self-assigned this Apr 29, 2024
Copy link
Contributor

@rbauststfc rbauststfc left a comment

Choose a reason for hiding this comment

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

Fix is working well and great to have some tests added 👍 I agree that adding tests for on_save() is outside the scope of this PR. If not already done, is it worth adding a maintenance issue for this, though?

I've got just a couple of minor suggestions on documentation/release notes.

dev-docs/source/Testing/SANSGUI/ISISSANSGUITests.rst Outdated Show resolved Hide resolved
docs/source/release/v6.10.0/SANS/Bugfixes/37219.rst Outdated Show resolved Hide resolved
@rbauststfc rbauststfc added this to the Release 6.10 milestone Apr 29, 2024
@cailafinn
Copy link
Contributor Author

Issue for adding more tests created here:

Copy link
Contributor

@rbauststfc rbauststfc left a comment

Choose a reason for hiding this comment

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

All review comments have been addressed and look good, this is ready to be merged in. Thanks for sorting this fix so quickly!

@SilkeSchomann SilkeSchomann merged commit e7add54 into mantidproject:main Apr 30, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) ISIS Team: LSS Issue and pull requests managed by the LSS subteam at ISIS SANS Issues and pull requests related to SANS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unex When Using Save Other Window In ISIS SANS Interface
3 participants