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

Add numpy to mypy pre-commit check env #1893

Merged
merged 4 commits into from
May 22, 2024

Conversation

dstansby
Copy link
Contributor

@dstansby dstansby commented May 18, 2024

This reveals some typing errors that aren't spotted if numpy is absent. This will fail for now until I make the fixes.

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/tutorial.rst
  • Changes documented in docs/release.rst
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@dstansby dstansby mentioned this pull request May 18, 2024
6 tasks
@dstansby
Copy link
Contributor Author

@normanrz is there any chance you could look at and fix the errors in zarr.codecs.zstd?
@madsbk is there any chance you could look at and fix the errors in zarr.buffer?

@madsbk
Copy link
Contributor

madsbk commented May 21, 2024

@normanrz is there any chance you could look at and fix the errors in zarr.codecs.zstd? @madsbk is there any chance you could look at and fix the errors in zarr.buffer?

I am working on a protocol for ArrayLike and NDArrayLike to support both numpy and cupy. It should fix (at least) some of the errors :)

See #1899

test.py Outdated Show resolved Hide resolved
@normanrz
Copy link
Contributor

@normanrz is there any chance you could look at and fix the errors in zarr.codecs.zstd?

Done. I also removed test.py which I assume was added unintentionally.

@dstansby
Copy link
Contributor Author

Thanks! Yeah, test.py definitely wasn't meant to be committed

@dstansby dstansby marked this pull request as ready for review May 22, 2024 12:56
@dstansby
Copy link
Contributor Author

dstansby commented May 22, 2024

I've ignored the errors in zarr.buffer for now; when this PR gets merged, @madsbk could you make sure #1899 is rebased on top if it and this line is removed so errors are caught:

https://github.com/dstansby/zarr-python/blob/56de78aa8f0b2cd3b5bd82f666acc085faf86004/pyproject.toml#L233

@normanrz normanrz merged commit c2e03c3 into zarr-developers:v3 May 22, 2024
18 checks passed
@dstansby dstansby deleted the tpying-numpy branch May 22, 2024 13:01
@jhamman jhamman added V3 Related to compatibility with V3 spec types labels Jun 1, 2024
@jhamman jhamman added this to the 3.0.0.alpha milestone Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types V3 Related to compatibility with V3 spec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants