Skip to content

Add py.typed file in `/nowcasting_datamodel #141

@simlmx

Description

@simlmx

nowcasting_datamodel is typed (to some extent), but when used as a dependency, the types are ignored by mypy unless a py.typed file is provided (See https://peps.python.org/pep-0561/).

Context

We use nowcasting_datamodel as a dependency in pv-site-production and it would be nice for mypy to be able to use the types from nowcasting_datamodel.
It would be useful for any other package depending on nowcasting_datamodel that wants to use mypy.

Possible Implementation

Add file /nowcasting_datamodel/py.typed

Add

 package_data = {
        'nowcasting_datamodel': ['nowcasting_datamodel/py.typed'],
}

to /setup.py.

Example of implementation in pv-site-prediction but with poetry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions