Pycharm MicroPython plugin

Hi all
Hope I’m in the right subforum.

I just saw that pycharm offers a micropython plugin.
I really like working with pycharm (full featured ide) and wouldn’t mind coding my OpenMV Cam with it.

Has anybody found a way to get it to work with the OpenMV Cam?

Another question i have is, where can i find the diffrent built in modules (sensor, machine, pyb)?
I would like to add them to my “include” in my pycharm project so that pycharm can provide code complition suggestions.

Thanks

Hi, the OpenMV IDE automatically reloads whatever script you are working on if it changes. Just save the python file on your hardware drive and have both IDEs open. OpenMV IDE will detect changes and reload the script (it will prompt each time).

The built-in modules are in C. They don’t have any scannable python code. OpenMV IDE pulls the built-in methods from our documentation. I don’t think pycharm can parse our documentation. However, you can probably make a python script to parse our documentation and spit out a python file with no code but with headers that pycharm can use. This would be great for the community.

Hi kwagyeman

Thanks for the quick reply. That’s what i have been doing.

Any pointers on how i can gets started on that? or where i can download the docs?
I’m not saying i have the time to do this, but i might be able to make the time

The docs are here:

https://docs.openmv.io/_sources/library/omv.image.rst.txt

You just go to docs and then click view page source.

Hi everyone

I have now hacked together the following script.
It seems to work for my usecase.

The script request openMVs index page, parses the file with regex for the *.rst file names(?) and then gets those and looks for modules, functions and classes.
It then creats *.py files with those declarations.
So it’s just looks, no functionality behind it.


the pycharm project:
https://github.com/jameskiki/OpenMVDocParser
(oh and please don’t look into the code, just run it XD)

Edit: i have already found a problem with it
Edit2: I fixt it now, but i’m still missing the return values, do you have those listed somwhere in a table or so, bc. i have no clue how to do NLP