New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept non-ADS workspaces in python simpleapi #11960
Comments
@eXeC64 (2015-02-19T10:06:05): diff --git a/Code/Mantid/Framework/PythonInterface/mantid/simpleapi.py b/Code/Mantid/Framework/PythonInterface/mantid/simpleapi.py
index c85f036..bf0c7c6 100644
--- a/Code/Mantid/Framework/PythonInterface/mantid/simpleapi.py
+++ b/Code/Mantid/Framework/PythonInterface/mantid/simpleapi.py
@@ -518,18 +518,15 @@ def _set_properties(alg_object, *args, **kwargs):
# Set the properties of the algorithm.
for key in kwargs.keys():
value = kwargs[key]
if value is None:
continue
- # The correct parent/child relationship is not quite set up yet: http://trac.mantidproject.org/mantid/ticket/5157
- # ChildAlgorithms in Python are marked as children but their output is in the
- # ADS meaning we cannot just set DataItem properties by value. At the moment
- # they are just set with strings
+
if isinstance(value, _kernel.DataItem):
alg_object.setPropertyValue(key, value.name())
- else:
- alg_object.setProperty(key, value)
+
+ alg_object.setProperty(key, value)
def _create_algorithm_function(algorithm, version, _algm_object):
"""
Create a function that will set up and execute an algorithm.
The help that will be displayed is that of the most recent version. the following tests failed:
At least in the Vesuvio case, the failure seems to stem from calling Handing over to Martyn for further analysis. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you feel this is incorrect please comment to keep it alive, with a reason why. To prevent closure, e.g. for long-term planning issues, add the "Never Stale" label. |
This issue has been closed automatically. If this still affects you please re-open this issue with a comment so we can look into resolving it. |
This issue was originally TRAC 11121
If a workspace is not in the ads, it cannot be given to an algorithm using the simple api. The original reason for this seems to have been resolved by ticket http://trac.mantidproject.org/mantid/ticket/5157.
Let's see if this restriction can now be lifted.
Keywords: CORE
The text was updated successfully, but these errors were encountered: