Ignite: Setup mypy type checking in CI

Created on 10 Sep 2020  Â·  6Comments  Â·  Source: pytorch/ignite

🚀 Feature

Idea is to setup type checking of the codebase with mypy with our Travis CI (here) :

mypy --config-file mypy.ini
  • At the first iteration we can ignore most of the errors with mypy.ini. Example of mypy.ini. => done #1296

  • For other iterations, let's set ignore_errors = False for a module (e.g. [mypy-ignite.utils.*]) (see mypy.ini) and fix mypy errors.

For Hacktoberfest contributors, feel free to ask questions for details if any and say that you would like to tackle the issue.
Please, take a look at CONTRIBUTING guide.

Hacktoberfest enhancement good first issue help wanted

All 6 comments

Hi guys, I'm interested to do this task! :smile:

Hi @kenjihiraoka thanks for your interest on working on this issue :)

I can assign it to you and you can start working on that. As the issue may be large, feel free to submit several PRs.

PS: Notes for Hacktoferfest

September is Preptember – a full month for maintainers to groom your repositories and for contributors to learn about making quality pull requests.

Contributions during September don't count toward Hacktoberfest. Only pull requests submitted between October 1st to 31st will count.

@vfdev-5 so the ideia is to add the mypy check inside of Lint check stage, right? Or I create a new one just for Mypy?
And by now, can I skip all errors?

so the ideia is to add the mypy check inside of Lint check stage, right?

@kenjihiraoka that's right.

And by now, can I skip all errors?

Let's see which files are directly passing and ignore for others.

@kenjihiraoka Can I close this issue ?

Currently, mypy ignores all errors for all modules. We have to rework our typing such that mypy checks the code.
We can close this issue and create another one to make mypy pass on some of ignite's core modules like utils etc

Was this page helpful?
0 / 5 - 0 ratings

Related issues

milongo picture milongo  Â·  3Comments

karfly picture karfly  Â·  4Comments

Sudy picture Sudy  Â·  4Comments

TheCodez picture TheCodez  Â·  3Comments

Aiden-Jeon picture Aiden-Jeon  Â·  3Comments