Ticket #10030 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Add ParameterMap diff method

Reported by: Anders Markvardsen Owned by: Anders Markvardsen
Priority: major Milestone: Release 3.3
Component: Framework Keywords: Maintenance
Cc: Blocked By:
Blocking: Tester: Wenduo Zhou

Description (last modified by Anders Markvardsen) (diff)

At the moment there is no method to help with understanding why two maps are different.

Add method to help with this.

(Note simply outputting the entire map for RHS and LHS I found useless when the maps are too big)

Change History

comment:1 Changed 6 years ago by Martyn Gigg

  • Status changed from new to assigned

We need to be careful of performance here as that method can already be quite slow for big maps. We could consider adding a separate method such as something like

const std::string diff(const ParameterMap & other)

that would print out a nicer representation of the differences and then could only be called once a quick check with == is done.

comment:2 Changed 6 years ago by Anders Markvardsen

  • Status changed from assigned to inprogress

Added diff method to parametermap. re #10030

Changeset: ce7f743fd0b2de2f018162cf33f1521190801731

comment:3 Changed 6 years ago by Anders Markvardsen

  • Description modified (diff)
  • Summary changed from Better debug information in ParameterMap operator== method to Add ParameterMap diff method

comment:4 Changed 6 years ago by Anders Markvardsen

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

To tester:

There are several was you can test this.

  1. One see unit test and code
  1. e.g. follow the following steps in mantidplot

a) Set logging to debug

b) Load from AutoTestdata a LOQ dataset

c) Load the same data again but this time rename is to something different

d) Edit LOQ_Parameters.xml in instrument folder

e) Run LoadParameterFile against say the workspace created in c)

f) Run CheckWorkspacesMatch where ensure that CheckInstrument is ticked

You should see debug logging telling you about the difference between the maps

comment:5 Changed 6 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester set to Wenduo Zhou

comment:6 Changed 6 years ago by Wenduo Zhou

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/10030_diff_param_map'

Full changeset: 614962042a9ebc532a4a274dcdc19c46992a279e

comment:7 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10872

Note: See TracTickets for help on using tickets.