Skip to content

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
@jhamman jhamman added this to the 3.0.0.alpha milestone May 16, 2024
@normanrz
Copy link
Member

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

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
@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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants