Skip to content

Enabling attribute tests for reading data from groups #104

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jm9176
Copy link
Member

@jm9176 jm9176 commented Jun 12, 2025

Enabled tests for #35

@jm9176 jm9176 requested a review from krisfed June 12, 2025 13:46
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.66%. Comparing base (7ca2c2f) to head (fd9b7e2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #104   +/-   ##
=======================================
  Coverage   96.66%   96.66%           
=======================================
  Files           8        8           
  Lines         210      210           
=======================================
  Hits          203      203           
  Misses          7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -54,10 +53,16 @@ function verifyAttrOverwrite(testcase)

function verifyGroupAttributeInfo(testcase)
% Write attribute info using zarrwriteatt function to a group.
Copy link
Member Author

Choose a reason for hiding this comment

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

This looks incorrect

Copy link
Member

@krisfed krisfed left a comment

Choose a reason for hiding this comment

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

Thanks for adding this!

Comment on lines +59 to +60
actAttr.attr1 = grpInfo.group_description;
actAttr.attr2 = grpInfo.group_level;
Copy link
Member

Choose a reason for hiding this comment

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

Instead of creating an artificial "actual" struct value from two fields of the actual output of zarrinfo, I think I would have preferred a separate verifyEqual for each field. In addition to being conceptually nicer (IMHO), I think it would also make it easier to see which attribute has an issue if the test fails.

@@ -53,11 +52,17 @@ function verifyAttrOverwrite(testcase)
end

function verifyGroupAttributeInfo(testcase)
% Write attribute info using zarrwriteatt function to a group.
testcase.assumeTrue(false,'Filtered until Issue-35 is fixed.');
% Verify group attribute info.
Copy link
Member

Choose a reason for hiding this comment

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

Do we already have a test for zarrwriteatt for groups?

actAttr.attr1 = grpInfo.group_description;
actAttr.attr2 = grpInfo.group_level;

expAttr.attr1 = 'This is a sample Zarr group';
Copy link
Member

Choose a reason for hiding this comment

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

hang on, in the file itself the attribute names are "group_description" and "group_level", but we are using attr1 and attr2 for the field names? A bit confusing..

Would avoid this issue if checking each field separately which would be my preference (see other comment) :)

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.

2 participants