Skip to content

Commit

Permalink
fix: require python 3.7+ (#339)
Browse files Browse the repository at this point in the history
* chore(python): drop python 3.6

Source-Link: googleapis/synthtool@4f89b13
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c

* require python 3.7+ in setup.py

* remove python 3.6 sample configs

* trigger ci

* add api_description to .repo-metadata.json

* update name_pretty in .repo-metadata.json

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
  • Loading branch information
3 people authored Jul 9, 2022
1 parent aaff1b5 commit 95665a7
Show file tree
Hide file tree
Showing 19 changed files with 105 additions and 158 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:b2dc5f80edcf5d4486c39068c9fa11f7f851d9568eea4dcba130f994ea9b5e97
# created: 2022-06-12T16:09:31.61859086Z
digest: sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c
# created: 2022-07-05T18:31:20.838186805Z
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.6', '3.7', '3.8', '3.9', '3.10']
python: ['3.7', '3.8', '3.9', '3.10']
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export PYTHONUNBUFFERED=1
env | grep KOKORO

# Install nox
python3.6 -m pip install --upgrade --quiet nox
python3.9 -m pip install --upgrade --quiet nox

# Use secrets acessor service account to get secrets
if [[ -f "${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" ]]; then
Expand Down Expand Up @@ -76,7 +76,7 @@ for file in samples/**/requirements.txt; do
echo "------------------------------------------------------------"

# Use nox to execute the tests for the project.
python3.6 -m nox -s "$RUN_TESTS_SESSION"
python3.9 -m nox -s "$RUN_TESTS_SESSION"
EXIT=$?

# If this is a periodic build, send the test log to the FlakyBot.
Expand Down
5 changes: 3 additions & 2 deletions packages/google-cloud-videointelligence/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "videointelligence",
"name_pretty": "Cloud Video Intelligence",
"name_pretty": "Video Intelligence",
"product_documentation": "https://cloud.google.com/video-intelligence/docs/",
"client_documentation": "https://cloud.google.com/python/docs/reference/videointelligence/latest",
"issue_tracker": "https://issuetracker.google.com/savedsearches/5084810",
Expand All @@ -13,5 +13,6 @@
"requires_billing": true,
"default_version": "v1",
"codeowner_team": "@googleapis/cdpe-cloudai",
"api_shortname": "videointelligence"
"api_shortname": "videointelligence",
"api_description": "makes videos searchable, and discoverable, by extracting metadata with an easy to use API. You can now search every moment of every video file in your catalog and find every occurrence as well as its significance. It quickly annotates videos stored in Google Cloud Storage, and helps you identify key nouns entities of your video, and when they occur within the video. Separate signal from noise, by retrieving relevant information at the video, shot or per frame."
}
6 changes: 2 additions & 4 deletions packages/google-cloud-videointelligence/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions:
3.6, 3.7, 3.8, 3.9 and 3.10 on both UNIX and Windows.
3.7, 3.8, 3.9 and 3.10 on both UNIX and Windows.

- The feature must not add unnecessary dependencies (where
"unnecessary" is of course subjective, but new dependencies should
Expand Down Expand Up @@ -221,13 +221,11 @@ Supported Python Versions

We support:

- `Python 3.6`_
- `Python 3.7`_
- `Python 3.8`_
- `Python 3.9`_
- `Python 3.10`_

.. _Python 3.6: https://docs.python.org/3.6/
.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/
.. _Python 3.9: https://docs.python.org/3.9/
Expand All @@ -239,7 +237,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
.. _config: https://github.com/googleapis/python-videointelligence/blob/main/noxfile.py


We also explicitly decided to support Python 3 beginning with version 3.6.
We also explicitly decided to support Python 3 beginning with version 3.7.
Reasons for this include:

- Encouraging use of newest versions of Python 3
Expand Down
72 changes: 34 additions & 38 deletions packages/google-cloud-videointelligence/README.rst
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
Python Client for Google Cloud Video Intelligence
=================================================
Python Client for Video Intelligence API
========================================

|ga| |pypi| |versions|
|stable| |pypi| |versions|

`Google Cloud Video Intelligence`_ API makes videos searchable, and
discoverable, by extracting metadata with an easy to use API.
You can now search every moment of every video file in your catalog
and find every occurrence as well as its significance. It quickly
annotates videos stored in `Google Cloud Storage`_, and helps you
identify key nouns entities of your video, and when they occur
within the video. Separate signal from noise, by retrieving
relevant information at the video, shot or per frame.
`Video Intelligence API`_: makes videos searchable, and discoverable, by extracting metadata with an easy to use API. You can now search every moment of every video file in your catalog and find every occurrence as well as its significance. It quickly annotates videos stored in Google Cloud Storage, and helps you identify key nouns entities of your video, and when they occur within the video. Separate signal from noise, by retrieving relevant information at the video, shot or per frame.

- `Client Library Documentation`_
- `Product Documentation`_

.. |ga| image:: https://img.shields.io/badge/support-ga-gold.svg
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#ga-support
.. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-videointelligence.svg
:target: https://pypi.org/project/google-cloud-videointelligence/
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-videointelligence.svg
:target: https://pypi.org/project/google-cloud-videointelligence/
.. _Google Cloud Video Intelligence: https://cloud.google.com/video-intelligence/
.. _Google Cloud Storage: https://cloud.google.com/storage/
.. _Video Intelligence API: https://cloud.google.com/video-intelligence/docs/
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/videointelligence/latest
.. _Product Documentation: https://cloud.google.com/video-intelligence/docs/
.. _Product Documentation: https://cloud.google.com/video-intelligence/docs/

Quick Start
-----------
Expand All @@ -33,12 +25,12 @@ In order to use this library, you first need to go through the following steps:

1. `Select or create a Cloud Platform project.`_
2. `Enable billing for your project.`_
3. `Enable the Google Cloud Video Intelligence API.`_
3. `Enable the Video Intelligence API.`_
4. `Setup Authentication.`_

.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
.. _Enable the Google Cloud Video Intelligence API.: https://cloud.google.com/datastore
.. _Enable the Video Intelligence API.: https://cloud.google.com/video-intelligence/docs/
.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html

Installation
Expand All @@ -54,15 +46,27 @@ dependencies.

.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/


Code samples and snippets
~~~~~~~~~~~~~~~~~~~~~~~~~

Code samples and snippets live in the `samples/` folder.


Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^
Python >= 3.6
Our client libraries are compatible with all current [active](https://devguide.python.org/devcycle/#in-development-main-branch) and [maintenance](https://devguide.python.org/devcycle/#maintenance-branches) versions of
Python.

Python >= 3.7

Unsupported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Python == 2.7.
Python <= 3.6

If you are using an [end-of-life](https://devguide.python.org/devcycle/#end-of-life-branches)
version of Python, we recommend that you update as soon as possible to an actively supported version.

The last version of this library compatible with Python 2.7 is google-cloud-videointelligence==1.17.0.

Mac/Linux
^^^^^^^^^
Expand All @@ -74,6 +78,7 @@ Mac/Linux
source <your-env>/bin/activate
<your-env>/bin/pip install google-cloud-videointelligence
Windows
^^^^^^^

Expand All @@ -84,24 +89,15 @@ Windows
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-videointelligence
Example Usage
~~~~~~~~~~~~~

.. code-block:: python
from google.cloud import videointelligence
client = videointelligence.VideoIntelligenceServiceClient()
job = client.annotate_video(
input_uri='gs://<bucket-name>/my_video.mp4',
features=['LABEL_DETECTION', 'SHOT_CHANGE_DETECTION'],
)
result = job.result()
Next Steps
~~~~~~~~~~

- Read the `Client Library Documentation`_ for Google Cloud Video Intelligence
API to see other available methods on the client.
- Read the `Product documentation`_ to learn
- Read the `Client Library Documentation`_ for Video Intelligence API
to see other available methods on the client.
- Read the `Video Intelligence API Product documentation`_ to learn
more about the product and see How-to Guides.
- View this `README`_ to see the full list of Cloud
APIs that we cover.

.. _Video Intelligence API Product documentation: https://cloud.google.com/video-intelligence/docs/
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
2 changes: 1 addition & 1 deletion packages/google-cloud-videointelligence/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.. include:: multiprocessing.rst

This package includes clients for multiple versions of Cloud Video Intelligence.
This package includes clients for multiple versions of Video Intelligence.
By default, you will get version ``videointelligence_v1``.


Expand Down
Loading

0 comments on commit 95665a7

Please sign in to comment.