You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nice work on 9371. Here are some changes i suggest from my code review.
Missing : TODO : DESCRIPTION in headers
No need for Code/Mantid/MantidQt/CustomInterfaces/src/IReflPresenter.cpp
Mark slots as such in the implementation documentation for each. Makes them easier to read and identify what they relate to.
Declare and initialise close to use in ReflLoadedMainViewPresenter::hasValidModel()
CreateTransmissionWorkspaceAuto should not need the following. Just delete the lines and test that it still works (creating a transmission workspace)
algCreateTrans->setProperty("Params",HACKYPARAMS); //HACK FOR NOW
algCreateTrans->setProperty("StartOverlap",10.0); //HACK FOR NOW
algCreateTrans->setProperty("EndOverlap",12.0); //HACK FOR NOW
Transmission workspaces should be called TRANS_{0} or TRANS_{0}_{1} where {0} and {1} should be substituted for run numbers of the transmission workspaces. See refl_gui.py
Multiple definitions of the same type : class MockView : public ReflMainView
Instead, create a MockObjects.h and put in the test directory. Include it where needed, but don't add to cmake test list.
Tests are hard to read (not your fault)
Use TSM_ASSERT where possible, as this provides the ability to write a custom message explaining what the assertion is actually checking.
Comment each derived class from ReflMainView in the tests. Explain what it is being used for.
Evaluate the need for so many Fake types. Add ones that are really needed, and could be shared to the aforementioned MockObjects.h. Better to refactor the code in such a way that Fakes are not needed altogether.
Created Tranmsission workspaces (see 7) should not be deleted at the end of processing.
Add a bold Prototoype label to the GUI. I don't want users accidently picking this up at this stage.
'''Things to think about, but not necessarily correct:'''
Might be better to inject a new object rather than create one in an opaque fashion. For example QtReflMainView::setNew()
QtReflMainView::getFlag() has unsafe behaviour equivalent to pop found on many containers. Method has two responsibilities. What should happen if
it fails to achieve one or the other of the responsibilities. What happens if another instance of getFlag is run from another thread at the same time?
Is it better that the view clears the flags, or that the presenter commands it?
Algorithm execution should keep workspaces out of the ADS until required otherwise. Use setChild(true) on the algorithms. For example of misuse see ReflMainViewPresenter::processRow()
The text was updated successfully, but these errors were encountered:
This ticket is blocked by :
This ticket is blocks :
TRAC10223Nice work on 9371. Here are some changes i suggest from my code review.
Missing : TODO : DESCRIPTION in headers
No need for Code/Mantid/MantidQt/CustomInterfaces/src/IReflPresenter.cpp
Mark slots as such in the implementation documentation for each. Makes them easier to read and identify what they relate to.
Declare and initialise close to use in ReflLoadedMainViewPresenter::hasValidModel()
CreateTransmissionWorkspaceAuto should not need the following. Just delete the lines and test that it still works (creating a transmission workspace)
Transmission workspaces should be called TRANS_{0} or TRANS_{0}_{1} where {0} and {1} should be substituted for run numbers of the transmission workspaces. See refl_gui.py
Multiple definitions of the same type : class MockView : public ReflMainView
Instead, create a MockObjects.h and put in the test directory. Include it where needed, but don't add to cmake test list.
Created Tranmsission workspaces (see 7) should not be deleted at the end of processing.
Add a bold Prototoype label to the GUI. I don't want users accidently picking this up at this stage.
'''Things to think about, but not necessarily correct:'''
Might be better to inject a new object rather than create one in an opaque fashion. For example QtReflMainView::setNew()
QtReflMainView::getFlag() has unsafe behaviour equivalent to pop found on many containers. Method has two responsibilities. What should happen if
it fails to achieve one or the other of the responsibilities. What happens if another instance of getFlag is run from another thread at the same time?
Is it better that the view clears the flags, or that the presenter commands it?
Algorithm execution should keep workspaces out of the ADS until required otherwise. Use setChild(true) on the algorithms. For example of misuse see ReflMainViewPresenter::processRow()
The text was updated successfully, but these errors were encountered: