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

Update static typing #213

Merged

Conversation

TomAugspurger
Copy link
Contributor

This updates how we do static type checking, and fixes some issues on main.

The biggest change is moving the mypy linting check out of .pre-commit. As mentioned in #209, we need all the typed dependencies in the environment running the check. The one managed by .pre-commit was lacking several dependencies (like xarray and Zarr) and so we weren't benefiting from static type checking at those boundaries. We can move it back into pre-commit, but we need to make sure that all our dependencies are duplicated there.

I'll explain some of the type changes inline.

Tom Augspurger and others added 6 commits August 3, 2024 18:59
1. Fixed mypy pyproject.toml config
2. Move mypy from pre-commit to pyproject.toml
3. Lint in CI
.github/workflows/main.yml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
virtualizarr/kerchunk.py Show resolved Hide resolved
virtualizarr/kerchunk.py Outdated Show resolved Hide resolved
virtualizarr/manifests/array.py Show resolved Hide resolved
virtualizarr/manifests/manifest.py Outdated Show resolved Hide resolved
virtualizarr/tests/test_zarr.py Outdated Show resolved Hide resolved
virtualizarr/xarray.py Show resolved Hide resolved
@TomNicholas TomNicholas added the CI Continuous Integration label Aug 6, 2024
@TomAugspurger TomAugspurger marked this pull request as ready for review August 6, 2024 14:08
@TomAugspurger
Copy link
Contributor Author

CI is passing now.

Copy link
Collaborator

@TomNicholas TomNicholas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! I looked through but couldn't see any issues :)

@TomAugspurger TomAugspurger merged commit 14f5491 into zarr-developers:main Aug 7, 2024
8 checks passed
@TomAugspurger TomAugspurger deleted the user/tom/fix/type-checking branch August 7, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants