-
Notifications
You must be signed in to change notification settings - Fork 5
🧱 static integration testing #35
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
base: main
Are you sure you want to change the base?
Conversation
So numpy isn't compatible with our |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great. Couple Q's.
What string literals does it expect? Limited to the list of compatible versions? |
In numpy 2.3.1 it [looks like this]:(https://github.com/numpy/numpy/blob/4d833e5df760c382f24ee3eb643dc20c3da4a5a1/numpy/__init__.pyi#L1684) _ArrayAPIVersion: TypeAlias = L["2021.12", "2022.12", "2023.12", "2024.12"]
# --snip--
def __array_namespace__(self, /, *, api_version: _ArrayAPIVersion | None = None) -> ModuleType: ... in 2.0.2 it looks like this: def __array_namespace__(self, *, api_version: str | None = ...) -> Any: ... and |
Huh, why is mypy using the stubs from numpy 2.3.1 when numpy 1.25.0 is installed? |
So mypy apparently completely ignores build isolation... The workaround is to use |
Ok, now the question remains: What to do with |
My feeling is that we are going to end up using array-api-compat anyway, no? I guess not for older versions of the standard, but as the standard is developed. |
for the purposes of integration testing it might be a good idea to rely on it as little as we can |
Testing both is also an option 🤔 |
may as well ignore it for now if we can pass without it, and see what happens down the line |
This comment was marked as outdated.
This comment was marked as outdated.
Nevermind, I managed to get this working on numpy<2 by using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently limited and numpy and only uses mypy. I plan to add (based)pyright in a follow-up.
Closes ##25 I guess