forked from zarr-developers/numcodecs
-
Notifications
You must be signed in to change notification settings - Fork 0
Sync upstream #8
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* chore: update pre-commit hooks updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.4 → v0.8.0](astral-sh/ruff-pre-commit@v0.7.4...v0.8.0) * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.21.3 to 2.22.0. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](pypa/cibuildwheel@v2.21.3...v2.22.0) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Apply ruff/flake8-comprehensions rule C401 C401 Unnecessary generator (rewrite as a `set` comprehension) * Apply ruff/flake8-comprehensions rules C408 C408 Unnecessary `dict` call (rewrite as a literal) * Enforce ruff/flake8-comprehensions rules (C4) --------- Co-authored-by: David Stansby <[email protected]>
* fixes zarr-developers#663 * changelog
updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.0 → v0.8.1](astral-sh/ruff-pre-commit@v0.8.0...v0.8.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…ers#550) * Only suppress imports of optional external dependencies * Gather optional dependencies * Fix import order * Add changelog entry
* support delta_spec and paging_spec * coverage, try to fix zarr v3 * explicitly test try_consecutive * delta_spec default of auto * pcodec upper bound * revert zarr test change * test parameterize, match cases * docstring and matching cleanup * add release notes --------- Co-authored-by: David Stansby <[email protected]>
updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.8.3](astral-sh/ruff-pre-commit@v0.8.1...v0.8.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.3 → v0.8.4](astral-sh/ruff-pre-commit@v0.8.3...v0.8.4) - [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.0](pre-commit/mirrors-mypy@v1.13.0...v1.14.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Enforce ruff rule RUF001 Disable the rule directly in the incriminated test file. * Enforce ruff/pyupgrade rule UP007 UP007 Use `X | Y` for type annotations * Enforce ruff/flake8-bugbear rules B028 and B904 * Exclude c-blosc from ruff linting * Ignore ruff/pycodestyle rule W391 astral-sh/ruff#13763 * Enforce ruff/flake8-logging rules (LOG) * Enforce ruff/flake8-implicit-str-concat rules (ISC) * Enforce ruff/flake8-executable rules (EXE) * Enforce ruff/flake8-future-annotations rules (FA) * Enforce ruff/flake8-return rules (RET) * Enforce ruff/flake8-slots rules (SLOT) * Add "numcodecs" to "src" The directories to consider when resolving first- vs. third-party imports. * Enforce ruff/flake8-simplify rules (SIM) * Enforce ruff/flake8-tidy-imports rules (TID) * Conflicting ruff lint rules The linter includes some rules that, when enabled, can cause conflicts with the formatter, leading to unexpected behavior. None None of these rules are included in Ruff's default configuration. However, since we have enabled some relevant rule sets, we disable these rules. * Enforce ruff/tryceratops rules (TRY) * Update ruff to 0.8.0 * Ignore ruff/flake8-simplify rule SIM105 SIM105 Use `contextlib.suppress(ImportError)` instead of `try`-`except`-`pass` * Ignore ruff/tryceratops rule TRY301 TRY301 Abstract `raise` to an inner function * Apply ruff/flake8-bugbear rule B904 B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling * Apply ruff/flake8-bugbear rule B028 B028 No explicit `stacklevel` keyword argument found * Apply ruff rule RUF022 RUF022 `__all__` is not sorted
* Python 3 is the default nowadays, no need to specify it. * Update pre-commmit less often that the "weekly" default. Co-authored-by: David Stansby <[email protected]>
* Update pyproject.toml - zfpy Versioning Zfpy release 1.0.1 which supports numpy > 2.0. * Removing numpy verison warning from zfpy * Removing unused imports. * precommit fix * precommit * Updated Changelog * Precommit changes. * Version check for zfpy lower than 1.0.1 --------- Co-authored-by: David Stansby <[email protected]>
) * update numcodecs tests and docs for zarr-python 3rc1 * release docs and repr test * debugging * pre-commit config --------- Co-authored-by: David Stansby <[email protected]>
* Deprecate blosc helper functions * Fix calling deprecated functions * Add release notes * Add deprecated dep
* Simplify conda use in tests * Make some commands one-liners * Move pcodec import back * Add no cover if codec not available
* Disable `PCodec` if dependencies are unavailable * Run `isort` on `pcodec` module * Add release note * Update release note * style: pre-commit fixes --------- Co-authored-by: David Stansby <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Remove id from zarr3 config serialization * add test * tests * release docs --------- Co-authored-by: David Stansby <[email protected]>
RUF046 Value being casted is already an integer
updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.8.6](astral-sh/ruff-pre-commit@v0.8.4...v0.8.6) - [github.com/pre-commit/mirrors-mypy: v1.14.0 → v1.14.1](pre-commit/mirrors-mypy@v1.14.0...v1.14.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add the UnknownCodecError * Remove trailing whitespace * Ruff formatting * Add a release note * Add doctest * Fix failing test case * Formatting again * Update numcodecs/tests/test_registry.py Co-authored-by: David Stansby <[email protected]> * Make UnknownCodecError inherit from ValueError --------- Co-authored-by: David Stansby <[email protected]>
updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.4](astral-sh/ruff-pre-commit@v0.8.6...v0.9.4) - [github.com/scientific-python/cookie: 2024.08.19 → 2025.01.22](scientific-python/cookie@2024.08.19...2025.01.22) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Don't overwrite codec config values when set. A codec doesn't know where it is in the codec pipeline, so it cannot know whether `array_spec.dtype` should match `codec.dtype` or not. * little more * FIx test * fix test --------- Co-authored-by: Davis Bennett <[email protected]>
* Only skip failing test on macOS * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…pers#710) * Bump minimum macOS version to 10.13 * Add `ubuntu-22.04-arm` image to CI * Fix a typo * Install Zarr 3, now that it is available * Allow compilation on Linux AArch64 * Don't check for SSE2/AVX2 for AArch64 * Bump to `[email protected]` Suggested-by: <[email protected]> * Add a CHANGELOG entry * Add `extra_link_args` for pthreads * Drop redundant `get_arch_specific_objects` Co-Authored-By: David Stansby <[email protected]> * Add note for macOS compatibility --------- Co-authored-by: David Stansby <[email protected]>
…pers#695) Bumps [conda-incubator/setup-miniconda](https://github.com/conda-incubator/setup-miniconda) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/conda-incubator/setup-miniconda/releases) - [Changelog](https://github.com/conda-incubator/setup-miniconda/blob/main/CHANGELOG.md) - [Commits](conda-incubator/setup-miniconda@v3.1.0...v3.1.1) --- updated-dependencies: - dependency-name: conda-incubator/setup-miniconda dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David Stansby <[email protected]>
updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.4 → v0.9.9](astral-sh/ruff-pre-commit@v0.9.4...v0.9.9) - [github.com/pre-commit/mirrors-mypy: v1.14.1 → v1.15.0](pre-commit/mirrors-mypy@v1.14.1...v1.15.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.22.0 to 2.23.0. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](pypa/cibuildwheel@v2.22.0...v2.23.0) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…pers#713) * (feat): `typesize` declared with constructor * (chore): add docstring * (chore): relnote * (chore): format * (fix): add check for `typesize<1` * (chore): no cover for internal `ValueError` * (fix): test internal `compress` error
…arr-developers#656) When this was written in the code, Python's Buffer Protocol support was inconsistent across Python versions (specifically on Python 2.7). Since Python 2.7 reached EOL and it was dropped from Numcodecs, the Python Buffer Protocol support has become more consistent. At this stage the `memoryview` object, which Cython also supports, does all the same things that `Buffer` would do for us. Plus it is builtin to the Python standard library. It behaves similarly in a lot of ways. Given this, switch the code over to `memoryview`s internally and drop `Buffer`. <hr> Additionally have pushed changes to this PR to improve overall memory usage. This eliminates some unneeded copies that occurred at the ended of some codecs. Also have eliminated some temporary allocations used in some codec pipelines by allocating output buffers earlier and changing operations to act in-place. This should eliminate some spiky behavior seen recently with codecs.
* Remove deprecated blosc code * mypy fixes
* Update changelog for 0.16 * Finish changelog
When accessing a pointer from a `const` typed-memoryview, make sure the pointer itself is also typed as `const` to avoid compiler warnings about discarding `const`.
* In `vlen`, define and use `const` `HEADER_LENGTH` Previously `HEADER_LENGTH` was defined in `vlen`, but not as `const`. So it could concievably be changed. While this didn't happen in practice, it does mean the compiler needs to generate code to check and use this value throughout. However `HEADER_LENGTH` is intended to be `const`. So define it as such. That way the compiler can generate more efficient code when using it. Further define it in terms of the type whose size it references (namely `uint32_t`). Also make sure that type is `cimport`ed for referencing. Finally consistently use `HEADER_LENGTH` when it applies throughout `vlen`. Previously `HEADER_LENGTH` was sometimes used and in other cases the value `4` was used. So consistently use `HEADER_LENGTH` throughout for improved code clarity. Now that `HEADER_LENGTH` is marked `const` this is equally efficient.
updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.11.4](astral-sh/ruff-pre-commit@v0.9.9...v0.11.4) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…evelopers#729) * Make `license` SPDX compatible * Use `project`'s `license-files` entry * Package licenses for Blosc and its dependencies * Add news entry for license packaging fixes * Require Setuptools 77+ Needed for newer `license*` metadata handling. * Drop deprecated trove-classifier for license
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.23.0 to 2.23.2. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](pypa/cibuildwheel@v2.23.0...v2.23.2) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David Stansby <[email protected]>
updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.4 → v0.11.8](astral-sh/ruff-pre-commit@v0.11.4...v0.11.8) - [github.com/scientific-python/cookie: 2025.01.22 → 2025.05.02](scientific-python/cookie@2025.01.22...2025.05.02) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* make Zlib codec pickleable * add test * show __init_subclass__ can work for Zlib * refactor the BytesBytes Codecs to use __init_subclass__ * remove snake_case function * Chuck's suggestions Co-authored-by: Chuck Daniels <[email protected]> * redefine Bitround * remove debugging prints from test * redefine Shuffle * redefine Delta * redefine FixedScaleOffset * Quantize * PackBits * AsType * redefine checksum codecs * array to bytes codecs * remove todo * remove dynamic constructors * release note * remove unneeded imports * style: pre-commit fixes * remove unused type ignore --------- Co-authored-by: Chuck Daniels <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Davis Bennett <[email protected]>
* (fix): ensure no `typesize` in the `Blosc` config * (fix): `typesize` less than 1 test needs to set private member * (chore): document change * (fix): not link for `get_config`
Co-authored-by: Davis Bennett <[email protected]>
updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.8 → v0.11.12](astral-sh/ruff-pre-commit@v0.11.8...v0.11.12) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.16.0](pre-commit/mirrors-mypy@v1.15.0...v1.16.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…evelopers#707) * Add streaming decompression for ZSTD_CONTENTSIZE_UNKNOWN case * Add tests and documentation for streaming Zstd * Add better tests from numcodecs.js * Adapt zstd.pyx streaming for Py_buffer * Formatting with ruff * Fix zstd comparison of different signedness * Undo change to unrelated test * Add zstd cli tests * Test Zstd against pyzstd * Apply ruff * Fix zstd tests, coverage * Make imports not optional * Add EndlessZstdDecompressor tests * Add docstrings to test_pyzstd.py
* Used ruff check --fix * Fix ruff check issues with pytest.warn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[Description of PR]
TODO: