ci(mypy): add mypy check and adjust code for types#439
ci(mypy): add mypy check and adjust code for types#439d33bs merged 11 commits intocytomining:mainfrom
Conversation
d517035 to
77d1bb4
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #439 +/- ##
==========================================
+ Coverage 94.72% 94.73% +0.01%
==========================================
Files 56 57 +1
Lines 3147 3155 +8
==========================================
+ Hits 2981 2989 +8
Misses 166 166
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
77d1bb4 to
7f6ea31
Compare
7f6ea31 to
8478dbd
Compare
gwaybio
left a comment
There was a problem hiding this comment.
LGTM, but I trust Ken more to give final approval
kenibrewer
left a comment
There was a problem hiding this comment.
This is a surprisingly low number of changes for enabling mypy in a repo. This might be because of the ignore_missing_imports and allow_redefinitions config options. What was the change burden like for turning those options off?
|
Thanks @gwaybio and @kenibrewer for the reviews.
I'm not sure, but I wonder if this has to do with the low amount of type hinting alongside compatibility with inferred types. Could be useful to make a more focused effort towards adding type hints throughout.
When I looked here I noticed we no longer needed the |
|
This is now ready for another look when there's a moment @gwaybio and @kenibrewer . I've added more changes to include type stubs where reasonable. Many packages used by Generally I found that it'd be healthy to explore alternative type checkers in the future, especially |
kenibrewer
left a comment
There was a problem hiding this comment.
LGTM too! Thanks for looking into the extra imports
|
Ready to merge @d33bs ! |
|
Thanks @gwaybio and @kenibrewer for your reviews! I double checked from |
Description
This PR adds a check through GitHub Actions for mypy in order to make sure Python types align with certain standards within pycytominer. I've also made some adjustments to the code in order to pass mypy checks.
Closes #437
What is the nature of your change?
Checklist
Please ensure that all boxes are checked before indicating that a pull request is ready for review.
📚 Documentation preview 📚: https://pycytominer--439.org.readthedocs.build/en/439/