Repository navigation
[experiment] validate: stream annexed content with datalad-fuse's adapter when available - #1952
Draft
CodyCBakerPhD wants to merge 1 commit into
Draft
CodyCBakerPhD wants to merge 1 commit into
CodyCBakerPhD wants to merge 1 commit into
Conversation
For `validate --missing-file-content=stream`, use datalad-fuse's RemoteFilesystemAdapter (without a FUSE mount) in repositories where git-annex is initialized, falling back to the git-only URL reader of `dandi.support.annex` otherwise. datalad-fuse asks git-annex where the content is, so it also finds content on remotes with no URL registered. Tested against datalad/datalad-fuse#131 (installed from its PR ref in a new `datalad-fuse` CI job, along with git-annex). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qn5WBSiQgoZoL4fytF6nEr
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## claude/brave-hamilton-ast647 #1952 +/- ##
================================================================
+ Coverage 78.78% 78.93% +0.15%
================================================================
Files 94 96 +2
Lines 14727 14899 +172
================================================================
+ Hits 11603 11761 +158
- Misses 3124 3138 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1933. This tries the suggestion from #1933: use datalad-fuse with its fsspec adapter, not FUSE itself, tested against datalad/datalad-fuse#131. #1933 itself keeps its pure-fsspec reader.
What changes
dandi/support/datalad_fuse.pyaddsDataladFuseReadableFile, aReadablethat opens an annexed file's missing content through datalad-fuse'sRemoteFilesystemAdapter.caching=False, so nothing is written into the dataset's.git.remfile,fsspec), which can be changed with thedatalad.fusefs.backendsconfig.AnnexReadableFile, its fingerprint is the annex key, so pynwb validation and metadata results are cached under the key.get_datalad_fuse_readable(path)returnsNone, so the caller falls back to the git-only reader indandi.support.annex, when:git annex initon it);validate --missing-file-content=streamtries datalad-fuse first and falls back to the git-only reader. TheDANDI.FILE_CONTENT_STREAMEDmessage names which one was used.whereis), so it also finds content that is reachable through a remote but has no registered URL, such as Forgejo-aneksajo or S3 exporttree remotes.Tests
make_git_annex_dandiset()builds a real git-annex repository: content is added, a URL is registered for it, and then it is dropped. Askipif.no_git_annexcondition is added for these tests.dandi/support/tests/test_datalad_fuse.py: streaming over a local HTTP server with range support, plus the cases that returnNone.test_validate_stream_datalad_fuse: content-dependent results match a local copy of the file.mode: datalad-fuse(ubuntu, Python 3.12), installsgit-annexfrom PyPI and datalad-fuse fromrefs/pull/131/head. Every other job runs without datalad-fuse, so they still exercise the fallback.Open questions
🤖 Generated with Claude Code
https://claude.ai/code/session_01Qn5WBSiQgoZoL4fytF6nEr
Generated by Claude Code