Ticket #10380 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Refl UI options column doesn't handle lists properly

Reported by: Harry Jeffery Owned by: Harry Jeffery
Priority: major Milestone: Release 3.3
Component: Reflectometry Keywords:
Cc: Blocked By: #10364
Blocking: #10398 Tester: Owen Arnold

Description

If I wanted to set the Params and ThetaIn properties I might enter this: Params="1,2,3", ThetaIn=2.3

Currently this will not work as the options column cannot handle quoted commas.

Goals:

  • Correctly handle quoted commas
  • Allow quote characters to be escaped
  • Allow escape characters to be escaped

Change History

comment:1 Changed 6 years ago by Harry Jeffery

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Harry Jeffery

  • Status changed from assigned to inprogress

comment:3 Changed 6 years ago by Harry Jeffery

Refs #10380 Improve options parsing in Refl UI

We now support quoting values that contain commas, escaping quotes, and values that contain '='.

Changeset: 4f6f946fb5e4bf67540b076c9b178d947c4f5563

comment:4 Changed 6 years ago by Harry Jeffery

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

Testing

In the Refl UI, the options column may be used to override the properties set when executing ReflectometryReductionOneAuto. Set some properties using it like so: Params='0.1,0.2,0.3', ThetaIn=2.3. Then check the algorithm history for the resulting IvsQ workspace. We don't care about the data in the workspace, just that the properties were overridden correctly for ReflectometryReductionOneAuto

The only column you *need* to fill to process a row is the Run(s) column. Some valid values to test with: 13460,13462,13469,13470

  • Verify that the options column now supports a quoted comma separated list of doubles
  • Verify that the algorithm properties are correctly overridden

comment:5 Changed 6 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

comment:6 Changed 6 years ago by Owen Arnold

  • Status changed from verifying to reopened
  • Resolution fixed deleted

This works, but is lacking automated testing. I would like to see the string parsing put under test so that we can check that it's correctly processing the variables.. At the moment, you have this parseOptionsString as a protected member, which is right, because we only want to expose notify as a public member.

In order to make this testable, any of the following would be OK.

  • static public member
  • free function
  • composition

Composition would be my preferred option. My thinking for this is that may end up being a sufficiently complex piece of logic in its own right. For example, it currently doesn't (but should) stop you providing options that are already in some way specified as part of the table. but I'll let you make a choice about how you want to do this for now.

comment:7 Changed 6 years ago by Harry Jeffery

  • Status changed from reopened to inprogress
  • Blocked By 10364 added

Waiting for #10364 to pass before unit test can be added.

comment:8 Changed 6 years ago by Harry Jeffery

Refs #10380 Generalise parseOptionsString → parseKeyValueString

As a static interface it can now be unit tested appropriately.

Changeset: 2e6560159dab6040a7f35766119184185c6df41d

comment:9 Changed 6 years ago by Harry Jeffery

Refs #10380 Unit test parseKeyValueString

Changeset: 1514244018d0486e6fd8051b93fcb7fc8f4a73fc

comment:10 Changed 6 years ago by Harry Jeffery

Refs #10380 Correct documentation

Changeset: c2c4630e1936913870dd3dec2aebf46f481cf385

comment:11 Changed 6 years ago by Harry Jeffery

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

Additional Testing

  • Inspect changes
  • Verify new unit test is passing

comment:12 Changed 6 years ago by Owen Arnold

  • Status changed from verify to verifying

comment:13 Changed 6 years ago by Harry Jeffery

  • Status changed from verifying to closed

Merge branch 'master' into feature/10380_refl_ui_options_col_quote_commas

Full changeset: 39cc41b8588ea25d2487c161b186a447b07f6fb6

comment:14 Changed 6 years ago by Owen Arnold

Merge remote-tracking branch 'origin/feature/10380_refl_ui_options_col_quote_commas'

Full changeset: 5917d700d77a5b16ef636d1605862270cc9e4051

comment:15 Changed 6 years ago by Owen Arnold

  • Blocking 10398 added

comment:16 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11222

Note: See TracTickets for help on using tickets.