Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Product search samples#192

Closed
nirupa-kumar wants to merge 26 commits intogoogleapis:masterfrom
nirupa-kumar:product-search-samples
Closed

Product search samples#192
nirupa-kumar wants to merge 26 commits intogoogleapis:masterfrom
nirupa-kumar:product-search-samples

Conversation

@nirupa-kumar
Copy link
Copy Markdown
Contributor

Product Search (v1p3beta1)

This Pull Request adds the code samples for cloud.google.com documentation for Product Search How-to Guides

Product Search How-to Guides –> vision/product-search/docs/how-to

products.js

  • create_product
  • get_product
  • list_products
  • delete_product
  • update_product_labels

productSets.js

  • create_product_set
  • get_product_set
  • list_product_sets
  • delete_product_set

–> Products in productSets.js

  • add_product_to_product_set
  • list_products_in_product_set
  • remove_product_from_product_set

referenceImages.js

  • create_reference_image
  • get_reference_image
  • list_reference_images
  • delete_reference_image

similarProducts.js

  • get_similar_products_file
  • get_similar_products_uri

importProductSets.js

  • import_product_images
    This last sample has been newly added after looking into the python and Java samples for comparison.

For the canonical versions, please see the Python Product Search Samples in python-docs-samples

These samples are in Beta and require using the v1p3beta1 API endpoint:

const vision = require('@google-cloud/vision').v1p3beta1;
const client = new vision.ProductSearchClient();

Before being ready for review & merge:

  • Tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary) - working on this one - README is not getting updated with the Product Search code - looking into it.

Rebecca Taylor and others added 22 commits July 23, 2018 21:30
@googlebot
Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Sep 11, 2018
@nirupa-kumar
Copy link
Copy Markdown
Contributor Author

@Beccca @ace-n @jmdobry
Please review.
I'm guessing since I do not have write access on the repo I am unable to add to the original pull request (#136) Please let me know if there is anything that can be done.
I have also added one more sample for importing product sets that was previously not included in the list. This matches up with the samples found in Java and python.
The README file generation is currently not working and I am looking into it.

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 11, 2018

Codecov Report

Merging #192 into product-search-samples will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@                  Coverage Diff                  @@
##           product-search-samples   #192   +/-   ##
=====================================================
  Coverage                     100%   100%           
=====================================================
  Files                           2      2           
  Lines                          83     83           
=====================================================
  Hits                           83     83
Impacted Files Coverage Δ
src/helpers.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0ab090...e1d9a71. Read the comment docs.

@beccasaurus beccasaurus added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Sep 13, 2018
@googlebot
Copy link
Copy Markdown

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

Comment thread .circleci/config.yml
- image: 'node:6'
user: node
steps: &unit_tests_steps
- checkout

This comment was marked as spam.

This comment was marked as spam.

@googlebot
Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Sep 13, 2018
@beccasaurus
Copy link
Copy Markdown
Contributor

The PR currently shows 58 Commits & 79 Files Changed, only a few of which are related to Product Search samples

I'm not sure what caused this?

The Product Search content itself LGTM as far as I can tell, but the diff is disconcerting 😕

@JustinBeckwith
Copy link
Copy Markdown
Contributor

It looks like this is getting merged into the product-search-samples branch on this repo. Is that branch up to date with master? Why is the PR not against master?

@nirupa-kumar
Copy link
Copy Markdown
Contributor Author

@becca @JustinBeckwith
Please let me know if you know of a better way to approach this.
In short - there are three people who have worked on this, me included.The branch has not been merged into master. I have updated the branch itself with the master, but when doing a push - the 50+ commits got tagged along. One thing I am trying to do right now is doing a merge with the master and a rebase. But when doing a push (after the rebase), it gets rejected. The solutions I have found online range from "doing a force push" to "deleting the branch in remote and pushing it again". Trying to figure out which one makes more sense.

P.S.: I do not have write access to the repo.

@nirupa-kumar nirupa-kumar mentioned this pull request Sep 14, 2018
22 tasks
@beccasaurus
Copy link
Copy Markdown
Contributor

Oh! I didn't notice that this PR isn't being sent to master! Let me see if I can change that post-hoc...

@beccasaurus beccasaurus changed the base branch from product-search-samples to master September 14, 2018 22:29
@beccasaurus
Copy link
Copy Markdown
Contributor

THERE WE GO! Good catch @JustinBeckwith!

@beccasaurus beccasaurus added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Sep 14, 2018
@googlebot
Copy link
Copy Markdown

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

@googlebot
Copy link
Copy Markdown

CLAs look good, thanks!

@beccasaurus beccasaurus added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 14, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 14, 2018
@beccasaurus
Copy link
Copy Markdown
Contributor

I'll LGTM pending test pass!

Comment thread samples/productSearch/productSearch.v1p3beta1.js
Comment thread samples/productSearch/similarProducts.v1p3beta1.js
Comment thread samples/productSearch/similarProducts.v1p3beta1.js
@nirupa-kumar
Copy link
Copy Markdown
Contributor Author

Will be closing this PR , since new one with the rebased code as a direct branch on the master has been created. All review comments here have been resolved as part of #196

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants