Skip to content

Fix #437: add 10 editsite flags for tabcmd Classic parity - #452

Open
jacalata wants to merge 2 commits into
developmentfrom
jac/437-editsite-flags
Open

Fix #437: add 10 editsite flags for tabcmd Classic parity#452
jacalata wants to merge 2 commits into
developmentfrom
jac/437-editsite-flags

Conversation

@jacalata

Copy link
Copy Markdown
Contributor

Summary

tabcmd Classic exposes 12 site-configuration flags on editsite that tabcmd 2 was missing. This adds 10 of them. The 2 skipped:

  • --metrics-level — Tableau-internal VizQL telemetry, likely Cloud-N/A (pending VizQL team confirmation)
  • --cache-warmup-threshold — server-only, not applicable to Cloud

Flags added, with the SiteItem attribute each wires:

Classic flagSiteItem attribute
--guest-access-enabled / -gguest_access_enabled
--cache-warmup / --no-cache-warmupcache_warmup_enabled
--subscription-email / -ecustom_subscription_email + _enabled
--subscription-footer / -fcustom_subscription_footer + _enabled
--web-extraction-enabledweb_extraction_enabled
--allow-subscriptions / --no-allow-subscriptionsdisable_subscriptions (inverted)
--allow-web-authoring / --no-allow-web-authoringauthoring_enabled
--allow-mobile-snapshots / --no-allow-mobile-snapshotssheet_image_enabled
--time-zone STRINGtime_zone
--use-default-time-zoneuse_default_time_zone

Design notes

  • Paired positive/negative boolean flags default to None so an unpassed flag never touches the server setting. A naive default=False would flip cache-warmup, subscriptions, etc. OFF on every editsite call.
  • --time-zone and --use-default-time-zone are argparse-enforced mutually exclusive.
  • Flags live in a new set_edit_site_only_args helper (not set_common_site_args) because create_site_command doesn't wire these attributes; adding to the shared helper would advertise unwired flags in createsite --help.
  • --allow-mobile-snapshots maps onto sheet_image_enabled, NOT mobile_biometrics_enabled (a separate biometric-auth feature).
  • --allow-subscriptions is inverted onto disable_subscriptions because that's how the REST API expresses the setting.

Upstream TSC bugs discovered (not fixed here)

RequestFactory.py lowercases both customSubscriptionEmail and customSubscriptionFooter on the wire, so user@Domain.com will be sent as user@domain.com. To be filed separately in server-client-python.

Test plan

  • 30 new parser tests in tests/parsers/test_parser_edit_site.py cover each flag's arg form, mutual exclusion, and default=None behavior
  • Full parsers suite: 127 passed, 1 skipped (pre-existing)

Closes#437.

🤖 Generated with Claude Code

tabcmd Classic exposes 12 site-configuration flags on editsite that
tabcmd 2 was missing. This adds 10 of them (the 2 skipped items are
--metrics-level, which is Tableau-internal VizQL telemetry likely
Cloud-N/A pending VizQL team confirmation, and --cache-warmup-threshold,
which is server-only).
Flags added, with the SiteItem attribute each wires:
- --guest-access-enabled / -g -> guest_access_enabled
- --cache-warmup / --no-cache-warmup -> cache_warmup_enabled
- --subscription-email / -e -> custom_subscription_email + _enabled
- --subscription-footer / -f -> custom_subscription_footer + _enabled
- --web-extraction-enabled -> web_extraction_enabled
- --allow-subscriptions / --no-* -> disable_subscriptions (inverted)
- --allow-web-authoring / --no-* -> authoring_enabled
- --allow-mobile-snapshots / --no-* -> sheet_image_enabled
- --time-zone STRING -> time_zone
- --use-default-time-zone -> use_default_time_zone
Design notes:
- Paired positive/negative boolean flags default to None so an unpassed
flag never touches the server setting (critical: a naive default=False
would flip cache-warmup / subscriptions / etc. off on every editsite).
- --time-zone and --use-default-time-zone are argparse-enforced mutually
exclusive.
- Flags live in a new set_edit_site_only_args helper (not
set_common_site_args) because create_site_command doesn't wire these
attributes; adding to the shared helper would advertise unwired flags
in `createsite --help`.
- --allow-mobile-snapshots maps onto sheet_image_enabled, NOT
mobile_biometrics_enabled (that's a separate biometric-auth feature).
- --allow-subscriptions is inverted onto disable_subscriptions because
that's how the REST API expresses the setting.
Two upstream TSC bugs surfaced during implementation but not fixed here:
RequestFactory.py lowercases both customSubscriptionEmail and
customSubscriptionFooter on the wire, so `user@Domain.com` will be sent
as `user@domain.com`. To be filed separately.
Tests: 30 new parser tests in tests/parsers/test_parser_edit_site.py
cover each flag's arg form, mutual exclusion, and default None
behavior. Full parsers suite: 127 passed, 1 skipped (pre-existing).
Fixes#437.
@github-actions

github-actionsBot commented Aug 4, 2026

Copy link
Copy Markdown

The initial commit predated a black run; CI's black check failed on this
file (repo pins black 22).
Sign up for freeto 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

@jacalata