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

Added check to match bins before conjoining workspaces. #38478

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

RabiyaF
Copy link
Contributor

@RabiyaF RabiyaF commented Dec 5, 2024

Description of work

Summary of work

Fixes #38090 .

Further detail of work

To test:

Manual Test

  1. cd build
  2. ninja
  3. workbench -> to launch workbench
  4. Run the following in the editor
ws1 = CreateSampleWorkspace(WorkspaceType="Histogram", NumBanks=2, BankPixelWidth=1, BinWidth=10, Xmax=50)
ws2 = CreateSampleWorkspace(WorkspaceType="Histogram", NumBanks=3, BankPixelWidth=1, BinWidth=10, Xmax=50)
ConjoinWorkspaces(InputWorkspace1=ws1, InputWorkspace2=ws2, CheckOverlapping=False, YAxisUnit="New unit", YAxisLabel="New label")
  1. Verify that error is shown.
image

Run Test

  1. cd build
  2. ninja AllTests
  3. Run the following in the terminal
ctest -R ConjoinWorkspacesTest
  1. Verify that the test passes.
image

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.

@RabiyaF RabiyaF force-pushed the 38090-fix-workbench-disappearance branch from d853779 to 0171fc1 Compare December 9, 2024 10:52
@RabiyaF RabiyaF added Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS labels Dec 9, 2024
@RabiyaF RabiyaF force-pushed the 38090-fix-workbench-disappearance branch 5 times, most recently from 32b166b to ddcdd8c Compare December 10, 2024 22:53
@jhaigh0 jhaigh0 self-assigned this Dec 11, 2024
Copy link
Contributor

@jhaigh0 jhaigh0 left a comment

Choose a reason for hiding this comment

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

A nice change, works without crash now.

You'll need to add a release note to docs/release/v6.12.0/Framework/Algorithms/Bugfixes/ in a file named after the issue number

@RabiyaF RabiyaF force-pushed the 38090-fix-workbench-disappearance branch from ddcdd8c to d03e6c4 Compare December 12, 2024 00:23
@RabiyaF RabiyaF requested a review from jhaigh0 December 12, 2024 12:35
@RabiyaF RabiyaF force-pushed the 38090-fix-workbench-disappearance branch from d03e6c4 to 2c81ae2 Compare December 13, 2024 17:36
@github-actions github-actions bot added the Has Conflicts Used by the bot to label pull requests that have conflicts label Dec 16, 2024
Copy link

👋 Hi, @RabiyaF,

Conflicts have been detected against the base branch. Please rebase your branch against the base branch.

@RabiyaF RabiyaF force-pushed the 38090-fix-workbench-disappearance branch from 2c81ae2 to fb7dc8d Compare December 16, 2024 09:18
@RabiyaF RabiyaF removed the Has Conflicts Used by the bot to label pull requests that have conflicts label Dec 16, 2024
jhaigh0
jhaigh0 previously approved these changes Dec 16, 2024
@jhaigh0
Copy link
Contributor

jhaigh0 commented Dec 16, 2024

Approved pending CI checks

@cailafinn cailafinn self-assigned this Dec 19, 2024
Copy link
Contributor

@cailafinn cailafinn left a comment

Choose a reason for hiding this comment

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

Just had a few code/documentation notes before merging:

Comment on lines +57 to +58
static bool matchingBins(const std::shared_ptr<const MatrixWorkspace> &ws1,
const std::shared_ptr<const MatrixWorkspace> &ws2, const bool firstOnly = false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason that this file (and the associated .cpp) was changed (and resulting in having to change a large number of other files) rather than just dereferencing the pointer in ConjoinWorkspaces.cpp here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

This update was mentioned by James on Slack discussions in ral-core for this PR. I think/presume this is a change that is being implemented in other refactors of the codebase and would need to be updated eventually. It was linked to work on this PR and seemed like an easy enough change to make. So, that is why these files were updated too.

docs/source/algorithms/ConjoinWorkspaces-v1.rst Outdated Show resolved Hide resolved
@RabiyaF RabiyaF force-pushed the 38090-fix-workbench-disappearance branch from e52c26c to f9b746d Compare December 23, 2024 13:20
@RabiyaF
Copy link
Contributor Author

RabiyaF commented Dec 23, 2024

I have rebased and addressed the comments. The tests will pass. Just a heads up, tomorrow will be my last working day before the code freeze. As this issue was linked to the next release milestone, let me know if any other changes are required.

@RabiyaF RabiyaF requested review from jhaigh0 and cailafinn December 23, 2024 13:28
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: Core Issue and pull requests managed by the Core subteam at ISIS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workbench disappears on SaveNexusProcessed
3 participants