Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
59b85e8
fix(python): drop python 3.6
parthea Jun 1, 2022
92b45d5
chore(deps): update dependency ipython to v8.4.0 (#1445)
renovate-bot Jun 2, 2022
595d01c
chore(deps): update dependency google-cloud-aiplatform to v1.13.1 (#1…
renovate-bot Jun 2, 2022
03a5bc9
chore: update README (#1449)
Jun 6, 2022
ba8c9d9
chore(deps): update dependency pyupgrade to v2.34.0 (#1450)
renovate-bot Jun 7, 2022
e00daaf
build(node): add new jsteam + enforce branches up-to-date (#1451)
Jun 7, 2022
8438626
chore(deps): update dependency setuptools to v62.3.3 (#1453)
renovate-bot Jun 8, 2022
d3fc5ab
chore(deps): update dependency python to v3.10.5 (#1452)
renovate-bot Jun 9, 2022
7910bb8
chore(deps): update dependency google-cloud-aiplatform to v1.14.0 (#1…
renovate-bot Jun 10, 2022
09aff4d
chore: skip formatting generated samples (#1456)
eaball35 Jun 10, 2022
b1d93ce
chore(deps): update dependency setuptools to v62.3.4 (#1457)
renovate-bot Jun 12, 2022
72bdebb
chore: add prerelease nox session (#1455)
parthea Jun 12, 2022
4d388f2
chore(python): add missing import for prerelease testing (#1458)
parthea Jun 12, 2022
c490ecb
chore(deps): update dependency setuptools to v62.4.0 (#1459)
renovate-bot Jun 16, 2022
9f8e284
chore(deps): update dependency tabulate to v0.8.10 (#1463)
renovate-bot Jun 22, 2022
0bfc717
chore(deps): update dependency setuptools to v62.6.0 (#1462)
renovate-bot Jun 22, 2022
b0d5b50
chore: update java dependencies in templates (#1465)
Neenu1995 Jun 23, 2022
1bc4032
chore(deps): update dependency numpy to v1.23.0 (#1464)
renovate-bot Jun 23, 2022
61270dd
chore: update dependencies for regapic (#1467)
alicejli Jun 27, 2022
44167da
Merge remote-tracking branch 'origin/master' into drop-py-36
parthea Jul 5, 2022
8b90a97
fix prerelease testing
parthea Jul 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion synthtool/gcp/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def py_library(self, **kwargs) -> Path:
if "default_python_version" not in kwargs:
kwargs["default_python_version"] = "3.8"
if "unit_test_python_versions" not in kwargs:
kwargs["unit_test_python_versions"] = ["3.6", "3.7", "3.8", "3.9", "3.10"]
kwargs["unit_test_python_versions"] = ["3.7", "3.8", "3.9", "3.10"]

if "system_test_python_versions" not in kwargs:
kwargs["system_test_python_versions"] = ["3.8"]
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

103 changes: 103 additions & 0 deletions synthtool/gcp/templates/python_library/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
Python Client for {{ metadata['repo']['name_pretty'] }} API
======================{% for i in range(metadata['repo']['name_pretty']|length) %}={% endfor %}

|{{ metadata['repo']['release_level'] }}| |pypi| |versions|

`{{ metadata['repo']['name_pretty'] }} API`_: {% if metadata['repo']['api_description'] %}{{metadata['repo']['api_description'] }}{% endif %}

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

.. |{{ metadata['repo']['release_level'] }}| image:: https://img.shields.io/badge/support-{{ metadata['repo']['release_level'] }}-{% if metadata['repo']['release_level'] == 'stable' %}gold{% else %}orange{% endif %}.svg
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
.. |pypi| image:: https://img.shields.io/pypi/v/{{ metadata['repo']['distribution_name'] }}.svg
:target: https://pypi.org/project/{{ metadata['repo']['distribution_name'] }}/
.. |versions| image:: https://img.shields.io/pypi/pyversions/{{ metadata['repo']['distribution_name'] }}.svg
:target: https://pypi.org/project/{{ metadata['repo']['distribution_name'] }}/
.. _{{ metadata['repo']['name_pretty'] }} API: {{ metadata['repo']['product_documentation'] }}
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/{{ metadata['repo']['api_shortname'] }}/latest
.. _Product Documentation: {{ metadata['repo']['product_documentation'] }}

Quick Start
-----------

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 {{ metadata['repo']['name_pretty'] }} 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 {{ metadata['repo']['name_pretty'] }} API.: {{ metadata['repo']['product_documentation'] }}
.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html

Installation
~~~~~~~~~~~~

Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.

With `virtualenv`_, it's possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.

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


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

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


Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^
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 <= 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.


Mac/Linux
^^^^^^^^^

.. code-block:: console

pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install {{ metadata['repo']['distribution_name'] }}


Windows
^^^^^^^

.. code-block:: console

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install {{ metadata['repo']['distribution_name'] }}

Next Steps
~~~~~~~~~~

- Read the `Client Library Documentation`_ for {{ metadata['repo']['name_pretty'] }} API
to see other available methods on the client.
- Read the `{{ metadata['repo']['name_pretty'] }} 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.

.. _{{ metadata['repo']['name_pretty'] }} API Product documentation: {{ metadata['repo']['product_documentation'] }}
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Install Dependencies
.. _Python Development Environment Setup Guide:
https://cloud.google.com/python/setup

#. Create a virtualenv. Samples are compatible with Python 3.6+.
#. Create a virtualenv. Samples are compatible with Python 3.7+.

.. code-block:: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Install Dependencies
.. _Python Development Environment Setup Guide:
https://cloud.google.com/python/setup

#. Create a virtualenv. Samples are compatible with Python 3.6+.
#. Create a virtualenv. Samples are compatible with Python 3.7+.

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion synthtool/gcp/templates/python_samples/noxfile.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]:

# DO NOT EDIT - automatically generated.
# All versions used to test samples.
ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"]
ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10"]

# Any default versions that should be ignored.
IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"]
Expand Down
3 changes: 1 addition & 2 deletions tests/fixtures/python_library/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand All @@ -101,7 +100,7 @@
namespace_packages=namespaces,
install_requires=dependencies,
extras_require=extras,
python_requires=">=3.6",
python_requires=">=3.7",
scripts=["scripts/fixup_keywords.py"],
include_package_data=True,
zip_safe=False,
Expand Down
3 changes: 1 addition & 2 deletions tests/fixtures/python_library_w_version_py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand All @@ -101,7 +100,7 @@
namespace_packages=namespaces,
install_requires=dependencies,
extras_require=extras,
python_requires=">=3.6",
python_requires=">=3.7",
scripts=["scripts/fixup_keywords.py"],
include_package_data=True,
zip_safe=False,
Expand Down