Skip to content
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

Closed
eXeC64 opened this issue Feb 19, 2015 · 3 comments
Closed

Accept non-ADS workspaces in python simpleapi #11960

eXeC64 opened this issue Feb 19, 2015 · 3 comments
Assignees
Labels
Extra Attention Testers and Gate keepers should pay extra attention as this affects core aspects. Stale This label is automatically applied to issues that are automatically closed by the stale bot

Comments

@eXeC64
Copy link
Contributor

eXeC64 commented Feb 19, 2015

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

@eXeC64
Copy link
Contributor Author

eXeC64 commented Feb 19, 2015

@eXeC64 (2015-02-19T10:06:05):
After applying this patch:

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:

PythonAlgorithms_MolDynTest
PythonAlgorithms_VesuvioResolutionTest

At least in the Vesuvio case, the failure seems to stem from calling setPropertyValue and then setProperty.

Handing over to Martyn for further analysis.

@eXeC64 eXeC64 added Python Extra Attention Testers and Gate keepers should pay extra attention as this affects core aspects. labels Jun 3, 2015
@eXeC64 eXeC64 added this to the Release 3.5 milestone Jun 3, 2015
@martyngigg martyngigg modified the milestones: Release 3.6, Release 3.5 Sep 7, 2015
@NickDraper NickDraper modified the milestones: Release 3.6, Release 3.7 Jan 22, 2016
@NickDraper NickDraper modified the milestones: Release 3.7, Release 3.8 May 20, 2016
@NickDraper NickDraper modified the milestones: Release 3.8, Release 3.9 Oct 3, 2016
@NickDraper NickDraper modified the milestones: Release 3.9, Temporary Holding Oct 14, 2016
@NickDraper NickDraper removed this from the Temporary Holding milestone Oct 3, 2017
@gemmaguest gemmaguest removed the Python label Jul 29, 2020
@stale
Copy link

stale bot commented Feb 22, 2021

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.

@stale stale bot added the Stale This label is automatically applied to issues that are automatically closed by the stale bot label Feb 22, 2021
@stale
Copy link

stale bot commented Mar 1, 2021

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.

@stale stale bot closed this as completed Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Extra Attention Testers and Gate keepers should pay extra attention as this affects core aspects. Stale This label is automatically applied to issues that are automatically closed by the stale bot
Projects
None yet
Development

No branches or pull requests

4 participants