Skip to content

Add --ext-params flag to copy command#108

Merged
atimin merged 3 commits intomainfrom
102-add-ext-parameter-to-reduct-cli-cp-command
May 28, 2025
Merged

Add --ext-params flag to copy command#108
atimin merged 3 commits intomainfrom
102-add-ext-parameter-to-reduct-cli-cp-command

Conversation

@atimin
Copy link
Member

@atimin atimin commented May 28, 2025

Closes #102

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • CHANGELOG.md has been updated (for bug fixes / features / docs)

What kind of change does this PR introduce?

Feature

What was changed?

The PR adds the --ext-params flag to the reduct -cli cp command to use extension during copy operations.
Additionally. renamed -T to -t shortcut for the --time argument of the remove command to avoid conflict with the -T (timeout).

Related issues

#102

Does this PR introduce a breaking change?

Yes

Other information:

@atimin atimin linked an issue May 28, 2025 that may be closed by this pull request
@atimin atimin changed the title add --ext-params flag to copy command Add --ext-params flag to copy command May 28, 2025
@atimin atimin requested a review from Copilot May 28, 2025 11:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for passing JSON-formatted extension parameters to the cp command, renames a conflicting flag in the rm command, and bumps related dependencies and CI configuration.

  • Introduce --ext-params (-X) argument in shared CLI args, parse it into QueryParams, and wire it through cp’s query builder.
  • Rename the remove command’s short flag from -T to -t to avoid a conflict with timeout.
  • Update reduct-rs to v1.15.0 and switch CI workflow to use vars.MINIMAL_RUST_VERSION.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/parse/widely_used_args.rs Added make_ext_arg for the new --ext-params flag
src/parse/helpers.rs Extended QueryParams and parsing logic to handle optional ext JSON
src/cmd/rm.rs Renamed remove flag shortcut from -T to -t
src/cmd/rm/query_remover.rs Updated test fixture to include new ext field
src/cmd/cp/helpers.rs Wired query_builder.ext(...) when ext params are present
src/cmd/cp.rs Added the make_ext_arg() to the cp subcommand
Cargo.toml Bumped reduct-rs dependency from 1.14.0 to 1.15.0
.github/workflows/ci.yml Switched Rust toolchain reference to use vars.MINIMAL_RUST_VERSION
Comments suppressed due to low confidence (2)

src/cmd/cp/helpers.rs:130

  • Add unit or integration tests for the --ext-params flag to verify JSON parsing and confirm that QueryBuilder.ext(...) is invoked when this parameter is provided.
if let Some(ext) = &query_params.ext {

.github/workflows/ci.yml:69

  • Ensure MINIMAL_RUST_VERSION is defined under vars in your repository’s settings or in the workflow; otherwise the CI job will fail to resolve the toolchain.
toolchain: ${{ vars.MINIMAL_RUST_VERSION }}

@atimin atimin merged commit 5dc724a into main May 28, 2025
13 checks passed
@atimin atimin deleted the 102-add-ext-parameter-to-reduct-cli-cp-command branch May 28, 2025 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ext parameter to reduct-cli cp command

1 participant