Is your feature request related to a problem? Please describe.
I have been exploring the codebase and noticed that orbit/utils/ has no type annotations across most of its modules (the only exception is logger.py). As someone trying to contribute, I found myself constantly jumping between files to figure out what types functions expect and return, especially for the NumPy/Pandas-heavy ones.
Describe the solution you'd like
Add PEP 484 type annotations to the public functions in orbit/utils/. I did a quick audit and found 28 functions across 8 files missing annotations. I would like to contribute these as a series of small PRs, starting with general.py.
Approach I would follow:
- Python 3.9+ built-in generics (
list[str] not List[str])
from __future__ import annotations for the | union syntax on Python 3.9
- no logic changes whatsoever, annotations only
Describe alternatives you've considered
just documenting types in docstrings but that doesn't help with static analysis or IDE support, which is half the value here.
Additional context
im happy to start small with just general.py and adjust my approach based on feedback before going further.
Is your feature request related to a problem? Please describe.
I have been exploring the codebase and noticed that
orbit/utils/has no type annotations across most of its modules (the only exception islogger.py). As someone trying to contribute, I found myself constantly jumping between files to figure out what types functions expect and return, especially for the NumPy/Pandas-heavy ones.Describe the solution you'd like
Add PEP 484 type annotations to the public functions in
orbit/utils/. I did a quick audit and found 28 functions across 8 files missing annotations. I would like to contribute these as a series of small PRs, starting withgeneral.py.Approach I would follow:
list[str]notList[str])from __future__ import annotationsfor the|union syntax on Python 3.9Describe alternatives you've considered
just documenting types in docstrings but that doesn't help with static analysis or IDE support, which is half the value here.
Additional context
im happy to start small with just
general.pyand adjust my approach based on feedback before going further.