Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple repetitions in Google Cloud Vision API: Node.js Samples, broken markdown too #5684

Closed
7 tasks done
davie-robertson opened this issue Sep 16, 2024 · 5 comments
Closed
7 tasks done

Comments

@davie-robertson
Copy link

Please make sure you have searched for information in the following guides.

A screenshot that you have tested with "Try this API".

N/A

Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.

https://github.com/googleapis/google-cloud-node/blob/e67caa6c09990a161a58f7bef7fa6481ddda1f97/packages/google-cloud-vision/samples/README.md

A step-by-step description of how to reproduce the issue, based on the linked reproduction.

  1. look for sample code for using ImageAnnotator.safeSearchDetection in the Google Cloud Vision API: Node.js Samples
  2. See a list of examples
    Samples
    Image_annotator.async_batch_annotate_files
    Image_annotator.async_batch_annotate_images
    Image_annotator.batch_annotate_files
    Image_annotator.batch_annotate_images
    Product_search.add_product_to_product_set
    Product_search.create_product
    Product_search.create_product_set
    Product_search.create_reference_image
    Product_search.delete_product
    Product_search.delete_product_set
    Product_search.delete_reference_image
    Product_search.get_product
    Product_search.get_product_set
    Product_search.get_reference_image
    Product_search.import_product_sets
    Product_search.list_product_sets
    Product_search.list_products
    Product_search.list_products_in_product_set
    Product_search.list_reference_images
    Product_search.purge_products
    Product_search.remove_product_from_product_set
    Product_search.update_product
    Product_search.update_product_set
    Image_annotator.batch_annotate_images
    Image_annotator.async_batch_annotate_files
    Image_annotator.batch_annotate_images
    Image_annotator.async_batch_annotate_files
    Image_annotator.batch_annotate_images
    Product_search.add_product_to_product_set
    Product_search.create_product
    Product_search.create_product_set
    Product_search.create_reference_image
    Product_search.delete_product
    Product_search.delete_product_set
    Product_search.delete_reference_image
    Product_search.get_product
    Product_search.get_product_set
    Product_search.get_reference_image
    Product_search.import_product_sets
    Product_search.list_product_sets
    Product_search.list_products
    Product_search.list_products_in_product_set
    Product_search.list_reference_images
    Product_search.remove_product_from_product_set
    Product_search.update_product
    Product_search.update_product_set
    Image_annotator.async_batch_annotate_files
    Image_annotator.async_batch_annotate_images
    Image_annotator.batch_annotate_files
    Image_annotator.batch_annotate_images
    Product_search.add_product_to_product_set
    Product_search.create_product
    Product_search.create_product_set
    Product_search.create_reference_image
    Product_search.delete_product
    Product_search.delete_product_set
    Product_search.delete_reference_image
    Product_search.get_product
    Product_search.get_product_set
    Product_search.get_reference_image
    Product_search.import_product_sets
    Product_search.list_product_sets
    Product_search.list_products
    Product_search.list_products_in_product_set
    Product_search.list_reference_images
    Product_search.purge_products
    Product_search.remove_product_from_product_set
    Product_search.update_product
    Product_search.update_product_set
    Quickstart
  3. Click an examples thinking it will show the code, it doesn't
  4. Scroll down the page once you realise the hyperlinks don't work
  5. See repetition (3x?) of all the sample code
  6. Notice that all the Image_annotator sample contain batch_annotate but many are not batch annotations

A clear and concise description of what the bug is, and what you expected to happen.

The generator for the README.md seem to be broken.

The Google Cloud Vision API: Node.js Samples page should contain a list of sample code snippets that the user can click on and view.

It seems that all the code samples for all the branches versions are being placed into the same readme file, without clearly indicating to the user what version the sample code is for.

A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **

The README.md for code samples should be generated separately for each branch of code.

The ToC should link to code samples

I would have done a PR to fix this, but the code states:
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use python -m synthtool."

Copy link
Contributor

Issue was opened with an invalid reproduction link. Please make sure the repository is a valid, publicly-accessible github repository, and make sure the url is complete (example: https://github.com/googleapis/google-cloud-node)

@sofisl sofisl reopened this Sep 23, 2024
Copy link
Contributor

Issue was opened with an invalid reproduction link. Please make sure the repository is a valid, publicly-accessible github repository, and make sure the url is complete (example: https://github.com/googleapis/google-cloud-node)

@davie-robertson
Copy link
Author

davie-robertson commented Sep 23, 2024

It took a while as github search takes me to old code, but here it is https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-vision

That page has four links to Image_annotator.async_batch_annotate_files, when one would suffice

@sofisl sofisl reopened this Sep 26, 2024
Copy link
Contributor

Issue was opened with an invalid reproduction link. Please make sure the repository is a valid, publicly-accessible github repository, and make sure the url is complete (example: https://github.com/googleapis/google-cloud-node)

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

No branches or pull requests

2 participants