radical-cybertools / radical.pilot

RADICAL-Pilot
http://radical-cybertools.github.io/radical-pilot/index.html
Other
54 stars 23 forks source link

Support automatic introspection of data members #2893

Closed eirrgang closed 8 months ago

eirrgang commented 1 year ago

Request

Make data structure fields more discoverable to conventional tools in one of the following ways.

If continuing to use a custom __init__(), please consider providing a ParameterSpec or typing.TypedDict specification of expected input data structure(s) and dictionary representations.

Description

For TaskDescription and other structures derived from ru.TypedDict, conventional tools that infer valid fields are often unable to provide help because the fields are generated by unconventional metaprogramming.

Adopting one of the above approaches would support static type checkers based on PEP 484 (and others), and IDE features that employ similar introspection.

There are a few different ways that software like IDEs and JupyterLab generate pop-up documentation and/or tab-completion. I don't have a good sense of which, if any, use typeshed or stub files, but all should support annotated fields listed in a class definition.

andre-merzky commented 8 months ago

We don't have the resources to support this. The ru.TypedDict approach was chosen to balance performance with features, and that balance has tradeoffs which we consider out of scope.