Ticket #6233 (closed: fixed)
Algorithm.fromString doesn't work for PropertyArray
Reported by: | Mathieu Doucet | Owned by: | Mathieu Doucet |
---|---|---|---|
Priority: | major | Milestone: | Release 2.4 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Stuart Campbell |
Description
PropertyArray are not processed properly by the fromString() method of the Algorithm class. This is due to the coma used for separating both the entries in the array AND the properties in the string representation of the algorithm.
Example:
ToyAlgorithm.2(prop1=val1,prop2=8,prop3=10.0,Binning=0.2,0.2,1.4)
Change History
comment:2 Changed 8 years ago by Mathieu Doucet
Re #6233 add unit tests
Changeset: be24626ddaa6f120f9c591ab5924876241ae2fb2
comment:3 Changed 8 years ago by Mathieu Doucet
Revert "Re #6233 fix Algorithm.fromString"
This reverts commit a8a86915eaed20c4a2a2b88f942a4877997bd1bf.
Changeset: 7ad8f422021dd3fd92a32c033f32bb0b7753be62
comment:4 Changed 8 years ago by Mathieu Doucet
Revert "Re #6233 add unit tests"
This reverts commit be24626ddaa6f120f9c591ab5924876241ae2fb2.
Changeset: 9520b77992f6f5c89ff3c7bf2b2bba487f547a31
comment:5 Changed 8 years ago by Mathieu Doucet
Re #6233 fix Algorithm.fromString
This reverts commit 7ad8f422021dd3fd92a32c033f32bb0b7753be62.
Changeset: d0c49bd05a457349bcb10f3675e1685a46970b6c
comment:6 Changed 8 years ago by Mathieu Doucet
Re #6233 add unit tests
This reverts commit 9520b77992f6f5c89ff3c7bf2b2bba487f547a31.
Changeset: a97a8f8315ac819d80a2d6e65b39df601b5b392a
comment:7 Changed 8 years ago by Mathieu Doucet
Revert "Re #6233 fix Algorithm.fromString"
This reverts commit d0c49bd05a457349bcb10f3675e1685a46970b6c.
Changeset: b23d2665816eb38838d6f8715eb3df9f45f82907
comment:8 Changed 8 years ago by Mathieu Doucet
Re #6233 Trying this again...
Changeset: 9800cb91b618067581122e7f20ec29809415b616
comment:9 Changed 8 years ago by Mathieu Doucet
Re #6233 Deal with edge case
Changeset: ea132455e7a5b823b9d424e16ee8dc5874312f7d
comment:10 Changed 8 years ago by Mathieu Doucet
Re #6233 Add unit tests
Changeset: 248700b366968e81e353e6d3cc539e5578dc88b7
comment:11 Changed 8 years ago by Mathieu Doucet
- Status changed from new to accepted
To test, try something along those lines. Make sure that you can also set other properties at the same time so that comma appear at various places in the string representation of the algorithm. You should do this to exercise the regex in the fromString() method.
alg = AlgorithmManager.createUnmanaged('Rebin') alg.initialize() alg.setProperty("Params","0,0.1,1.0") alg_str = str(alg) print alg_str alg2 = Algorithm.fromString(alg_str) print alg2.getPropertyValue("Params")
comment:12 Changed 8 years ago by Mathieu Doucet
- Status changed from accepted to verify
- Resolution set to fixed
comment:13 Changed 8 years ago by Mathieu Doucet
Re #6233 fix Algorithm.fromString
Changeset: a8a86915eaed20c4a2a2b88f942a4877997bd1bf
comment:14 Changed 8 years ago by Mathieu Doucet
Re #6233 add unit tests
Changeset: be24626ddaa6f120f9c591ab5924876241ae2fb2
comment:15 Changed 8 years ago by Mathieu Doucet
Revert "Re #6233 fix Algorithm.fromString"
This reverts commit a8a86915eaed20c4a2a2b88f942a4877997bd1bf.
Changeset: 7ad8f422021dd3fd92a32c033f32bb0b7753be62
comment:16 Changed 8 years ago by Mathieu Doucet
Revert "Re #6233 add unit tests"
This reverts commit be24626ddaa6f120f9c591ab5924876241ae2fb2.
Changeset: 9520b77992f6f5c89ff3c7bf2b2bba487f547a31
comment:17 Changed 8 years ago by Mathieu Doucet
Re #6233 fix Algorithm.fromString
This reverts commit 7ad8f422021dd3fd92a32c033f32bb0b7753be62.
Changeset: d0c49bd05a457349bcb10f3675e1685a46970b6c
comment:18 Changed 8 years ago by Mathieu Doucet
Re #6233 add unit tests
This reverts commit 9520b77992f6f5c89ff3c7bf2b2bba487f547a31.
Changeset: a97a8f8315ac819d80a2d6e65b39df601b5b392a
comment:19 Changed 8 years ago by Mathieu Doucet
Revert "Re #6233 fix Algorithm.fromString"
This reverts commit d0c49bd05a457349bcb10f3675e1685a46970b6c.
Changeset: b23d2665816eb38838d6f8715eb3df9f45f82907
comment:20 Changed 8 years ago by Mathieu Doucet
Re #6233 Trying this again...
Changeset: 9800cb91b618067581122e7f20ec29809415b616
comment:21 Changed 8 years ago by Mathieu Doucet
Re #6233 Deal with edge case
Changeset: ea132455e7a5b823b9d424e16ee8dc5874312f7d
comment:22 Changed 8 years ago by Mathieu Doucet
Re #6233 Add unit tests
Changeset: 248700b366968e81e353e6d3cc539e5578dc88b7
comment:23 Changed 8 years ago by Stuart Campbell
- Status changed from verify to verifying
- Tester set to Stuart Campbell
comment:25 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 7079
Re #6233 fix Algorithm.fromString