Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoML: Add a TablesClient for automl-tables specific behavior. #8720

Merged
merged 11 commits into from
Aug 14, 2019
29 changes: 29 additions & 0 deletions automl/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,32 @@ Next Steps
API to see other available methods on the client.
- Read the `Product documentation`_ to learn
more about the product and see How-to Guides.

Making & Testing Local Changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you want to make changes to this library, here is how to set up your
development environment:

1. Make sure you have `virtualenv`_ installed and activated as shown above.
2. Run the following one-time setup (it will be persisted in your virtualenv):

.. code-block:: console

pip install -r ../docs/requirements.txt
pip install -U nox mock pytest

3. If you want to run all tests, you will need a billing-enabled
`GCP project`_, and a `service account`_ with access to the AutoML APIs.
Note: the first time the tests run in a new project it will take a _long_
time, on the order of 2-3 hours. This is one-time setup that will be skipped
in future runs.

.. _service account: https://cloud.google.com/iam/docs/creating-managing-service-accounts
.. _GCP project: https://cloud.google.com/resource-manager/docs/creating-managing-projects

.. code-block:: console

export PROJECT_ID=<project-id> GOOGLE_APPLICATION_CREDENTIALS=</path/to/creds.json>
nox

5 changes: 5 additions & 0 deletions automl/docs/gapic/v1beta1/tables.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
A tables-specific client for AutoML
===================================

.. automodule:: google.cloud.automl_v1beta1.tables.tables_client
:members:
1 change: 1 addition & 0 deletions automl/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Api Reference

gapic/v1beta1/api
gapic/v1beta1/types
gapic/v1beta1/tables


Changelog
Expand Down
7 changes: 6 additions & 1 deletion automl/google/cloud/automl_v1beta1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
from google.cloud.automl_v1beta1.gapic import auto_ml_client
from google.cloud.automl_v1beta1.gapic import enums
from google.cloud.automl_v1beta1.gapic import prediction_service_client
from google.cloud.automl_v1beta1.tables import tables_client


class TablesClient(tables_client.TablesClient):
__doc__ = tables_client.TablesClient.__doc__


class AutoMlClient(auto_ml_client.AutoMlClient):
Expand All @@ -33,4 +38,4 @@ class PredictionServiceClient(prediction_service_client.PredictionServiceClient)
enums = enums


__all__ = ("enums", "types", "AutoMlClient", "PredictionServiceClient")
__all__ = ("enums", "types", "AutoMlClient", "PredictionServiceClient", "TablesClient")
busunkim96 marked this conversation as resolved.
Show resolved Hide resolved
Empty file.
Loading