Skip to content

Ensure that Python declarations and Simple-ML stubs match #40

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem? Please describe.
Currently Python declarations and Simple-ML stubs can easily diverge. This can mean that Python contains public declarations that are not included in the Simple-ML stubs and that are, thus, invisible within Simple-ML. It could also mean that the Simple-ML stubs can contains declarations that have been removed in the Python API. Calling these leads to a runtime error.

Describe the solution you'd like
There should be a checker that computes the symmetric difference between stubs declarations and public Python declarations and report all those declarations as errors. Bonus: It should scaffold the missing declarations either in Python or the stubs.

Ideally it can be run locally as well as as a GitHub action. We can use the library-analyzer to extract the public API on the Python side and write a small standalone program that uses our stdlib util to parse the stub files and then list the declarations in there.

If the stubs contain something that is not on the Python side we always need to throw an error. If it's the other way around we could opt for a warning instead. Maybe something was deliberately not put into the stubs (even though it should then probably be internal in the Python package as well).

Metadata

Metadata

Assignees

No one assigned

    Labels

    dsl 🗒️Issues regarding the domain specific programming languagewontfixThis will not be worked on

    Type

    No type

    Projects

    Status

    ✔️ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions