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

style: add pre-commit configs for ruff and black, round 3 #1457

Closed
wants to merge 5 commits into from

Conversation

d-v-b
Copy link
Contributor

@d-v-b d-v-b commented Jul 11, 2023

This PR adds pre-commit configuration for ruff and black. It also applies those linters to the zarr-python codebase.

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)

@github-actions github-actions bot added the needs release notes Automatically applied to PRs which haven't added release notes label Jul 11, 2023
@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #1457 (74218a8) into main (aa5db9f) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main     #1457   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           37        37           
  Lines        15026     15026           
=========================================
  Hits         15026     15026           
Impacted Files Coverage Δ
zarr/context.py 100.00% <ø> (ø)
zarr/tests/test_core.py 100.00% <ø> (ø)
zarr/tests/test_meta_array.py 100.00% <ø> (ø)
zarr/tests/test_storage.py 100.00% <ø> (ø)
zarr/__init__.py 100.00% <100.00%> (ø)
zarr/_storage/absstore.py 100.00% <100.00%> (ø)
zarr/_storage/store.py 100.00% <100.00%> (ø)
zarr/_storage/v3.py 100.00% <100.00%> (ø)
zarr/_storage/v3_storage_transformers.py 100.00% <100.00%> (ø)
zarr/attrs.py 100.00% <100.00%> (ø)
... and 24 more

@d-v-b
Copy link
Contributor Author

d-v-b commented Jul 11, 2023

looks like i'm fighting with the pre-commit bot...

@github-actions github-actions bot removed the needs release notes Automatically applied to PRs which haven't added release notes label Jul 12, 2023
This was referenced Jul 12, 2023
@ap--
Copy link

ap-- commented Jul 12, 2023

Hi @d-v-b

I think it might be worth to remove the formatting commit from blame https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
If this PR is going to be squashed before merging, this might require to first add all pre-commit changes without running it, and then have a separate "formatting-only" PR.

@d-v-b
Copy link
Contributor Author

d-v-b commented Jul 12, 2023

@ap-- I think that's a good idea -- I will open a new PR for just the pre-commit config changes, then a separate PR for applying them to the codebase, with that commit made "blameless"

Closing this PR in favor of the strategy outlined above.

@d-v-b d-v-b closed this Jul 12, 2023
@d-v-b d-v-b mentioned this pull request Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants