Ticket #2635 (closed: fixed)
Allow an algorithm to be passed as a parameter
Reported by: | Nick Draper | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | critical | Milestone: | Iteration 28 |
Component: | Mantid | Keywords: | |
Cc: | doucetm@… | Blocked By: | |
Blocking: | Tester: | Janik Zikovsky |
Description
Allow an algorithmproxy to be passed as a parameter.
This would allow the algorithm to be run by the host Algorithm.
Steps:
- Make AlgorithmProxy able to de/serialise to a string together with any parameters.
- Create an AlgorithmProperty class that handles IAlgorithms
- Create a AlgorithmHasParameter Validator
- Create an AlgorithmInheritsFrom Validator
- Write a few tests.
Change History
comment:2 Changed 10 years ago by Martyn Gigg
(In [10434]) Refs #2635. Algorithms can now stringize themselves and also construct themselves from a string. The format is AlgorithmName[.v](prop1=val1,prop2=val2,...), where the .v is optional and determines the version. Added convenience methods on the property manager to stringize itself as well.
comment:6 Changed 10 years ago by Martyn Gigg
- Status changed from accepted to verify
- Resolution set to fixed
I'm spinning point 4, "Create an AlgorithmInheritsFrom Validator", out to another ticket, #2746. It's not as simple as it sounds and not vital to this ticket being completed.
The AlgorithmProperty is in and Python can stringize algorithm objects so the bulk is done.
comment:7 Changed 10 years ago by Mathieu Doucet
- Status changed from verify to reopened
- Resolution fixed deleted
Note: we should expose the AlgorithmProperty to Python so they can be used in Python Algorithms.
comment:9 Changed 10 years ago by Mathieu Doucet
One thing to make sure of is that the AlgorithmProperty can accept an PythonAlgorithm. I don't think that's the case right now...
comment:10 Changed 10 years ago by Mathieu Doucet
comment:11 Changed 10 years ago by Mathieu Doucet
I think we are set. Note that the python API will only allow the PythonAlgorithm class to set/get algorithm properties. Algorithm properties get/setters are not exposed for C++ algorithms. This would only be useful for reduction step algorithms written in C++.
comment:12 Changed 10 years ago by Mathieu Doucet
comment:13 Changed 10 years ago by Mathieu Doucet
comment:14 Changed 10 years ago by Mathieu Doucet
comment:16 Changed 9 years ago by Martyn Gigg
- Status changed from accepted to verify
- Resolution set to fixed
comment:17 Changed 9 years ago by Owen Arnold
- Status changed from verify to verifying
- Tester set to Owen Arnold
comment:18 Changed 9 years ago by Owen Arnold
- Status changed from verifying to verify
- Tester Owen Arnold deleted
comment:19 Changed 9 years ago by Janik Zikovsky
- Status changed from verify to verifying
- Tester set to Janik Zikovsky
comment:20 Changed 9 years ago by Janik Zikovsky
comment:21 Changed 9 years ago by Janik Zikovsky
- Status changed from verifying to closed
The unit test I added satisfies me that you can also execute an algorithm property, not just get/set the property. Passes.
comment:22 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 3482