Align CLI arguments with reader APIs for full parameter consistency #321
+354
−9
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.
Fixes inconsistencies between the CLI interface (
__main__.py) and reader APIs by ensuring all reader parameters are available through the command line interface.Problem
The CLI exposed only a subset of reader API parameters, creating inconsistency between programmatic and command-line interfaces. Users could not access full reader functionality via CLI, limiting automation and advanced use cases.
Specific issues identified:
raster_models_scale_factorsin seqfish,var_names_make_uniquein visium readers)imread_kwargs,image_models_kwargs,labels_models_kwargs) not accessible via CLISolution
1. Added Missing Parameters
Fixed real parameter mismatches where non-kwargs parameters were missing from CLI:
--raster-models-scale-factorsparameter--var-names-make-uniqueparameter--var-names-make-uniqueparameter--parsing-styleparameter with proper choice validation2. JSON String Support for kwargs Parameters
Implemented JSON string parsing for complex
Mapping[str, Any]parameters that cannot be directly represented as CLI arguments:All kwargs parameters now support JSON string input with:
'{}'maintains existing CLI behavior3. Comprehensive Coverage
Updated all 15 reader CLI commands to achieve 100% parameter alignment:
codex,cosmx,curio,dbit,iss,macsima,mcmicro,merscope,seqfish,steinbock,stereoseq,visium,visium-hd,xeniumExamples
Backward Compatibility
All existing CLI usage patterns continue to work unchanged. The new parameters are optional with sensible defaults that preserve current behavior.
Testing
The CLI now provides complete functional parity with all reader APIs while maintaining usability for common use cases.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.