FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix comments, date format, and CLI description in add_app_campaign.py by pattersonlois · Pull Request #1107 · googleads/google-ads-python · GitHub

Repository navigation

Fix comments, date format, and CLI description in add_app_campaign.py - #1107

Open
pattersonlois wants to merge 5 commits into
googleads:mainfrom
pattersonlois:fix-add-app-campaign-example
Open

pattersonlois wants to merge 5 commits into
googleads:mainfrom
pattersonlois:fix-add-app-campaign-example

Conversation

pattersonlois commented Nov 15, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor
  • Use ISO %Y-%m-%d date format in start_date_time and end_date_time to match the Campaign proto specification, anchored to a single datetime.now() call with explicit timedelta(days=...) units.
  • Clarify in create_ad_group that APP_CAMPAIGN supports audience signals (AdGroupCriterion.audience) rather than prohibiting all ad group criteria.
  • Update the commented-out ad_group_ad.ad.app_ad.images example in create_app_ad to construct an AdImageAsset message with a quoted "INSERT_AD_IMAGE_ASSET_RESOURCE_NAME_HERE" placeholder.
  • Fix grammar in the CLI ArgumentParser description (Adds an App campaign...).
  • Add unit tests in tests/examples/advanced_operations/add_app_campaign_test.py.

pattersonlois requested review from a team as code owners November 15, 2026 21:24

Copy link
Copy Markdown
Contributor Author

Thanks @bobhancockg! Addressed both comments in 3443562:

  • start_date_time / end_date_time: Captured now = datetime.now() once and passed explicit days=1 and days=365 to timedelta.
  • Commented-out app_ad.images snippet: Updated create_app_ad to construct an AdImageAsset (client.get_type("AdImageAsset")) with .asset = "INSERT_AD_IMAGE_ASSET_RESOURCE_NAME_HERE" and append it to ad_group_ad.ad.app_ad.images.
  • Unit tests: Added tests/examples/advanced_operations/add_app_campaign_test.py covering create_budget, create_campaign (verifying ISO %Y-%m-%d formatting and a single datetime.now() call), create_app_ad, and main.

Copy link
Copy Markdown
Contributor Author

Thanks @bobhancockg! Addressed both comments in 7dce71c:

  • GoogleAdsClient initialization in setUp(): Simplified initialization to pass only credentials and use_proto_plus=True so the test uses the library's default API version.
  • Targeting criteria and ad group assertions: Added assertions in test_main_runs_full_campaign_creation_sequence verifying the location constants (geoTargetConstants/21137, geoTargetConstants/2484), language constants (languageConstants/1000, languageConstants/1003), and AdGroup campaign and status fields.

Raibaz added the kokoro:run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Nov 20, 2026
kokoro-team removed the kokoro:run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Nov 20, 2026
Raibaz removed the request for review from dorasun November 20, 2026 20:08
Raibaz added the kokoro:run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Nov 20, 2026
kokoro-team removed the kokoro:run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL