Skip to content

Conversation

jhaigh0
Copy link
Contributor

@jhaigh0 jhaigh0 commented Oct 15, 2024

Description of work

Part of the MVP workshop week.

Adds PhaseTableModel which holds an FDA context and some other state, previously in the presenter.
Some methods have been moved to the Model if they were only interacting with the context.
Tests updated, and a new test file created for tests only concerning methods now in the model.

Fixes #38104

To test:

Code review and https://developer.mantidproject.org/Testing/MuonAnalysis_test_guides/Muon_FDA.html#id5

This does not require release notes because refactoring change


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.

@jhaigh0 jhaigh0 added Muon Issues and pull requests related to muons Maintenance Unassigned issues to be addressed in the next maintenance period. labels Oct 15, 2024
@jhaigh0 jhaigh0 added this to the Release 6.12 milestone Oct 15, 2024
@rbauststfc rbauststfc self-assigned this Oct 15, 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.

Thanks for this, looks great and is functionally all working well when I ran the manual tests through.

I noticed one typo in the phasequad thread properties, and had a couple of other thoughts when looking through. Let me know what you think. If you feel like it might be worth trying any of them out then I'm very happy to pick up doing that, depending on what you prefer.

jhaigh0 and others added 2 commits October 17, 2024 10:24
Move the code that runs the phasequad and phase table calculations on a
new thread into the model
@jhaigh0
Copy link
Contributor Author

jhaigh0 commented Oct 17, 2024

Happy with the changes made in the latest commit that move the threading operations to the model 👍

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.

I've followed the manual testing steps since all changes have been made and everything's working well. All PR comments have been addressed, either by myself or Jonathan, and we've both approved each others changes, so this is ready to be gatekeepered.

@robertapplin robertapplin self-assigned this Oct 17, 2024
@robertapplin
Copy link
Contributor

Thanks for your hard work with this PR! The code separation between the Presenter and Model is much improved, and the Model also has its own test suite now.

@robertapplin robertapplin merged commit 0b2ff14 into main Oct 17, 2024
10 checks passed
@robertapplin robertapplin deleted the 38104_PhaseTablePresenter_cleanup branch October 17, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Unassigned issues to be addressed in the next maintenance period. Muon Issues and pull requests related to muons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PhaseTablePresenter contains state which should be in Model
3 participants