Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add py.typed file in `/nowcasting_datamodel #141

Open
simlmx opened this issue Jan 25, 2023 · 0 comments
Open

Add py.typed file in `/nowcasting_datamodel #141

simlmx opened this issue Jan 25, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@simlmx
Copy link

simlmx commented Jan 25, 2023

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.

@simlmx simlmx added the enhancement New feature or request label Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant