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

partial auto completion when coding #6252

Open
konosubakonoakua opened this issue Jul 16, 2024 · 6 comments
Open

partial auto completion when coding #6252

konosubakonoakua opened this issue Jul 16, 2024 · 6 comments

Comments

@konosubakonoakua
Copy link
Contributor

Bug report template:

For now, auto-completion partially works with LSP server (e.g. vscode), I can only see a little bit of method in the completion menu.
But, if I execute in ipython, then I can get the fulllists of methods

Steps to reproduce

  1. coding with vscode
  2. create instance for instrument class e.g. rigol_dg4000 : RigolDG4000
  3. type rigol_dg4000. to trigger the completion menu

Expected behaviour

list all possible methods

Actual behaviour

only partial of methods show up

System

It would be helpful to provide such information:

operating system

If you are using a released version of qcodes (recommended):
qcodes version : 0.45.0

@konosubakonoakua
Copy link
Contributor Author

konosubakonoakua commented Jul 16, 2024

maybe it's because this lib designed with adding parameter on the fly, I cannot get full list of methods until it's running.

@konosubakonoakua
Copy link
Contributor Author

any workaround for this?

@konosubakonoakua
Copy link
Contributor Author

can we provide python stubs lib like pyqt?

@konosubakonoakua
Copy link
Contributor Author

or at least provide API docs in official docs here: https://microsoft.github.io/Qcodes/drivers_api/Rigol.html#qcodes.instrument_drivers.rigol.RigolDG4000

@jenshnielsen
Copy link
Collaborator

@konosubakonoakua This is indeed because parameters / instrument modules / channel tuples are dynamically added to the instruments. In 0.46.0 nearly all parameters on instruments in qcodes were changed to be statically defined. It is the intension that the same will happen for instrument modules and channel tuples, however this is a significant amount of work so this may take some time.

If you have instrument drivers outside qcodes that you would like to update qcodes ships with a tool to enable this.
This tool is a CLI tool called qcodes-refactor

@konosubakonoakua
Copy link
Contributor Author

Ty :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants