Ticket #7681 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

New file/workspace selector widget

Reported by: Samuel Jackson Owned by: Samuel Jackson
Priority: major Milestone: Release 3.0
Component: GUI Keywords:
Cc: Blocked By:
Blocking: Tester: Russell Taylor

Description

Both the IDA and C2E interface make use of a combination of WorkspaceSelectors and MWRunsFiles to get the names of either a workspace or a file to work with. This pattern could benefit from become a separate Mantid widget to prevent code repetition and could easily be used elsewhere in Mantid. This is especially true as several upcoming tickets will use the exact same pattern several times over.

Change History

comment:1 Changed 7 years ago by Samuel Jackson

  • Milestone changed from Backlog to Release 3.0

comment:2 Changed 7 years ago by Samuel Jackson

  • Status changed from new to inprogress

Added new widget and connected it to Fury interface.

Refs #7681

Changeset: 45546ec689c9959db576b7e70272823b2269ee5a

comment:3 Changed 7 years ago by Samuel Jackson

Replacing check for valid res file.

Refs #7681

Changeset: 7371af37e44da9e74091dbc425326e1f69d4ce1c

comment:4 Changed 7 years ago by Samuel Jackson

Added check to stop auto plotting when workspace selector not visible

Refs #7681

Changeset: 17dbd62a45033c5bb088753449aa1dd9c4a7d828

comment:5 Changed 7 years ago by Samuel Jackson

To Test

A new Mantid Widget has been created. To test that it functions correctly, I've replaced the existing GUI components in the Fury IDA tab. The widget is a combination of a workspace selector and a file browser and should provide the same functionality as the existing interface but within a single widget

To test this I recommend checking how the existing fury interface works and then checking that the new interface behaves the same.

comment:6 Changed 7 years ago by Samuel Jackson

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

comment:7 Changed 7 years ago by Samuel Jackson

  • Status changed from verify to reopened
  • Resolution fixed deleted

comment:8 Changed 7 years ago by Samuel Jackson

  • Status changed from reopened to inprogress

Adding settings saving for selected directory

Refs #7681

Changeset: 99c8c1affa90533763a3e416bd9798b7a481eb3c

comment:9 Changed 7 years ago by Samuel Jackson

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

comment:10 Changed 7 years ago by Samuel Jackson

  • Status changed from verify to reopened
  • Resolution fixed deleted

comment:11 Changed 7 years ago by Samuel Jackson

  • Status changed from reopened to inprogress

Made the load button optional.

This should make the widget more applicable to a wider number of interfaces.

Refs #7681

Changeset: a88bba0bac87dfea60fbda1dbb203baf403e904e

comment:12 Changed 7 years ago by Samuel Jackson

Setting Fury back to the way it was.

Refs #7681

Changeset: 0e3db76d4c7e7542ad07e51119cbbf083e8d65a8

comment:13 Changed 7 years ago by Samuel Jackson

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

comment:14 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:15 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to reopened
  • Resolution fixed deleted

There's a warning on the console now when starting up the interface:

Object::connect: No such slot MantidQt::MantidWidgets::DataSelector::loadClicked()
Object::connect:  (sender name:   'pbLoadFile')
Object::connect:  (receiver name: 'DataSelector')

Also, if 'Workspace' is selected it includes different workspaces. Before it seemed to be looking for workspace names ending in "res" or "sqw". Now it's "red" or "sqw". Please confirm if this is a correct change.

comment:16 Changed 7 years ago by Samuel Jackson

  • Status changed from reopened to inprogress

Changed loadClicked from slot to signal.

Refs #7681

Changeset: 28d3dda9a8a62f27d868e22f0a6ea5358c059d90

comment:17 Changed 7 years ago by Samuel Jackson

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

comment:18 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying

comment:19 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to reopened
  • Resolution fixed deleted

I found a regression: if the data files are not on your directory search path, the analysis fails with the following error:

ValueError: Invalid value for property Filename (string) "irs55127_graphite002_red": File "irs55127_graphite002_red" not found
  at line 9 in '<Interface>'
  caused by line 429 in '/home/tr9/TestingMantid/Code/Mantid/scripts/Inelastic/IndirectDataAnalysis.py'

Calling completeBaseName() on the filename in DataSelector::getCurrentDataName() would appear - in this context at least - to be an error.

comment:20 Changed 7 years ago by Samuel Jackson

  • Status changed from reopened to inprogress

Changed Fury to use workspaces rather than load files.

Using the new interface component should ensure that the files have already been loaded and therefore they should already be available to the algorithm when Fury is run.

Refs #7681

Changeset: a9b35b936fd8642fccf1ccc138251c590572354f

comment:21 Changed 7 years ago by Samuel Jackson

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

Tester

I've made some changes to Fury in the last commit, so it would be a good idea to check the output of fury against the the output from another copy of Mantid to check it's still the same as well as doing the previously stated testing.

comment:22 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying

comment:23 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to closed

Merge remote branch 'origin/feature/7681_new_mantid_widget'

comment:24 Changed 7 years ago by Samuel Jackson

Changed Fury to use workspaces rather than load files.

Using the new interface component should ensure that the files have already been loaded and therefore they should already be available to the algorithm when Fury is run.

Refs #7681

Changeset: 64561c2562111880cf409a3155d57714f689cbdb

comment:25 Changed 7 years ago by Russell Taylor

  • Status changed from closed to reopened
  • Resolution fixed deleted

Oops, because the system tests have been broken for days, I only just noticed that the last commit looks to have broken the IRISFuryAndFuryFit & OSIRISFuryAndFuryFit system tests:

  File "/home/builder/jenkins/workspace/ornl_test_rhel6_develop/SystemTests/AnalysisTests/ISISIndirectInelastic.py", line 586, in _run
    Plot=False)
  File "/opt/Mantid/scripts/Inelastic/IndirectDataAnalysis.py", line 427, in fury
    nsam,npt = CheckHistZero(samTemp)
  File "/opt/Mantid/scripts/Inelastic/IndirectCommon.py", line 187, in CheckHistZero
    nhist = mtd[inWS].getNumberHistograms()       # no. of hist/groups in WS
KeyError: "'osi97935_graphite002_red.nxs' does not exist."

I've removed the merge commit from master and resurrected the topic branch on github so this can be fixed.

comment:26 Changed 7 years ago by Samuel Jackson

Corrected system test to load the files it needs.

Refs #7861

Changeset: 13b4a1240d1ac2c4aec3f72a2d23695febb18834

Last edited 7 years ago by Samuel Jackson (previous) (diff)

comment:27 Changed 7 years ago by Samuel Jackson

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

I've updated the system tests for Fury and FuryFit.

Note that I typed the ticket number wrong. The system tests branch that requires merging is #7861_new_mantid_widget despite this being ticket #7681.

Last edited 7 years ago by Samuel Jackson (previous) (diff)

comment:28 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying

comment:29 Changed 7 years ago by Samuel Jackson

  • Status changed from verifying to reopened
  • Resolution fixed deleted

comment:30 Changed 7 years ago by Samuel Jackson

  • Status changed from reopened to inprogress

Updated unit system tests on the correct branch number this time.

Refs #7681

Changeset: 6df5647bbb368e529eab6bf525a9d9a42ec0996f

Last edited 7 years ago by Samuel Jackson (previous) (diff)

comment:31 Changed 7 years ago by Samuel Jackson

Changed Fury to use workspaces rather than load files.

Using the new interface component should ensure that the files have already been loaded and therefore they should already be available to the algorithm when Fury is run.

Refs #7681

Changeset: a9b35b936fd8642fccf1ccc138251c590572354f

comment:32 Changed 7 years ago by Samuel Jackson

Tidy up system test to remove file extension.

Refs #7681

Changeset: aae2c947f66c3421a08295789eb3fadf313265ca

comment:33 Changed 7 years ago by Samuel Jackson

Added fall back load statement just in case the user manages remove the workspace.

Refs #7681

Changeset: ebdf0385017e222f4c141a9efd248334b852759f

comment:34 Changed 7 years ago by Samuel Jackson

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

comment:35 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying

comment:36 Changed 7 years ago by Russell Taylor

The branch in the system tests repository (https://github.com/mantidproject/systemtests/tree/feature/7681_new_mantid_widget) needs updating on github because it doesn't contain the last commit (which is only in develop on the server).

comment:37 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to closed

Merge remote branch 'origin/feature/7681_new_mantid_widget'

comment:38 Changed 7 years ago by Samuel Jackson

Merge branch 'feature/7681_new_mantid_widget' of github.com:mantidproject/mantid into feature/7681_new_mantid_widget

comment:39 Changed 7 years ago by Russell Taylor

Merge remote branch 'origin/feature/7681_new_mantid_widget'

comment:40 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8526

Note: See TracTickets for help on using tickets.