astropy-APEs
astropy-APEs copied to clipboard
Create an APE that describes the extent to which Astropy should be typed and the process for doing so
There has been a fantastic discussion in https://github.com/astropy/astropy/issues/15170 about the adding type hint annotations to Astropy. Given the magnitude of this change, we would probably benefit from an APE that answers questions like:
- To what extent should Astropy be typed? Should we strive for mypy regular mode or aim for mypy strict mode?
- How do we deal with existing mypy errors?
- What is the process for adding type hint annotations to Astropy?
- How would we go about adding mypy to the suite of continuous integration checks?
- How do we ensure that new code is typed?
- Should we require mypy strict mode for all new code or modules?
- How do we deal with dynamically created content? For example, do we add a
.pyitype stub file for the individual units inastropy.units?
We could also add some helpful information, like which tools we could start off using. We probably don't want to be overly prescriptive, since the tooling landscape will probably change significantly in a few years.
For the moment, I'd suggest continuing the general discussion about typing in https://github.com/astropy/astropy/issues/15170 to keep it all in one place.
We could perhaps use this issue to discuss things that are more specific to writing an APE.