From 0b698c47146e55f5e73eb5d53b29ccb03833f5c0 Mon Sep 17 00:00:00 2001 From: Yu-Han Liu Date: Thu, 16 May 2019 14:59:39 -0700 Subject: [PATCH 1/2] replace demomaker with cloud-samples-data/video for video intelligence samples --- video/cloud-client/analyze/README.rst | 6 +++--- video/cloud-client/analyze/beta_snippets_test.py | 2 +- video/cloud-client/analyze/resources/README.md | 2 +- video/cloud-client/labels/labels_test.py | 2 +- video/cloud-client/quickstart/quickstart.py | 2 +- video/cloud-client/shotchange/README.rst | 4 ++-- video/cloud-client/shotchange/shotchange.py | 2 +- video/cloud-client/shotchange/shotchange_test.py | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/video/cloud-client/analyze/README.rst b/video/cloud-client/analyze/README.rst index 82b8cee36425..f5fc74378907 100644 --- a/video/cloud-client/analyze/README.rst +++ b/video/cloud-client/analyze/README.rst @@ -85,8 +85,8 @@ To run this sample: python analyze.py labels gs://cloud-ml-sandbox/video/chicago.mp4 python analyze.py labels_file resources/cat.mp4 - python analyze.py shots gs://demomaker/gbikes_dinosaur.mp4 - python analyze.py explicit_content gs://demomaker/gbikes_dinosaur.mp4 + python analyze.py shots gs://cloud-samples-data/video/gbikes_dinosaur.mp4 + python analyze.py explicit_content gs://cloud-samples-data/video/gbikes_dinosaur.mp4 positional arguments: {labels,labels_file,explicit_content,shots} @@ -157,4 +157,4 @@ to `browse the source`_ and `report issues`_. https://github.com/GoogleCloudPlatform/google-cloud-python/issues -.. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file +.. _Google Cloud SDK: https://cloud.google.com/sdk/ diff --git a/video/cloud-client/analyze/beta_snippets_test.py b/video/cloud-client/analyze/beta_snippets_test.py index 7402b014c95f..c6b7f7069e68 100644 --- a/video/cloud-client/analyze/beta_snippets_test.py +++ b/video/cloud-client/analyze/beta_snippets_test.py @@ -150,7 +150,7 @@ def test_track_objects(): @pytest.mark.slow def test_track_objects_gcs(): - in_file = 'gs://demomaker/cat.mp4' + in_file = 'gs://cloud-samples-data/video/cat.mp4' object_annotations = beta_snippets.track_objects_gcs(in_file) text_exists = False diff --git a/video/cloud-client/analyze/resources/README.md b/video/cloud-client/analyze/resources/README.md index e33d7137c4f6..1acbef1484a9 100644 --- a/video/cloud-client/analyze/resources/README.md +++ b/video/cloud-client/analyze/resources/README.md @@ -9,7 +9,7 @@ Copy from Google Cloud Storage to this folder for testing video analysis of local files. For `cat.mp4` used in the usage example, run the following `gcloud` command. - gsutil cp gs://demomaker/cat.mp4 . + gsutil cp gs://cloud-samples-data/video/cat.mp4 . Now, when you run the following command, the video used for label detection will be passed from here: diff --git a/video/cloud-client/labels/labels_test.py b/video/cloud-client/labels/labels_test.py index ae455b90c644..1249f5b95cbe 100644 --- a/video/cloud-client/labels/labels_test.py +++ b/video/cloud-client/labels/labels_test.py @@ -21,6 +21,6 @@ @pytest.mark.slow def test_feline_video_labels(capsys): - labels.analyze_labels('gs://demomaker/cat.mp4') + labels.analyze_labels('gs://cloud-samples-data/video/cat.mp4') out, _ = capsys.readouterr() assert 'Video label description: cat' in out diff --git a/video/cloud-client/quickstart/quickstart.py b/video/cloud-client/quickstart/quickstart.py index 1300e7747076..109038c53d00 100644 --- a/video/cloud-client/quickstart/quickstart.py +++ b/video/cloud-client/quickstart/quickstart.py @@ -30,7 +30,7 @@ def run_quickstart(): video_client = videointelligence.VideoIntelligenceServiceClient() features = [videointelligence.enums.Feature.LABEL_DETECTION] operation = video_client.annotate_video( - 'gs://demomaker/cat.mp4', features=features) + 'gs://cloud-samples-data/video/cat.mp4', features=features) print('\nProcessing video for label annotations:') result = operation.result(timeout=120) diff --git a/video/cloud-client/shotchange/README.rst b/video/cloud-client/shotchange/README.rst index 3d5bf2e7bcdf..f70472a3f5e4 100644 --- a/video/cloud-client/shotchange/README.rst +++ b/video/cloud-client/shotchange/README.rst @@ -86,7 +86,7 @@ To run this sample: Example Usage: - python shotchange.py gs://demomaker/gbikes_dinosaur.mp4 + python shotchange.py gs://cloud-samples-data/video/gbikes_dinosaur.mp4 positional arguments: path GCS path for shot change detection. @@ -113,4 +113,4 @@ to `browse the source`_ and `report issues`_. https://github.com/GoogleCloudPlatform/google-cloud-python/issues -.. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file +.. _Google Cloud SDK: https://cloud.google.com/sdk/ diff --git a/video/cloud-client/shotchange/shotchange.py b/video/cloud-client/shotchange/shotchange.py index 2db0e832d499..81bdefba6691 100644 --- a/video/cloud-client/shotchange/shotchange.py +++ b/video/cloud-client/shotchange/shotchange.py @@ -22,7 +22,7 @@ Example Usage: - python shotchange.py gs://demomaker/gbikes_dinosaur.mp4 + python shotchange.py gs://cloud-samples-data/video/gbikes_dinosaur.mp4 """ diff --git a/video/cloud-client/shotchange/shotchange_test.py b/video/cloud-client/shotchange/shotchange_test.py index 752e595cd7d3..39369c4b1fb2 100644 --- a/video/cloud-client/shotchange/shotchange_test.py +++ b/video/cloud-client/shotchange/shotchange_test.py @@ -21,6 +21,6 @@ @pytest.mark.slow def test_shots_dino(capsys): - shotchange.analyze_shots('gs://demomaker/gbikes_dinosaur.mp4') + shotchange.analyze_shots('gs://cloud-samples-data/video/gbikes_dinosaur.mp4') out, _ = capsys.readouterr() assert 'Shot 1:' in out From 38114fca531ee67c46a7f847c2c33b5a84eb27d1 Mon Sep 17 00:00:00 2001 From: Yu-Han Liu Date: Thu, 16 May 2019 15:08:40 -0700 Subject: [PATCH 2/2] flake --- video/cloud-client/shotchange/shotchange_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video/cloud-client/shotchange/shotchange_test.py b/video/cloud-client/shotchange/shotchange_test.py index 39369c4b1fb2..0722e0c66aaf 100644 --- a/video/cloud-client/shotchange/shotchange_test.py +++ b/video/cloud-client/shotchange/shotchange_test.py @@ -21,6 +21,7 @@ @pytest.mark.slow def test_shots_dino(capsys): - shotchange.analyze_shots('gs://cloud-samples-data/video/gbikes_dinosaur.mp4') + shotchange.analyze_shots( + 'gs://cloud-samples-data/video/gbikes_dinosaur.mp4') out, _ = capsys.readouterr() assert 'Shot 1:' in out