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

[Task]: Make anomalib PEP 561 compliant for mypy #1015

Closed
ORippler opened this issue Apr 12, 2023 · 2 comments · Fixed by #1038 or #1088
Closed

[Task]: Make anomalib PEP 561 compliant for mypy #1015

ORippler opened this issue Apr 12, 2023 · 2 comments · Fixed by #1038 or #1088
Assignees
Labels
Good First Issue Issues that can be picked up by someone unfamiliar with the repo and would like to contribute.

Comments

@ORippler
Copy link
Contributor

What is the motivation for this task?

When installing anomalib as a package, mypy starts to complain about missing type stubs. Seeing that anomalib is mostly (if not fully) typed, it would be nice to make the package PEP561 compliant (currently I ignore anomalib for mypy)

Describe the solution you'd like

Make the package PEP 561 compliant. Could potentially be as easy as adding a py.typed at the root of the shipped package directory. Note that I am not an expert in building/shipping python packages, so I might also be wrong on this

Additional context

https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages

@samet-akcay samet-akcay added Good First Issue Issues that can be picked up by someone unfamiliar with the repo and would like to contribute. Hackathon and removed Hackathon labels Apr 17, 2023
@WenjingKangIntel
Copy link
Contributor

anomalib_Team3 working on this.

WenjingKangIntel added a commit to WenjingKangIntel/anomalib that referenced this issue Apr 26, 2023
This enables PEP 561 compliance for mypy via adding py.typed and MANIFEST.in.

Fixes openvinotoolkit#1015

Signed-off-by: Yuan, Jinjie <[email protected]>
Signed-off-by: Kang Wenjing <[email protected]>
samet-akcay pushed a commit that referenced this issue Apr 27, 2023
[Task: 1015] Make anomalib PEP 561 compliant for mypy

This enables PEP 561 compliance for mypy via adding py.typed and MANIFEST.in.

Fixes #1015

Signed-off-by: Yuan, Jinjie <[email protected]>
Signed-off-by: Kang Wenjing <[email protected]>
@ORippler
Copy link
Contributor Author

ORippler commented May 11, 2023

I just did an install of anomalib==0.5.0 from pypi via pip and py.typed was not present in the anomalib folder, so it's not yet fully compliant.

@WenjingKangIntel WenjingKangIntel mentioned this issue May 11, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Issues that can be picked up by someone unfamiliar with the repo and would like to contribute.
Projects
None yet
3 participants