Ticket #1591 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Selecting algorithm versions from python

Reported by: Peter Peterson Owned by: Martyn Gigg
Priority: critical Milestone: Iteration 29
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Roman Tolchenov

Description

Add an additional keyword argument to all algorithms in python (version=-1) which allows the caller to specify which version of the algorithm will be run. The underlying C++ has this capability, but it is not exposed to python.

One hiccup to this is the fact that the help documentation is only available for the latest version of the algorithms.

Change History

comment:1 Changed 10 years ago by Nick Draper

  • Status changed from new to assigned
  • Owner set to Martyn Gigg
  • Component set to Mantid

comment:2 Changed 10 years ago by Nick Draper

  • Milestone changed from Iteration 26 to Iteration 27

Bulk move of tickets to iteration 27, if your ticket is essential for Iteration 26 then move it back.

comment:3 Changed 10 years ago by Nick Draper

  • Milestone changed from Iteration 27 to Iteration 28

Bulk move of tickets at the end of iteration 27

comment:4 Changed 10 years ago by Nick Draper

  • Priority changed from minor to critical

Time to get this done!

comment:5 Changed 10 years ago by Martyn Gigg

  • Status changed from assigned to accepted

comment:6 Changed 10 years ago by Martyn Gigg

(In [10131]) Refs #1591. Exported overloaded version of createAlgorithm to Python.

comment:7 Changed 10 years ago by Martyn Gigg

(In [10163]) Re #1591. Added 'Version' keyword to the mantid simple API calls. It defaults to -1 indicating the highest version.\nUpdated Ubuntu package list which was slightly wrong.\nMinor fix to sum load_run function in shared module. Refs #1762

comment:8 Changed 10 years ago by Martyn Gigg

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

(In [10174]) Fixes #1591. Included information about properties that don't exist in all versions of an algorithm in the Python help. Also added some helper functions to the AlgorithmFactory to make this eaiser.

comment:9 Changed 9 years ago by Michael Whitty

  • Status changed from verify to verifying
  • Tester set to Michael Whitty

comment:10 Changed 9 years ago by Michael Whitty

  • Status changed from verifying to reopened
  • Resolution fixed deleted

For algorithms where the latest version includes parameters not in older versions, this does not work. For example,

>>> LoadRaw(Filename='IRS21360', OutputWorkspace='IRS21360', Version=1)
"AttributeError on line 1: "Unknown property "LoadLogFiles" for LoadRaw version 1" in file 'MantidFramework.py' at line 793"

Similar things happen with other algorithms.

comment:11 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 28 to Iteration 29

Bulk move of tickets at the end of iteration 28

comment:12 Changed 9 years ago by Mathieu Doucet

(In [12563]) Fix problem with Version parameter of mantidsimple. Re #1591

comment:13 Changed 9 years ago by Mathieu Doucet

(In [12564]) Cleaning up the algorithm version number handling in Python now that we have a new mantidsimple. The existence of a version 1 is no longer a requirement. Re #1591

comment:14 Changed 9 years ago by Martyn Gigg

  • Status changed from reopened to accepted

comment:15 Changed 9 years ago by Martyn Gigg

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

comment:16 Changed 9 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester changed from Michael Whitty to Roman Tolchenov

comment:17 Changed 9 years ago by Roman Tolchenov

  • Status changed from verifying to closed

comment:18 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2438

Note: See TracTickets for help on using tickets.