feat(download): add --filename and --download-all options#270
Open
opswithranjan wants to merge 2 commits intomasterfrom
Open
feat(download): add --filename and --download-all options#270opswithranjan wants to merge 2 commits intomasterfrom
opswithranjan wants to merge 2 commits intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new download disambiguation capabilities so users can select packages by filename (including glob patterns) and optionally download all matching packages when multiple artifacts share the same name/version.
Changes:
- Added
--filenamefiltering (exact match via query; glob via client-sidefnmatch) and aresolve_all_packages()resolver. - Added
--download-allmode to download every resolved match and enhanced multi-match output (table includes a Filename column). - Updated tests and documentation (README + changelog) to cover the new CLI behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
cloudsmith_cli/core/download.py |
Extracts shared search logic into _search_packages(), adds filename filtering, adds resolve_all_packages(), and updates multi-match display. |
cloudsmith_cli/cli/commands/download.py |
Adds --filename and --download-all options and implements multi-package download flow. |
cloudsmith_cli/core/tests/test_download.py |
Adds unit tests for filename filtering, multi-resolution, and updated error/table output. |
cloudsmith_cli/cli/tests/commands/test_download.py |
Adds integration-style tests for --filename and --download-all behavior. |
README.md |
Adds download examples for --filename and --download-all (but also removes the logout entry from the command list). |
CHANGELOG.md |
Records the new options and table update, but converts Unreleased into a versioned 1.14.0 entry. |
Comments suppressed due to low confidence (1)
cloudsmith_cli/cli/commands/download.py:65
- The
--outfilehelp text says it's an output file path, but--download-alltreats it as an output directory (and--all-filesalready uses it as a directory). This is user-facing and can be confusing; please update the option help (and/or validation) to clearly document the different semantics by mode, or introduce a separate--output-dirfor multi-file/multi-package downloads.
@click.option(
"--outfile",
type=click.Path(),
help="Output file path. If not specified, uses the package filename.",
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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.
Support downloading packages when multiple share the same name/version
but differ by filename (e.g., .nupkg vs .snupkg).
Type of Change