Add subject ID discovery to Dandiset APIs - #1917
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1917 +/- ##
==========================================
+ Coverage 77.35% 77.42% +0.07%
==========================================
Files 89 89
Lines 13325 13391 +66
==========================================
+ Hits 10307 10368 +61
- Misses 3018 3023 +5
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:
|
|
Good catch — I switched the remote implementation to I added coverage for the endpoint call and missing-version handling. The six focused subject-discovery tests, lint, and typing pass locally, and I verified the method against production Dandiset |
|
The matrix has finished: 35 checks pass, including lint, typing, docs, CodeQL, both Codecov checks, and all other test environments. The Windows/Python 3.12 job's only failure was the existing |

Fixes #1457
Add
get_subject_ids()to both localDandisetand remoteRemoteDandiset.The local implementation inspects only immediate child directories named
sub-*. The remote implementation streams asset records ordered by path andextracts only nested top-level
sub-*prefixes, without requesting assetpayloads or metadata. Both methods deduplicate and return stable sorted labels;
root-level files and malformed
sub-names are ignored.The API reference now documents both methods and includes local and remote
usage examples.
Tests:
that the API is called with
order="path"Local validation: flake8, syntax checks, and both focused tests pass. The local
mypy invocation is blocked by the checkout's missing
types-requestsstubs.