Jpype wrapper stubs

Hi Petrus / all,
I can’t seem to get code autocomplete in the Jpype wrapper to work for autocompletion using VScode. It works if I import in a Jupyter notebook and start the JVM, but I thought it should work just writing a script since the library has all the stubs generated. Any ideas? Thanks!

Hi,

Autocompletion for orekit_jpype in VSCode works on my machine, although a few docstrings are missing (in this case, the stubs only contain the method name and input/output types).

What OS, Python version do you have, and what environment do you use? A venv?

The following stub-only packages should be available in the lib/python3.12/site-packages folder of your venv, they are installed together with orekit_jpype after running pip install orekit_jpype:

  • java-stubs
  • org-stubs, containing the hipparchus and orekit stubs

Cheers
Clément

Hi Clément,
Thanks. I’m on MacOS 14 using Python 3.9, orekit-jpype=12.1.2 with a venv managed by Poetry. I have my Poetry venv as my selected interpreter in VSCode and I verified that java-stubs, org-stubs, hipparchus-stubs are in the venv’s site-packages directory, but I don’t see orekit-stubs. However, even the org stubs don’t seem to be working for me (org.hipparchus gives nothing on autocomplete, for example).

I also tried a fresh plain Python venv with only orekit-jpype installed and have the same behavior.