Skip to content

Clarify -o/-O help text and fix two log messages - #128

Merged
const-cloudinary merged 2 commits into
masterfrom
fix/help-and-log-text
Sep 30, 2026
Merged

const-cloudinary merged 2 commits into
masterfrom
fix/help-and-log-text

Conversation

@TalLevAmi

Copy link
Copy Markdown
Contributor

Small text fixes found in a usability review of the CLI.

Brief Summary of Changes

  • -o, --optional_parameter and -O, --optional_parameter_parsed in admin, uploader, provisioning, utils, upload_dir and sync: the help says that -o does not parse the value and that -O parses it as JSON or a boolean, with an example for each. Before, the help said "raw strings" and "interpreted strings".
  • migrate -v: add help text (Log each migrated URL.).
  • upload_dir: the log line was Uploading directory '...' (two spaces) when -e was not set.
  • sync --pull: the log line Preparing to download N items from Cloudinary folder had no folder name. It now shows the folder, as the other sync lines do.

What does this PR address?

  • GitHub issue (Add reference - #XX)
  • Refactoring
  • New feature
  • Bug fix
  • Adds more tests

Are tests included?

  • Yes
  • No

Reviewer, please note:

  • Text only. No behavior change.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I ran the full test suite before pushing the changes and all the tests pass.

Local test run: I ran the full suite on Python 3.8 with Click 8.1.8. No test asserts these strings. 8 tests in test_cli_agent.py and test_cli_config_oauth.py fail with stderr not separately captured on this branch and on master too. These tests need Click 8.2, which needs Python 3.10 or later. CI must confirm the full result.

🤖 Generated with Claude Code

- `-o` and `-O` help: say what each option does to the value, and give
  an example. "Raw strings" and "interpreted strings" did not tell users
  which one to use.
- `migrate -v`: add help text.
- `upload_dir`: remove the double space in `Uploading  directory`.
- `sync --pull`: add the folder name to `Preparing to download N items
  from Cloudinary folder`, which ended with a space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TalLevAmi
TalLevAmi marked this pull request as ready for review September 26, 2026 16:16

@const-cloudinary const-cloudinary left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@TalLevAmi, please improve description of some of the parameters, they can be misleading, especially for naive LLMs

Comment thread cloudinary_cli/core/provisioning.py Outdated
help="Pass an optional parameter as a string, with no parsing. e.g. -o tags a,b")
@option("-O", "--optional_parameter_parsed", multiple=True, nargs=2,
help="Pass optional parameters as interpreted strings.")
help="Pass an optional parameter and parse its value as JSON or a boolean. e.g. -O context '{\"alt\": \"cat\"}'")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Example is misleading, provisioning commands do not support context parameter.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 pr-nanny (automated): You are correct. The provisioning methods do not accept context. The -O example is now -O enabled true (b1875de).

Comment thread cloudinary_cli/core/provisioning.py Outdated
@argument("params", nargs=-1)
@option("-o", "--optional_parameter", multiple=True, nargs=2, help="Pass optional parameters as raw strings.")
@option("-o", "--optional_parameter", multiple=True, nargs=2,
help="Pass an optional parameter as a string, with no parsing. e.g. -o tags a,b")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Example is misleading, provisioning commands do not support tags parameter.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 pr-nanny (automated): You are correct. The provisioning methods do not accept tags. The -o example is now -o prefix demo (b1875de).

Comment thread cloudinary_cli/core/utils.py Outdated
help="Pass an optional parameter as a string, with no parsing. e.g. -o tags a,b")
@option("-O", "--optional_parameter_parsed", multiple=True, nargs=2,
help="Pass optional parameters as interpreted strings.")
help="Pass an optional parameter and parse its value as JSON or a boolean. e.g. -O context '{\"alt\": \"cat\"}'")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Example is misleading, utils commands do not support context parameter.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 pr-nanny (automated): You are correct. The utils methods do not accept context. The -O example is now -O sign_url true (b1875de).

The provisioning methods do not accept tags or context, and the utils
methods do not accept context. The examples now use prefix, enabled and
sign_url.
@const-cloudinary
const-cloudinary merged commit e472eba into master Sep 30, 2026
8 checks passed
@const-cloudinary
const-cloudinary deleted the fix/help-and-log-text branch September 30, 2026 10:16
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.

2 participants