Ticket #8140 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Enhance DataSelector with better validation options

Reported by: Samuel Jackson Owned by: Samuel Jackson
Priority: major Milestone: Release 3.1
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Roman Tolchenov

Description

The data selector class could benefit from being having some additional methods such as:

  • isValid() which returns true if we have a valid filename/workspace name we can use
  • currentView() which returns information about what view (file or workspace) is currently selected.

Change History

comment:1 Changed 7 years ago by Samuel Jackson

  • Status changed from new to inprogress

Refs #8140 Add methods to validate widget input and check state.

Changeset: 40906280c774977c25dc1d815f6d00b86233e793

comment:2 Changed 7 years ago by Samuel Jackson

Refs #8140 Updated UserInputValidator to support widget

Also made use of added functions in Fury for testing.

Changeset: ae4516775b4de8055778e0910036ce836c6707a5

comment:3 Changed 7 years ago by Samuel Jackson

  • Milestone changed from Backlog to Release 3.1

comment:4 Changed 7 years ago by Samuel Jackson

  • Status changed from inprogress to verify
  • Resolution set to fixed

To Tester:

I've added the additional methods to the DataSelector widget and added a method to UserInputValidator to support it. For testing I modified the code in the Fury tab on the IDA interface to use the new methods so run though and check this works. You should also do a code review.

Instructions for running Fury can be found here: http://www.mantidproject.org/Indirect:Indirect_Data_Analysis#Running_Fury

comment:5 Changed 7 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:6 Changed 7 years ago by Roman Tolchenov

  • Status changed from verifying to reopened
  • Resolution fixed deleted

DataSelector::getCurrentView() breaks encapsulation and exposes too much of the class' internals. It's better to return either an emum member or a named constant. Is this method necessary?

UserInputValidator::checkDataSelectorIsValid() makes assumptions on the nature of the validation failure. UserInputValidator::checkMWRunFilesIsValid() method uses a better approach from my point of view.

comment:7 Changed 7 years ago by Samuel Jackson

  • Status changed from reopened to inprogress

Refs #8140 Updated DataSelector with suggested changes.

Changeset: 01ce81fdc3794f1ca4f1c4af584d3bd4fe2fd062

comment:8 Changed 7 years ago by Samuel Jackson

  • Status changed from inprogress to verify
  • Resolution set to fixed

After a discussion with Roman, I've updated this ticket with his suggested changes. To Test: As above.

comment:9 Changed 7 years ago by Roman Tolchenov

  • Status changed from verify to closed

Merge remote-tracking branch 'origin/feature/8140_dataselector_validation_options'

Full changeset: a566b29fe0d881f9c403be1bd5e0b2daaf693e77

comment:10 Changed 7 years ago by Russell Taylor

While auditing old, unmerged branches I've found that the last commit above (in comment:7) was not merged into master - the merge was made using the previous commit.

Should this commit be merged? If so, create a new ticket and a new branch and cherry-pick the commit over to the new branch.

comment:11 Changed 7 years ago by Samuel Jackson

Yes that commit should have been merged. But a method on the widget has been deleted in that last commit and I think there are places which rely on it. Will create a new ticket to fix this.

comment:12 Changed 7 years ago by Samuel Jackson

Ticket is #9007

comment:13 Changed 7 years ago by Samuel Jackson

Refs #8140 Updated DataSelector with suggested changes.

Changeset: ab076abc89c3a57c80d63b2765d6dcaeb05d4eb8

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8985

Note: See TracTickets for help on using tickets.