Ticket #6763 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Fix python signature

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: major Milestone: Release 2.5
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Gesner Passos

Description

The wikimaker includes a new usage section. The lhs is manually constructed to be either a tuple or a single value if a workspace return type. However, this isn't always working out, because the code that checks whether the returned type is a workspaceproperty doesn't work for all derived workspace types in python. Therefore things are going wrong like this http://www.mantidproject.org/ConvertToDiffractionMDWorkspace (20th March 2013)

result = ConvertToMD(InputWorkspace,[MinRecursionDepth],[MaxRecursionDepth],[SplitThreshold],
[SplitInto],[Wproj],[Vproj],[Uproj],
[MaxValues],[MinValues],[LorentzCorrection],[UpdateMasks],
[PreprocDetectorsWS],[OtherDimensions],[QConversionScales],[dEAnalysisMode],
[QDimensions],[OverwriteExisting])

# -------------------------------------------------- 
# result is a tuple containing
# (OutputWorkspace)
# To access individual outputs use result[i], where i is the index of the required output.

Martyn suggests that the best way around this is to look at the name of the property and look for Workspace in the type name. While hackey, this should work.

Change History

comment:1 Changed 8 years ago by Owen Arnold

  • Status changed from new to accepted

comment:2 Changed 8 years ago by Owen Arnold

refs #6763. More tolerance on property types.

Changeset: 248e1735af677d7081cbaeb14d7630b327f72cd3

comment:3 Changed 8 years ago by Owen Arnold

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

Branch: feature/6763_signature

Tester: Please try the wikimaker out on a few algorithms with different numbers of outputs. Use the ticket description for guidance on the problem that should have been fixed.

comment:4 Changed 8 years ago by Gesner Passos

  • Status changed from verify to verifying
  • Tester set to Gesner Passos

comment:5 Changed 8 years ago by Gesner Passos

  • Status changed from verifying to reopened
  • Resolution fixed deleted

I found at least 2 Algorithms that failed:

  • CheckWorkspaceMatch
  • AlphaCalc

It is not possible to access the result as result[i] as documented.

comment:6 Changed 8 years ago by Owen Arnold

refs #6763. Fix returns non-workspace.

Changeset: 89de676d0701a1cc5fa3fa1a2bdd4f03c6d15cf0

comment:7 Changed 8 years ago by Owen Arnold

refs #6763. Fix returns non-workspace.

Changeset: 89de676d0701a1cc5fa3fa1a2bdd4f03c6d15cf0

comment:8 Changed 8 years ago by Owen Arnold

  • Status changed from reopened to accepted

comment:9 Changed 8 years ago by Owen Arnold

This is now fixed. Signatures for the algorithms highlighted as failure cases should work properly in the wikimaker.

comment:10 Changed 8 years ago by Owen Arnold

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

comment:11 Changed 8 years ago by Gesner Passos

  • Status changed from verify to verifying

comment:12 Changed 8 years ago by Owen Arnold

refs #6763. More tolerance on property types.

Changeset: 248e1735af677d7081cbaeb14d7630b327f72cd3

comment:13 Changed 8 years ago by Owen Arnold

refs #6763. Fix returns non-workspace.

Changeset: 89de676d0701a1cc5fa3fa1a2bdd4f03c6d15cf0

comment:14 Changed 8 years ago by Gesner Passos

Tested, and it solves the issue presented and also shows a good improvement for the MD related algorithms.

comment:15 Changed 8 years ago by Gesner Passos

  • Status changed from verifying to closed

comment:16 Changed 8 years ago by Owen Arnold

refs #6763. More tolerance on property types.

Changeset: 248e1735af677d7081cbaeb14d7630b327f72cd3

comment:17 Changed 8 years ago by Owen Arnold

refs #6763. Fix returns non-workspace.

Changeset: 89de676d0701a1cc5fa3fa1a2bdd4f03c6d15cf0

comment:18 Changed 8 years ago by Owen Arnold

refs #6763. More tolerance on property types.

Changeset: 248e1735af677d7081cbaeb14d7630b327f72cd3

comment:19 Changed 8 years ago by Owen Arnold

refs #6763. Fix returns non-workspace.

Changeset: 89de676d0701a1cc5fa3fa1a2bdd4f03c6d15cf0

comment:20 Changed 7 years ago by Owen Arnold

refs #6763. More tolerance on property types.

Changeset: 248e1735af677d7081cbaeb14d7630b327f72cd3

comment:21 Changed 7 years ago by Owen Arnold

refs #6763. Fix returns non-workspace.

Changeset: 89de676d0701a1cc5fa3fa1a2bdd4f03c6d15cf0

comment:22 Changed 7 years ago by Owen Arnold

refs #6763. More tolerance on property types.

Changeset: 248e1735af677d7081cbaeb14d7630b327f72cd3

comment:23 Changed 7 years ago by Owen Arnold

refs #6763. Fix returns non-workspace.

Changeset: 89de676d0701a1cc5fa3fa1a2bdd4f03c6d15cf0

comment:24 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7609

Note: See TracTickets for help on using tickets.