Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type hints: Summary issue #2951

Closed
14 tasks done
binste opened this issue Mar 7, 2023 · 2 comments · Fixed by #3272
Closed
14 tasks done

Type hints: Summary issue #2951

binste opened this issue Mar 7, 2023 · 2 comments · Fixed by #3272

Comments

@binste
Copy link
Contributor

binste commented Mar 7, 2023

Currently, Altair only has a few type hints to help IDEs provide better autocompletion suggestions. More type hints would further help IDEs provide a better development experience as well as static type checkers to catch potential errors before they appear at runtime. Especially applications (e.g. a company-internal web application) and frameworks (e.g. Streamlit, Great Expectations) which want to tightly integrate with Altair could greatly profit from this.

I'd suggest the following approach for Altair which is in line with Using mypy with an existing codebase. Very open for inputs!

Should happen before the v5 release

v5 or minor release

I think it's preferable to have the following items more or less bundled into one release from which on Altair is declared as a library supporting type checks. This could be a minor release (5.1?) as it should not affect any runtime behaviour. Goal is to have as much as possible of the "public API" of Altair typed and then incrementally do the rest later on if we see value in it.

@mattijn @joelostblom Would you be open to this? Input on the release cycle? I could review PRs related to this topic and create some myself.

@mattijn
Copy link
Contributor

mattijn commented Mar 7, 2023

Yes, I like to be a reviewer in this process!

@joelostblom
Copy link
Contributor

I am in favor of making Altair a typed library. I would like to say that I can be help review and create PRs, but to be honest I haven't worked much with explicit types and it is unlikely that I will have time to learn about it in a reasonable timeframe, so I will likely not be of that much help here unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: API ergonomics
3 participants