Skip to content

fix: accept yes/no on --encrypt for Classic parity - #450

Open
jacalata wants to merge 2 commits into
developmentfrom
jac/createextracts-encrypt-yesno
Open

fix: accept yes/no on --encrypt for Classic parity#450
jacalata wants to merge 2 commits into
developmentfrom
jac/createextracts-encrypt-yesno

Conversation

@jacalata

@jacalata jacalata commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • tabcmd Classic's --encrypt on createextracts takes an explicit yes or no value; tabcmd 2 treated it as a bare boolean flag, silently ignoring any following value.
  • Scripts that pass --encrypt no on Classic would have ended up encrypting on tabcmd 2 (argparse would consume no as a positional or bail).
  • Make --encrypt accept an optional yes|no|true|false argument (case-insensitive). Bare --encrypt still means True; omitted means False; explicit --encrypt no means False. Preserves current tabcmd 2 default while matching Classic syntax.

Test plan

  • tests/parsers/test_parser_create_extracts.py — 8 new tests cover omitted / bare / yes / no / true / false / case-insensitive / bad-value-rejected
  • Full test_parser_create_extracts.py suite: 15 passed

🤖 Generated with Claude Code

tabcmd Classic's `--encrypt` on `createextracts` takes an explicit
yes/no value; tabcmd 2 treated it as a bare boolean flag, silently
ignoring any following value. Scripts that pass `--encrypt no` on
Classic ended up encrypting on tabcmd 2 because argparse consumed the
"no" as a positional or bailed.

Make --encrypt accept an optional yes|no|true|false argument
(case-insensitive). Bare `--encrypt` still means True; omitted means
False; explicit `--encrypt no` means False. This preserves current
tabcmd 2 default behavior while matching Classic syntax.
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
tabcmd
   __main__.py121212 0%
   _version.py111111 0%
   tabcmd.py151515 0%
   version.py955 44%
tabcmd/commands
   commands.py101010 0%
   constants.py771818 77%
   server.py1351818 87%
tabcmd/commands/auth
   session.py3945050 87%
tabcmd/commands/datasources_and_workbooks
   datasources_and_workbooks_command.py1571818 89%
   datasources_workbooks_views_url_parser.py14255 96%
   delete_command.py601616 73%
   export_command.py1202525 79%
   get_url_command.py1274747 63%
   publish_command.py1232828 77%
   runschedule_command.py2177 67%
tabcmd/commands/extracts
   create_extracts_command.py4288 81%
   decrypt_extracts_command.py2722 93%
   delete_extracts_command.py3766 84%
   encrypt_extracts_command.py2722 93%
   extracts.py2022 90%
   reencrypt_extracts_command.py2722 93%
   refresh_extracts_command.py481010 79%
tabcmd/commands/group
   create_group_command.py2955 83%
   delete_group_command.py2722 93%
tabcmd/commands/project
   create_project_command.py4688 83%
   delete_project_command.py3544 89%
   publish_samples_command.py3044 87%
tabcmd/commands/site
   create_site_command.py3455 85%
   delete_site_command.py2722 93%
   edit_site_command.py3822 95%
   list_command.py771212 84%
   list_sites_command.py2922 93%
tabcmd/commands/user
   add_users_command.py2955 83%
   create_site_users.py581111 81%
   create_users_command.py5999 85%
   delete_site_users_command.py4355 88%
   user_data.py2223131 86%
tabcmd/execution
   _version.py222 0%
   global_options.py13388 94%
   localize.py661111 83%
   logger_config.py6066 90%
   tabcmd_controller.py4277 83%
TOTAL288145884% 

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.

1 participant