Skip to content

chore: preview of onboarding google-cloud-vision gems to Librarian - #36531

Draft
suztomo wants to merge 3 commits into
googleapis:mainfrom
suztomo:chore/onboarding-google-cloud-vision-toys
Draft

chore: preview of onboarding google-cloud-vision gems to Librarian#36531
suztomo wants to merge 3 commits into
googleapis:mainfrom
suztomo:chore/onboarding-google-cloud-vision-toys

Conversation

@suztomo

@suztomo suztomo commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

Preview of migrating the three google-cloud-vision gems requiring custom code generation via toys tasks from OwlBot to Librarian:

  • google-cloud-vision-v1
  • google-cloud-vision-v1p3beta1
  • google-cloud-vision-v1p4beta1

Resolves googleapis/librarian#7449.
Requires Librarian PR googleapis/librarian#7513.

Configuration (librarian.yaml)

Each gem configures ruby.toys_tasks to run generate-helpers after code generation:

  - name: google-cloud-vision-v1
    version: 1.7.1
    apis:
      - path: google/cloud/vision/v1
        ruby:
          ruby_cloud_opts:
            ruby-cloud-env-prefix: VISION
    keep:
      - .toys/generate-helpers.rb
      - acceptance/data
      - acceptance/google/cloud/vision/v1/helpers_smoke_test.rb
      - acceptance/google/cloud/vision/v1/image_annotator_smoke_test.rb
      - lib/google/cloud/vision/v1/image_annotator/helpers.rb
      - owlbot-templates/helpers_smoke_test.erb
      - owlbot-templates/image_annotator_helpers.erb
      - owlbot-templates/image_annotator_helpers_test.erb
      - test/google/cloud/vision/v1/image_annotator_helpers_test.rb
    ruby:
      toys_tasks:
        - generate-helpers

Diff Analysis

  • Custom Code Generation (Toys Tasks):
    • Invokes toys generate-helpers in the gem output directory after code generation, using the ERB templates under owlbot-templates/ to generate helpers.rb, helpers_smoke_test.rb, and image_annotator_helpers_test.rb.
  • OwlBot Removal:
    • Removed .OwlBot.yaml, .owlbot.rb, and .owlbot-manifest.json from all three gems.
  • Service Documentation & Gemspec Summaries:
    • Descriptions and summaries in README.md and .gemspec files updated to match service.yaml.
  • Snippet Script Permissions:
    • File permissions updated from 755 to 644 in snippets/.

Verification

Local tests and RuboCop ran cleanly:

toys ci --test --rubocop --doctest --gems google-cloud-vision-v1,google-cloud-vision-v1p3beta1,google-cloud-vision-v1p4beta1

Result: CI passed across all three gems (all unit tests, RuboCop checks, and doctests passed with 0 failures, 0 errors, 0 offenses).

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.

ruby: handle custom code generation (via Toy Tasks) in google-cloud-vision Gems

1 participant