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

Apply repo-review suggestions #559

Merged
merged 13 commits into from
Oct 9, 2024

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Aug 10, 2024

https://learn.scientific-python.org/development/guides/repo-review/?repo=zarr-developers%2Fnumcodecs&branch=main

TODO:

  • Unit tests and/or doctests in docstrings
  • Tests pass locally
  • Docstrings and API docs for any new/modified user-facing classes and functions
  • Changes documented in docs/release.rst
  • Docs build locally
  • GitHub Actions CI passes
  • Test coverage to 100% (Codecov passes)

Copy link

codecov bot commented Aug 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.91%. Comparing base (3b86d9c) to head (3780e1f).
Report is 65 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #559   +/-   ##
=======================================
  Coverage   99.91%   99.91%           
=======================================
  Files          59       59           
  Lines        2332     2332           
=======================================
  Hits         2330     2330           
  Misses          2        2           
Files with missing lines Coverage Δ
numcodecs/__init__.py 100.00% <100.00%> (ø)
numcodecs/astype.py 100.00% <100.00%> (ø)
numcodecs/bitround.py 100.00% <ø> (ø)
numcodecs/bz2.py 100.00% <100.00%> (ø)
numcodecs/categorize.py 100.00% <100.00%> (ø)
numcodecs/checksum32.py 100.00% <100.00%> (ø)
numcodecs/compat.py 100.00% <100.00%> (ø)
numcodecs/delta.py 100.00% <ø> (ø)
numcodecs/fixedscaleoffset.py 100.00% <ø> (ø)
numcodecs/json.py 96.07% <ø> (ø)
... and 41 more

@DimitriPapadopoulos DimitriPapadopoulos force-pushed the repo-review branch 6 times, most recently from a21fa08 to d8bc0d1 Compare August 10, 2024 12:14
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review August 10, 2024 13:15
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the repo-review branch 6 times, most recently from c1d29b7 to 30d1436 Compare August 11, 2024 15:16
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the repo-review branch 4 times, most recently from 8a87af5 to 4b7cd64 Compare August 26, 2024 08:44
@joshmoore
Copy link
Member

Thanks, @DimitriPapadopoulos, but would you also be willing to apply this to the v3 branch? v2 (main) is entering maintenance mode: https://zarr.dev/blog/zarr-python-v3-update/

@DimitriPapadopoulos
Copy link
Contributor Author

There is no v3 branch in numcodecs, is there? This is numcodecs, not zarr-python.

@joshmoore
Copy link
Member

🤦 Apologies, @DimitriPapadopoulos. You are of course correct. Sorry for the noise.

@DimitriPapadopoulos DimitriPapadopoulos force-pushed the repo-review branch 4 times, most recently from 2c8c2d5 to 2bd85be Compare September 6, 2024 11:27
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the repo-review branch 3 times, most recently from b8c488b to 85249db Compare September 16, 2024 19:20
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the repo-review branch 2 times, most recently from f5c15de to a1eec88 Compare September 22, 2024 20:31
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the repo-review branch 4 times, most recently from fe7ebec to b7b21b4 Compare September 30, 2024 08:07
@DimitriPapadopoulos DimitriPapadopoulos mentioned this pull request Oct 9, 2024
7 tasks
DimitriPapadopoulos and others added 12 commits October 9, 2024 12:50
PP304: Sets the log level in pytest
log_cli_level should be set. This will allow logs to be displayed on failures.
PP305: Specifies xfail_strict
xfail_strict should be set. You can manually specify if a check should be strict when setting each xfail.
PP306: Specifies strict config
--strict-config should be in addopts = [...]. This forces an error if a config setting is misspelled.

PP307: Specifies strict markers
--strict-markers should be in addopts = [...]. This forces all markers to be specified in config, avoiding misspellings.

PP308: Specifies useful pytest summary
An explicit summary flag like -ra should be in addopts = [...] (print summary of all fails/errors).
PGH004 Use specific rule codes when using `noqa`
PGH004 Use specific rule codes when using `ruff: noqa`
Apply ruff rule RUF012:
RUF012 Mutable class attributes should be annotated with `typing.ClassVar`

Disable ruff rule RUF001
B007 Loop control variable not used within loop body

B028 No explicit `stacklevel` keyword argument found

B904 Within an `except` clause, raise exceptions with `raise ... from err` or
     `raise ... from None` to distinguish them from errors in exception handling

B905 `zip()` without an explicit `strict=` parameter

Co-authored-by: David Stansby <[email protected]>
PC100: Has pre-commit-hooks
Must have https://github.com/pre-commit/pre-commit-hooks repo in .pre-commit-config.yaml
ISC001 Implicitly concatenated string literals on one line

ISC003 Explicitly concatenated string should be implicitly concatenated
FURB163 Prefer `math.log10`/`math.log2` over `math.log` with a redundant base
	'pkgutil.find_loader' is deprecated and slated for removal
	in Python 3.14; use importlib.util.find_spec() instead
@dstansby dstansby enabled auto-merge (squash) October 9, 2024 15:07
@dstansby dstansby merged commit 8edd3f9 into zarr-developers:main Oct 9, 2024
30 checks passed
@DimitriPapadopoulos DimitriPapadopoulos deleted the repo-review branch October 9, 2024 16:11
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.

3 participants