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

Finish typing zarr.metadata #1880

Merged
merged 1 commit into from
May 21, 2024
Merged

Conversation

dstansby
Copy link
Contributor

Finishes typing zarr.metadata. Alongside adding typing, it made sense to fix/improve some of the typing elsewhere that's called by ArrayMetadata.__init__.

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)

@dstansby dstansby marked this pull request as ready for review May 15, 2024 20:59
@MSanKeys963 MSanKeys963 added the V3 Related to compatibility with V3 spec label May 15, 2024
@jhamman jhamman added this to the 3.0.0.alpha milestone May 16, 2024
@normanrz
Copy link
Contributor

Hi @dstansby, #1857 was just merged and changed the array metadata a lot. Can you take another look what is missing, please?

@jhamman jhamman added the types label May 17, 2024
@dstansby dstansby marked this pull request as draft May 18, 2024 09:29
@dstansby dstansby marked this pull request as ready for review May 18, 2024 09:35
@dstansby
Copy link
Contributor Author

👍 this should be updated now

@@ -22,13 +22,13 @@
@dataclass(frozen=True)
class ChunkGrid(Metadata):
@classmethod
def from_dict(cls, data: dict[str, JSON]) -> ChunkGrid:
def from_dict(cls, data: dict[str, JSON] | ChunkGrid) -> ChunkGrid:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your change is fine but I don't know why from_dict accepts a ChunkGrid object. 🤷

@jhamman jhamman merged commit 549cf28 into zarr-developers:v3 May 21, 2024
18 checks passed
@dstansby dstansby deleted the type-metadata branch May 21, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types V3 Related to compatibility with V3 spec
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants