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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

DimitriPapadopoulos
Copy link
Contributor

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 (652a58e) to head (a1eec88).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #559   +/-   ##
=======================================
  Coverage   99.91%   99.91%           
=======================================
  Files          59       59           
  Lines        2334     2334           
=======================================
  Hits         2332     2332           
  Misses          2        2           
Files with missing lines Coverage Δ
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/delta.py 100.00% <ø> (ø)
numcodecs/fixedscaleoffset.py 100.00% <ø> (ø)
numcodecs/json.py 96.07% <ø> (ø)
numcodecs/lzma.py 100.00% <100.00%> (ø)
numcodecs/msgpacks.py 100.00% <100.00%> (ø)
... and 39 more

@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review August 10, 2024 13:15
@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.

.pre-commit-config.yaml Outdated Show resolved Hide resolved
adhoc/blosc_memleak_check.py Outdated Show resolved Hide resolved
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).
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
RSE102 Unnecessary parentheses on raised exception
ISC001 Implicitly concatenated string literals on one line

ISC003 Explicitly concatenated string should be implicitly concatenated
ICN001 `numpy` should be imported as `np`
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
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