Ticket #4311 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Python interpreter: no auto-complete for some qtiplot types

Reported by: Janik Zikovsky Owned by: Russell Taylor
Priority: major Milestone: Release 3.0
Component: MantidPlot Keywords:
Cc: Blocked By:
Blocking: Tester: Gesner Passos

Description (last modified by Russell Taylor) (diff)

Make plot objects using python:

g = plotSpectrum('summed',0, True)
l = g.activeLayer()

and the "g" and "l" objects get no auto-completion hints. Would this be fixed with ipython (see #4273).

Change History

comment:1 Changed 9 years ago by Russell Taylor

  • Status changed from new to assigned
  • Owner changed from Anyone to Russell Taylor
  • Component changed from Mantid to MantidPlot

The short answer is yes - IPython should have stupendous auto-completion capabilities!

However, full IPython integration into MantidPlot is likely to be some way away. In the meantime it's going to be all-change with the python exposure of MantidPlot features so I'll try to address this as part of that.

It looks like we're missing a trick by not using the '-a' command-line option when running sip (http://www.riverbankcomputing.co.uk/static/Docs/sip4/command_line.html).

comment:2 Changed 9 years ago by Russell Taylor

Also look into enabling the use of keyword arguments for sip-exposed functions.

comment:3 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 32 to Iteration 33

Moved to iteration 33 at iteration 32 code freeze

comment:4 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.1 to Release 2.2

Moved at end of release 2.1

comment:5 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.2 to Release 2.3

Moved at the end of release 2.2

comment:6 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.3 to Release 2.4

Moved to milestone 2.4

comment:7 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.4 to Release 2.5

Moved at the code freeze for release 2.4

comment:8 Changed 8 years ago by Russell Taylor

  • Milestone changed from Release 2.5 to Release 2.6

Bump some tickets that I certainly won't be looking at in this iteration.

comment:9 Changed 7 years ago by Nick Draper

  • Status changed from assigned to new

comment:10 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.6 to Backlog

Moved to backlog at the code freeze for R2.6

comment:11 Changed 7 years ago by Russell Taylor

  • Cc russell.taylor@… removed
  • type changed from enhancement to defect
  • Description modified (diff)
  • Milestone changed from Backlog to Release 3.0

comment:13 Changed 7 years ago by Russell Taylor

  • Status changed from new to inprogress

Re #4311. Return the methods of the proxied object.

This helps tab-completion in IPython return the methods that we want to see.

Changeset: 25651deb8b8e08a84cf528f1dd46bafee2afc67a

comment:14 Changed 7 years ago by Russell Taylor

Re #4311. Return the docstring of the proxied object.

This helps the correct documentation string show up in the IPython console. I've also turned on automatic docstring generation in our sip call.

Changeset: 9d52f566b42108c4d59cab9f00c8fee1675d9b8c

comment:15 Changed 7 years ago by Russell Taylor

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

This will do for now - enhancements are in #8210 and #8211. Tester - In the IPython interpreter, check that the example in the description now gives completion options if you enter "object." then hit TAB and a pop-up docstring when you type the opening parenthesis of a method.

comment:16 Changed 7 years ago by Nick Draper

  • Status changed from verify to verifying
  • Tester set to Nick Draper

comment:17 Changed 7 years ago by Nick Draper

  • Status changed from verifying to verify
  • Tester Nick Draper deleted

comment:18 Changed 7 years ago by Russell Taylor

Re #4311. Return the methods of the proxied object.

This helps tab-completion in IPython return the methods that we want to see.

Changeset: c666845e5f652957129b08eb339ea0ffe27e7dd3

comment:19 Changed 7 years ago by Russell Taylor

Re #4311. Return the docstring of the proxied object.

This helps the correct documentation string show up in the IPython console. I've also turned on automatic docstring generation in our sip call.

Changeset: 856d3adf368d73d8d788c194e0d2d04ef2d20658

comment:20 Changed 7 years ago by Russell Taylor

I rebased this onto master, just to check that things are looking good after the IPython merge (they are). That's the reason for the 'extra' commits above.

comment:21 Changed 7 years ago by Gesner Passos

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

comment:22 Changed 7 years ago by Gesner Passos

Now we can see the auto-completion by using the tab key. It works fine.

comment:23 Changed 7 years ago by Gesner Passos

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/4311_mantidplot_python_completion'

Full changeset: 5c74762e7eef9679fb928828d4d6c81ac63ec679

comment:24 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5158

Note: See TracTickets for help on using tickets.