-
Notifications
You must be signed in to change notification settings - Fork 11
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
Update zarr checksums #120
Conversation
Codecov Report
@@ Coverage Diff @@
## master #120 +/- ##
==========================================
- Coverage 96.67% 96.66% -0.02%
==========================================
Files 18 18
Lines 1625 1649 +24
==========================================
+ Hits 1571 1594 +23
- Misses 54 55 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@dchiquito How are you definining the size of a directory? |
@jwodder The sum of all files contained in the directory. |
""" | ||
|
||
md5: str | ||
path: str | ||
name: str | ||
size: int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if to simplify transition there could be a proper deprecation cycle which would support path, and decompose it into name and size as needed. Should be simple right? Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's necessary. As soon as this is released and incorporated in dandi-archive and dandi-cli, we can just recompute checksums on all zarrs and path
will be updated to name
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, since there is no way to announce that dandischema
(next release) breaks dandi-cli << (whatever would become compatible with new interface)
people would end up with a dandi-cli which might puke an exception if they manage to upgrade dandischema but not dandi-cli. unlikely but possible. deprecation cycle allows to amortize perturbation and avoid such problems...
oh well -- since python is dynamic and zarr isn't primary target yet for users, I am ok to proceed without deprecation cycle at hopefully low or none count of affected users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we make the next dandischema release a new minor version, it would be incompatible with dandi-cli's dandischema ~= 0.5.1
requirement and thus help to prevent that from happening (but there would still be problems with checksum failures if people use the old client to upload Zarrs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, right, nice.
@jwodder Could you prep a PR for dandi-cli to accompany this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dchiquito Does |
@jwodder It does, yes. Just wanted to make you aware of the change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to update the schema checks for the digest as well. also any reason to use one -
followed by two --
in the digest?
@satra one |
@satra can you approve if you have no more qualms? |
@dchiquito - sorry i wasn't clear in my previous comment. when i meant schema checks, i meant changes in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good to me, approval pending Satra's comments being addressed.
Ah I see, I'll fix that up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @dchiquito - looks good to me.
@satra This PR was tagged |
Fixes dandi/dandi-archive#937
Fixes dandi/dandi-archive#925
Fixes dandi/dandi-archive#931
attn @jwodder note that the method signature for
get_checksum
has changed. Files/directores are now represented by a tuple(checksum, size)
instead of just a stringchecksum
.