Fix to skipping artificial normalization #499
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of work
An error is generated if reduction is performed on the same run twice in a row.
This was due to all fields on the
ArtificialNormalizationView
being deleted as a way of hiding them if artificial normalization was not needed.Explanation of work
Instead of deleting the widgets, they are added to a different layout, and that layout added inside a frame which can be hidden.
This has the same effect, but the widgets still exist and can be updated or shown as needed.
It was determined in slack comments that a plain view underneath the popup should be shown if artificial normalization is skipped.
To test
Dev testing
Make sure on your local you have a normalization for run 46680.
From
next
, reproduce the error. Run reduction on 46680. Click okay on the Workflow Complete dialog box. Now run reduction on 46680 again. An error will be generated, saying that a widget has been deleted.Still on
next
, hide this normalization file (rename its folder), run reduction with 46680, take screen shot of the artificial normalization screen.Switch to this branch. Keep the normalization file hidden, and run reduction with 46680, compare artificial normalization screen to your screen shot. It should be identical.
Unhide the normalization file or make a new one. Run reduction with 46680. It should go directly to a workflow complete popup on a blank view. Run reduction again with 46680. The same workflow complete popup again, up with no errors.
CIS testing
Hide the normalization file (rename its folder).
Open the SNAPRed reduction panel. Enter 61991 as the run number, continue to the artificial normalization screen. Run reduction twice in a row for this run.
(It is faster to use 46680, if you prefer)
Restore the normalization file.
Open the SNAPRed reduction panel. Enter 61991 as the rune number, continue. There should be no artificial normalization taking place. The workflow will finish successfully, with popup over stylish blank view. Run reduction again. There should be no issues.
Link to EWM item
EWM#8230
Verification
Acceptance Criteria
This list is for ease of reference, and does not replace reading the EWM story as part of the review. Verify this list matches the EWM story before reviewing.
NOTE This only handles the first defect. The second defect will be handled in a separate PR