You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since python 3.5 it is possible to add type information to the parameters of functions, methods and classes. With this information it is possible to use tools like Mypy to catch calls made with the wrong type. This way you can avoid errors and make your code easier to maintain and grow.
I interest to work on this project during the GSoC period. I have conducted some initial research on this topic and I am excited about the potential impact it could have on the InVesalius codebase. By adding type information, we can improve the code's readability, maintainability, and reduce the likelihood of errors. Additionally, the Github-CI action for catching type errors using tools like Mypy would make it easier to catch issues early on, before they become more difficult to debug.
To begin, I plan to first familiarize myself with the InVesalius codebase and the Python typing module. Next, I will create a list of functions, methods, and classes that require type annotations and add appropriate annotations to their parameters and return types.
Once the type information is added, I will create a Github-CI action to run MyPy on the codebase and catch any type errors. I will also ensure that the codebase adheres to best practices for typing, such as using Union types where appropriate and avoiding the use of "Any" types.
Please let me know if you have any feedback or suggestions on my proposed approach. Specifically, I would like to know if there are any specific resources, tools or libraries that I should focus on to help me get started.
Thank you so much for your time and I am looking forward to hearing back from you.
Since python 3.5 it is possible to add type information to the parameters of functions, methods and classes. With this information it is possible to use tools like Mypy to catch calls made with the wrong type. This way you can avoid errors and make your code easier to maintain and grow.
References:
https://docs.python.org/3/library/typing.html
https://mypy-lang.org/"
The text was updated successfully, but these errors were encountered: