From 80510cd618a82926ee6dcedb0fd8c5dc7bf409cf Mon Sep 17 00:00:00 2001 From: Eric Schmidt Date: Wed, 2 Dec 2020 17:00:53 -0800 Subject: [PATCH 1/2] feat: updates person detection samples for GA --- .../{video_detect_person_beta.py => video_detect_person.py} | 6 +++--- ...detect_person_gcs_beta.py => video_detect_person_gcs.py} | 6 +++--- ...son_gcs_beta_test.py => video_detect_person_gcs_test.py} | 2 +- ...tect_person_beta_test.py => video_detect_person_test.py} | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename samples/analyze/{video_detect_person_beta.py => video_detect_person.py} (96%) rename samples/analyze/{video_detect_person_gcs_beta.py => video_detect_person_gcs.py} (95%) rename samples/analyze/{video_detect_person_gcs_beta_test.py => video_detect_person_gcs_test.py} (96%) rename samples/analyze/{video_detect_person_beta_test.py => video_detect_person_test.py} (97%) diff --git a/samples/analyze/video_detect_person_beta.py b/samples/analyze/video_detect_person.py similarity index 96% rename from samples/analyze/video_detect_person_beta.py rename to samples/analyze/video_detect_person.py index 143d1b7d..aea812c5 100644 --- a/samples/analyze/video_detect_person_beta.py +++ b/samples/analyze/video_detect_person.py @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START video_detect_person_beta] +# [START video_detect_person] import io -from google.cloud import videointelligence_v1p3beta1 as videointelligence +from google.cloud import videointelligence_v1 as videointelligence def detect_person(local_file_path="path/to/your/video-file.mp4"): @@ -98,4 +98,4 @@ def detect_person(local_file_path="path/to/your/video-file.mp4"): ) -# [END video_detect_person_beta] +# [END video_detect_person] diff --git a/samples/analyze/video_detect_person_gcs_beta.py b/samples/analyze/video_detect_person_gcs.py similarity index 95% rename from samples/analyze/video_detect_person_gcs_beta.py rename to samples/analyze/video_detect_person_gcs.py index 7496fd25..ebc63c19 100644 --- a/samples/analyze/video_detect_person_gcs_beta.py +++ b/samples/analyze/video_detect_person_gcs.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# [START video_detect_person_gcs_beta] -from google.cloud import videointelligence_v1p3beta1 as videointelligence +# [START video_detect_person_gcs] +from google.cloud import videointelligence_v1 as videointelligence def detect_person(gcs_uri="gs://YOUR_BUCKET_ID/path/to/your/video.mp4"): @@ -93,4 +93,4 @@ def detect_person(gcs_uri="gs://YOUR_BUCKET_ID/path/to/your/video.mp4"): ) -# [END video_detect_person_gcs_beta] +# [END video_detect_person_gcs] diff --git a/samples/analyze/video_detect_person_gcs_beta_test.py b/samples/analyze/video_detect_person_gcs_test.py similarity index 96% rename from samples/analyze/video_detect_person_gcs_beta_test.py rename to samples/analyze/video_detect_person_gcs_test.py index 629e141a..7f1eb277 100644 --- a/samples/analyze/video_detect_person_gcs_beta_test.py +++ b/samples/analyze/video_detect_person_gcs_test.py @@ -16,7 +16,7 @@ import pytest -import video_detect_person_gcs_beta +import video_detect_person_gcs RESOURCES = os.path.join(os.path.dirname(__file__), "resources") diff --git a/samples/analyze/video_detect_person_beta_test.py b/samples/analyze/video_detect_person_test.py similarity index 97% rename from samples/analyze/video_detect_person_beta_test.py rename to samples/analyze/video_detect_person_test.py index 4b7ce2ae..ea165294 100644 --- a/samples/analyze/video_detect_person_beta_test.py +++ b/samples/analyze/video_detect_person_test.py @@ -16,7 +16,7 @@ import pytest -import video_detect_person_beta +import video_detect_person RESOURCES = os.path.join(os.path.dirname(__file__), "resources") From ef673ae179882f8f5f62e23d07024776c12dfa6a Mon Sep 17 00:00:00 2001 From: Eric Schmidt Date: Wed, 2 Dec 2020 18:07:40 -0800 Subject: [PATCH 2/2] fix: issues --- samples/analyze/video_detect_person_gcs_test.py | 2 +- samples/analyze/video_detect_person_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/analyze/video_detect_person_gcs_test.py b/samples/analyze/video_detect_person_gcs_test.py index 7f1eb277..739c3980 100644 --- a/samples/analyze/video_detect_person_gcs_test.py +++ b/samples/analyze/video_detect_person_gcs_test.py @@ -25,7 +25,7 @@ def test_detect_person(capsys): input_uri = "gs://cloud-samples-data/video/googlework_tiny.mp4" - video_detect_person_gcs_beta.detect_person(gcs_uri=input_uri) + video_detect_person_gcs.detect_person(gcs_uri=input_uri) out, _ = capsys.readouterr() diff --git a/samples/analyze/video_detect_person_test.py b/samples/analyze/video_detect_person_test.py index ea165294..fcf7eb79 100644 --- a/samples/analyze/video_detect_person_test.py +++ b/samples/analyze/video_detect_person_test.py @@ -25,7 +25,7 @@ def test_detect_person(capsys): local_file_path = os.path.join(RESOURCES, "googlework_tiny.mp4") - video_detect_person_beta.detect_person(local_file_path=local_file_path) + video_detect_person.detect_person(local_file_path=local_file_path) out, _ = capsys.readouterr()