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

Use new ByteRequest syntax and raise NotImplementedError on pickling #4

Merged
merged 88 commits into from
Jan 13, 2025

Conversation

maxrjones
Copy link

This PR resolves merge conflicts from Zarr-Python's main branch and makes updates for zarr-developers#1661 (comment) and zarr-developers#2585.

pre-commit-ci bot and others added 30 commits November 18, 2024 22:02
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.7.3 → v0.7.4](astral-sh/ruff-pre-commit@v0.7.3...v0.7.4)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Import crc32c through numcodecs

* remove more crc32c references
* array name is not nullable

* alter test for nullable array name

* assert a.name is not None

* assert a.name is not None, outside of the conditional
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)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Now that Store.getsize is a thing, we can do info_complete which
includes the number of chunks written and the size of those bytes.

Co-authored-by: Davis Bennett <davis.v.bennett@gmail.com>
Co-authored-by: Norman Rzepka <code@normanrz.com>
* test_sharding_with_empty_inner_chunk

* tests for failing read with sharding

* replace morton order by np unravel index

* format

* Revert "replace morton order by np unravel index"

This reverts commit adc3240.

* skip morton indices out of bound

* improve test_sharding_with_chunks_per_shard

* format

---------

Co-authored-by: Norman Rzepka <code@normanrz.com>
* Upgrade ruff to 0.8.1

Remove deprecated rules:
https://astral.sh/blog/ruff-v0.8.0#removal-of-six-deprecated-rules

* Apply ruff/flake8-pyi rule PYI061

PYI061 `Literal[None, ...]` can be replaced with `Literal[...] | None`
* fixes zarr-developers#2501

* typing

* only use c-contiguous

* more tests

* typing

* tests

* astype with copy=False

---------

Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
…rr-developers#2512)

* Error when attempt to set with an array of incompatible shape.

Closes zarr-developers#2469

* Fix typing

* fix isinstance check
…velopers#2525)

Bumps the actions group with 1 update: [sphinx-autoapi](https://github.com/readthedocs/sphinx-autoapi).


Updates `sphinx-autoapi` from 3.3.3 to 3.4.0
- [Release notes](https://github.com/readthedocs/sphinx-autoapi/releases)
- [Changelog](https://github.com/readthedocs/sphinx-autoapi/blob/main/CHANGELOG.rst)
- [Commits](readthedocs/sphinx-autoapi@v3.3.3...v3.4.0)

---
updated-dependencies:
- dependency-name: sphinx-autoapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Also discard commented out code. Code commented out without a comment
doesn't help. The reason here was circular imports.
* Move stateful tests to public testing API

* consolidate a bit
Co-authored-by: Davis Bennett <davis.v.bennett@gmail.com>
Co-authored-by: David Stansby <dstansby@gmail.com>
* Test that shapes and chunk shapes containing floats raise a TypeError

* Parse chunk shape

* Move check for floats from create to normalize_chunks

---------

Co-authored-by: Joe Hamman <joe@earthmover.io>
…pers#2534)

* chore(deps): make fsspec and upath optional dependencies

* bump minimal env

* release notes
* Make code blocks console

* Clean up installation page

* Split into pip/conda

* Fix doc headings

* Fix contributing link

* Fix contributing link
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.8.2](astral-sh/ruff-pre-commit@v0.8.1...v0.8.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
RUF036 `None` not at the end of the type annotation.

The `None` literal represents the absence of a value. For readability,
it's preferred to write the more informative type expressions first.
* feat: add wrapperstore

* feat: add latencystore

* rename noisysetter -> noisygetter

* rename _wrapped to _store

* loggingstore inherits from wrapperstore

* Update src/zarr/storage/wrapper.py

Co-authored-by: Joe Hamman <jhamman1@gmail.com>

* back to asynciterators

* update docstrings

---------

Co-authored-by: Joe Hamman <jhamman1@gmail.com>
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
* rename RemoteStore -> FsspecStore

* release note

* fix store type

* fixup doc build
…s#2562)

Bumps the actions group with 1 update: [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish).


Updates `pypa/gh-action-pypi-publish` from 1.12.2 to 1.12.3
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](pypa/gh-action-pypi-publish@v1.12.2...v1.12.3)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Clean up optional dependency groups

* Fix hatch envs

* Remove jupyter extra

* Drop upath and tree dependency groups

* Change fsspec group to remote group

* Add a v3 what's new

* Fix optional group

* Fix spelling

---------

Co-authored-by: Joe Hamman <joe@earthmover.io>
* add warnings when using non-spec features with v3

* tweak signature

* may change in the future

* wording
jni and others added 27 commits January 4, 2025 20:02
* Add failing test for zarr-developers#2631

* Fix create_dataset with data argument
These are currently misaligned in the source, which is probably why it's funnily rendered.
* Move deprecation notices to the top of docstrings

* Turn off GL09
Co-authored-by: Joe Hamman <joe@earthmover.io>
…ers#2652)

* adds filters, serializer, compressors properties to Array

* adapt Array.info

* fixes doctests

* ugly numcodecs class names

* always show filters and compressors in Array.info

* format
* Don't draw invalid shapes in test_vindex

* Update test_properties.py

* style: pre-commit fixes

---------

Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
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.2 → v0.8.6](astral-sh/ruff-pre-commit@v0.8.2...v0.8.6)
- [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](pre-commit/mirrors-mypy@v1.13.0...v1.14.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: add wrapperstore

* feat: add latencystore

* rename noisysetter -> noisygetter

* rename _wrapped to _store

* loggingstore inherits from wrapperstore

* initial commit

* working members traversal

* bolt concurrent members implementation onto async group

* update scratch file

* use metadata / node builders for v3 node creation

* fix key/name handling in recursion

* add latency-based test

* add latency-based concurrency tests for group.members

* improve comments for test

* add concurrency limit

* add test for concurrency limiting

* docstrings

* remove function that was only calling itself

* docstrings

* relax timing requirement for concurrency test

* Update src/zarr/core/group.py

Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>

* exists_ok -> overwrite

* simplify group_members_perf test, just require that the duration is less than the number of groups * latency

* update test docstring

* remove vestigial test

---------

Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
* Clean up public store API

* chore: make_store_path is private

---------

Co-authored-by: David Stansby <dstansby@gmail.com>
* Fix usage of config json_indent in V3JsonEncoder

* Add test for json_indent

* parametrize json indent

* Add None to indent test parameters

* ruff fix

* other ruff fixes

* Update src/zarr/core/metadata/v3.py

Co-authored-by: Joe Hamman <jhamman1@gmail.com>

* Use explicit json encoder args

* Add types

* Update byte counts for tests

---------

Co-authored-by: Joe Hamman <jhamman1@gmail.com>
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
* api: hide zarr.core from api docs

* dont link to zarr.config doc module
* Use TypedDicts for more literate ByteRangeRequests

* Update utility function

* fixes sharding

* Ignore mypy errors

* Fix offset in _normalize_byte_range_index

* Update get_partial_values for FsspecStore

* Re-add fs._cat_ranges argument

* Simplify typing

* Update _normalize to return start, stop

* Use explicit range

* Use dataclasses

* Update typing

* Update docstring

* Rename ExplicitRange to ExplicitByteRequest

* Rename OffsetRange to OffsetByteRequest

* Rename SuffixRange to SuffixByteRequest

* Use match; case instead of if; elif

* Revert "Use match; case instead of if; elif"

This reverts commit a7d35f8.

* Update ByteRangeRequest to ByteRequest

* Remove ByteRange definition from common

* Rename ExplicitByteRequest to RangeByteRequest

* Provide more informative error message

---------

Co-authored-by: Norman Rzepka <code@normanrz.com>
* fixes order for v2 arrays

* release notes
* test: enable codecov in main test action

* output coverage report

* add codecov.yml

* add junit config

* comment: false

* skip checking TYPE_CHECKING blocks
@maxrjones
Copy link
Author

this diff is massive due to merging main, but 26fa37e and 315e22e provide the only interesting changes.

@kylebarron kylebarron merged commit 264eac6 into kylebarron:kyle/object-store Jan 13, 2025
4 checks passed
@maxrjones maxrjones deleted the object-store-update branch January 13, 2025 19:02
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.