Options for python code completion/hinting and navigation #1547
-
I am developing with IDAES in VS Code. It appears that there is limited ability to use features such as intellisense or navigate to class definitions easily. This seems to come from two main things:
So far, I've been resorting to searching through the source code to find how something works. Is there any method for easier development in an IDE that I am missing? For example, the CONFIG objects have doc strings, but it appears this is mainly for the online documentation. Any information on best practices for development environment would be helpful. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Thank you for posting on the Discussion! One thing I need to do when using VS Code (including packages besides IDAES) is ensure I am loading the correct conda environment. In addition to looking at the source code, I find the document (readthedocs) and examples helpful. |
Beta Was this translation helpful? Give feedback.
-
As you noticed, (2) is a design pattern inherited from Pyomo. The advantage is that most input validation is automated and we can clearly show users which options are allowed for a field. (1) is another design pattern inherited from Pyomo to automate the generation of the "diamond" class structure that allows us to create indexed and scalar varieties of the same class with a single declaration. Unfortunately, I don't have a ready made solution. Hopefully someone from Pyomo, like @blnicho or @jsiirola can answer your question. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot @aspitarl for bringing this up.
|
Beta Was this translation helpful? Give feedback.
Thanks a lot @aspitarl for bringing this up.
@declare_process_block_class
, but due to backward compatibility and limited available resources, it is unlikely that the API will change to a more static-analysis-friendly one anytime soon.pyi
) that can be used to supply information to IDEs without chan…