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

Avoid redundant __contains__ #1739

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

dcherian
Copy link
Contributor

@dcherian dcherian commented Apr 2, 2024

Let's try grabbing the array.json and group.json files, and check for *NotFoundError, instead of using contains first.

image

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)

Let's try grabbing the array.json and group.json files,
and check for `*NotFoundError`, instead of using contains first.
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.98%. Comparing base (d0fb875) to head (58209e8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1739      +/-   ##
==========================================
- Coverage   99.99%   99.98%   -0.01%     
==========================================
  Files          38       38              
  Lines       14610    14614       +4     
==========================================
+ Hits        14609    14612       +3     
- Misses          1        2       +1     
Files Coverage Δ
zarr/hierarchy.py 99.79% <100.00%> (-0.21%) ⬇️

Copy link
Member

@jhamman jhamman left a comment

Choose a reason for hiding this comment

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

@dcherian - this is so so great. Zarr-python is 9 kinds of defensive - often times when it doesn't need to be. This is a prime example. Whoop!

@jhamman jhamman merged commit bcb7684 into zarr-developers:main Apr 4, 2024
18 checks passed
@dcherian dcherian deleted the smart-group-array branch April 4, 2024 22:17
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