Further auto-completion testing on wing in debug mode for aiida package.
Hi,
This is some further tests for using wing to give auto-completion suggestions for aiida package in debug mode.
For testing it, you should still from within virtualbox vm described here: https://ask.wingware.com/question/182...
from aiida import load_profile
load_profile()
from aiida.orm import load_node
node=load_node('be52abbf-8e3a-4e64-afc0-cb6fd471ad94')
for i in dir(node.inputs):
if not i.startswith('_'):
print(i)
The above code snippet should gives the following output:
code
kpoints
parameters
parent_folder
pseudos__As
pseudos__Ga
structure
But when I enable the debug mode, I cannot find auto-completions for them. For example, when I input node.inputs.c<tab>
, wing won't give code
as one of the candidates.
Any hints for this problem?
Regards
Comments
I haven't been able to reproduce (downloading the virtualbox image is taking hours), but could you try checking Allow Calls in Data Inspection on the Debugger: Data Inspection page of the Preferences dialog? This will allow __dir__() methods to be called when getting symbols for autocomplete lists. It's off by default because a __dir__() method could potentially be buggy and you don't want the debugger displaying incorrect info when you're trying to debug something.
Try this directly in the host's aiida without using virtualbox vm:
$ curl -L 'https://github.com/aiidateam/aiida-core/blob/develop/tests/fixtures/calcjob/arithmetic.add.aiida?raw=true' -o arithmetic.add.aiida
$ verdi import arithmetic.add.aiida
For test, revise the code snippet given by me as following:
change
node=load_node('be52abbf-8e3a-4e64-afc0-cb6fd471ad94')
to
node= load_node('9d3fda4f-6782-4441-a276-b8965aa3f97f')
Side note, I've enable the preference
Allow Calls in Data Inspection
, but has no effect on this problem. Another note, I also noted that even in ipython, it also not gives suggestions on these names.Did you try changing your Allow Calls in Data Inspection preference? I think there's a good chance that it will fix your problem. I did get the image to download and will be looking at it tomorrow.
I unchecked the preference
Allow Calls in Data Inspection
, now only the names begin with_
are suggested. But it's obviously then I don't want these at all. I want to obtain the suggestions starting without_
.