Repository navigation
Release v0.7.23: list pagination, owner filter, ds->on download - #321
Merged
Merged
Conversation
* Add list pagination, --owner filter, ds->on download redirect Backend: - GET /datasets: add owner query param, return total_count/limit/offset - GET /datasets: include source/source_id in managed dataset responses - GET /datasets/resolve/:sourceId: new endpoint for ds->on lookup - executeAndReturn: parallel COUNT query for total_count CLI list: - Default to 20 results per page (was 50) - Add -n/--limit, --page, --offset, --all pagination options - Add --owner <username> filter - Show pagination footer with page info and next page hint - JSON output includes total_count, limit, offset CLI download: - For ds###### datasets, check for on###### NEMAR counterpart - If found, prompt user to download from NEMAR instead (git-annex) - Falls through to OpenNeuro download if no counterpart or declined Closes #319 * Address review: fix error handling, validation, NaN safety - Separate API call from inquirer prompt in resolveOpenNeuroId so Ctrl+C propagates correctly instead of being swallowed - Add try-catch and input validation to resolve endpoint - Use Promise.allSettled so COUNT query failure does not crash the main dataset list query - Fix NaN propagation when limit/offset are non-numeric strings - Use != null check for limit param in API client - Fallback query now respects user's limit/offset - Update JSDoc to document new params and pagination response * Address review: restrict resolve to public, block --mine + --owner - Resolve endpoint only matches public datasets to prevent leaking private dataset metadata via source ID enumeration - Remove visibility from resolve response (always public) - Make --mine and --owner mutually exclusive with clear error * Fix unit tests for new --json output format The list --json output changed from a plain array to { datasets, total_count, limit, offset }. Update tests to match the new pagination-aware response shape.
This was referenced Sep 8, 2026
This branch was previously deployed
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.
Summary
-n/--limit,--page,--offset,--alloptions. Shows "1-5 of 493" style header and pagination footer.--ownerfilter:nemar dataset list --owner yahyafilters by dataset ownerds######(OpenNeuro), checks for NEMARon######counterpart and offers to download from NEMAR instead (git-annex version tracking)GET /datasetsreturnstotal_count, supportsownerparam; newGET /datasets/resolve/:sourceIdendpointTest plan
nemar dataset list -n 5shows "1-5 of 493" with pagination footernemar dataset list --page 2shows next pagenemar dataset list --owner yahyafilters correctlynemar dataset list --allshows all (up to 200)nemar dataset list --jsonreturns { datasets, total_count, limit, offset }/datasets/resolve/ds007315returns structured response/datasets/resolve/invalidreturns 400 with validation error