Enable type checking and adding typing_copilot to dev/CI environment
See original GitHub issueThis is to help track and discuss adding typing_copilot as a dev dependency, and as part of the CI for arviz.
TL;DR
We add type checking to pull request checks, and another tool to enforce that our type checking is only getting stronger.
Slightly longer
This is a discussion over whether we want to do two things:
- Add a type check step to CI
- Help migrate to this using
typing_copilot
I’ve sketched some possible wins and losses as I see them, and I’m tagging @obi1kenobi (author of typing_copilot
) who might be able to help us think through whether this makes sense. Note that he has already submitted #1397, #1398, #1491, #1492, #1493, and #1494. @OriolAbril and @obi1kenobi have some great conversations in there about what is going on, and what the benefits are.
The general idea of typing_copilot
is that it checks your mypy configuration against the amount of checking you’ve already done, and will tighten the config file, if possible. To me, it seems like a no-brainer that if we decide type checking is a good idea, to use this.
Possible wins:
- Strong typing helps downstream users and maintainers
- Find existing bugs
- Extra layer of testing and compatibility (especially for arviz, which may have contributors for a specific library, unaware of conventions/return types elsewhere in the codebase)
Possible losses:
- Higher threshold for contributing / maintainers may need to get more familiar with typing to help contributors
- More noise during merges
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Do it 😄
My initial thought, for what it is worth, is that we aim to get this in after the next release, and give it a test run. If nothing else, I bet the experience of a maturing code base adding typing will be an interesting experiment, and we’ll all learn something. It also seems easy to get rid of.