feat(adgroups): expose eight nested *FieldNames on adgroups get#420
Conversation
Add eight `--*-field-names` flags to `direct adgroups get` for the nested WSDL `*FieldNames` request parameters declared by `AdGroupsGetRequest`: - `--autotargeting-settings-brand-options-field-names` (AutotargetingBrandOptionsFieldEnum: WithoutBrands, WithAdvertiserBrand, WithCompetitorsBrand) - `--autotargeting-settings-categories-field-names` (AutotargetingCategoriesFieldEnum: Exact, Narrow, Alternative, Accessory, Broader) - `--dynamic-text-ad-group-field-names` (DynamicTextAdGroupFieldEnum) - `--dynamic-text-feed-ad-group-field-names` (DynamicTextFeedAdGroupFieldEnum) - `--mobile-app-ad-group-field-names` (MobileAppAdGroupFieldEnum) - `--smart-ad-group-field-names` (SmartAdGroupFieldEnum) - `--text-ad-group-feed-params-field-names` (TextAdGroupFeedParamsFieldEnum) - `--unified-ad-group-field-names` (UnifiedAdGroupFieldEnum) Mirrors the Wave 1 sitelinks pattern (#403). Each flag parses CSV via `parse_csv_strings`, rejects empty input with `click.UsageError`, and only injects the WSDL key when non-empty. The eight options share one selector loop. The two AutotargetingSettings.* enums are reused by keywords.get per #413; sample values and help wording stay consistent. Removes the corresponding rows from `NESTED_FIELDNAMES_EXCLUSIONS` so `test_every_nested_fieldnames_param_has_cli_option` enforces all eight flags. Adds parametrized dry-run tests for payload, default-omission, `--help` visibility, and empty-CSV rejection. Closes #405. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
@claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences — only flag issues that could break functionality or cause real harm in production. |
|
Claude finished @axisrow's task in 2m 2s —— View job Claude PR Review
Verdict: No critical issues found ✅Reviewed against the requested focus areas (bugs, security, logical errors, data-loss, performance). This PR is a clean, mechanical extension of the existing What I verified1. WSDL parity is exact — All eight WSDL element names referenced in code match 2. Empty-CSV handling is correct (
3. 4. No data-loss risk — 5. Default behavior preserved — When no new flag is supplied, 6. Backwards-compatible signature change — The eight new keyword args on Minor (non-blocking) observationThe eight options share one selector loop driven by TestsThe PR description shows the 11 new tests pass and the Approving in spirit — no production-affecting issues. |
Resolve conflicts with #415 #416 #417 #418 #419 #420: keep all six previously-merged CHANGELOG entries (feeds/keywords/creatives/clients/ agencyclients/adgroups) and place the campaigns BREAKING CHANGES block at the end of Unreleased. Drop the already-removed NESTED_FIELDNAMES_EXCLUSIONS rows. Update the surviving legacy `-fields` test fixtures to the new `-field-names` form, while keeping one explicit rejection test for `--text-campaign-fields` (the old name).
Resolve conflicts with #415 #416 #417 #418 #419 #420 #421: keep all six previously-merged CHANGELOG entries (feeds/keywords/creatives/clients/ agencyclients/adgroups), the campaigns BREAKING CHANGES block, and add the bidmodifiers entry as a separate 'Additional features' block. Drop already-removed NESTED_FIELDNAMES_EXCLUSIONS rows. Append bidmodifiers tests after the canonical campaigns block in test_dry_run.py.
Summary
--*-field-namesflags todirect adgroups getfor the nested WSDL*FieldNamesparameters declared byAdGroupsGetRequest:--autotargeting-settings-brand-options-field-names--autotargeting-settings-categories-field-names--dynamic-text-ad-group-field-names--dynamic-text-feed-ad-group-field-names--mobile-app-ad-group-field-names--smart-ad-group-field-names--text-ad-group-feed-params-field-names--unified-ad-group-field-namesAutotargetingSettings.*enums resurface ondirect keywords getper Wave 2 (#402): expose keywords get nested *FieldNames as CLI options #413; sample values and help wording stay consistent.NESTED_FIELDNAMES_EXCLUSIONS.Closes #405. Sixth PR in Wave 2 milestone 0.3.14.
Test plan
pytest tests/test_api_coverage.py::test_every_nested_fieldnames_param_has_cli_option— passes after row removal.pytest tests/test_dry_run.py -k adgroups_get— 11 new tests pass.pytest tests/test_api_coverage.py tests/test_cli.py tests/test_comprehensive.py— 247 tests pass.direct adgroups get --help | grep field-names— 8 new flags +--fieldsvisible.🤖 Generated with Claude Code