Orekit python wrapper with sub files

Hi,

The orekit python wrapper on conda-forge (v11.0.1 build 1) has been now updated with a set of “python stub files”. These are files that contains type hints that are used by different tools such as IDE vscode and pycharm. These are not affecting runtime.

With these one can get the javadoc as hints, and also the tracking of types are improved.

The stubs are generated with the stubgenj tool from cern. Note that this is based on jpype and does not take into some wrapping aspects like that sometimes one needs to cast the types.

Hi Petrus,

I just gave it a try in Pycharm, it works like a charm, thanks a lot!

Hi Petrus,

Thanks, I also tried it in Pycharm and it fixed most of the false positive errors in my code.

However there is a syntax error in the org-stubs\orekit\frames_init_.pyi file, line 10:

import org.orekit.frames.class-use

Mypy then fails to import the file and stops its check.

Hi, yes that isn’t a valid module name in python… It is automagically generated, will see if I can figure out what is going on.

An updated version of stubgenj is used now, package iis on the conda, correcting this class-use issue.

Yes I can confirm that the issue is fixed on my side, thanks !

It seems that the python-side classes and methods are not included in the type stubs, like org.orekit.propagation.sampling.PythonOrekitFixedStepHandler and orekit.initVM(). It’s not blocking, the existing type stubs are already very useful, but this could be a nice addition for a future update if you have the time.