Skip to content

Commit

Permalink
feat: add services to aiplatform_v1beta1 (#367)
Browse files Browse the repository at this point in the history
* feat: add services to aiplatform_v1beta1

feat: add featurestore, index, metadata, monitoring, pipeline, and tensorboard services to aiplatform_v1beta1

* add empty testing/constraints, lower coverage fail-under
  • Loading branch information
dizcology committed May 5, 2021
1 parent 7abf8ef commit beb4032
Show file tree
Hide file tree
Showing 254 changed files with 80,478 additions and 4,293 deletions.
6 changes: 3 additions & 3 deletions .coveragerc
Expand Up @@ -2,10 +2,10 @@
branch = True

[report]
fail_under = 99
fail_under = 100
show_missing = True
omit =
.nox/*
google/cloud/aiplatform/v1/schema/trainingjob/definition/__init__.py
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
Expand All @@ -15,4 +15,4 @@ exclude_lines =
# This is added at the module level as a safeguard for if someone
# generates the code and tries to run it without pip installing. This
# makes it virtually impossible to test properly.
except pkg_resources.DistributionNotFound
except pkg_resources.DistributionNotFound
2 changes: 1 addition & 1 deletion .github/header-checker-lint.yml
@@ -1,6 +1,6 @@
{"allowedCopyrightHolders": ["Google LLC"],
"allowedLicenses": ["Apache-2.0", "MIT", "BSD-3"],
"ignoreFiles": ["**/requirements.txt", "**/requirements-test.txt"],
"ignoreFiles": ["**/requirements.txt", "**/requirements-test.txt", "**/__init__.py", "samples/**/constraints.txt", "samples/**/constraints-test.txt"],
"sourceFileExtensions": [
"ts",
"js",
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -26,7 +26,6 @@ pip-log.txt

# Unit test / coverage reports
.coverage
.coverage.*
.nox
.cache
.pytest_cache
Expand Down
4 changes: 2 additions & 2 deletions .kokoro/release.sh
Expand Up @@ -26,7 +26,7 @@ python3 -m pip install --upgrade twine wheel setuptools
export PYTHONUNBUFFERED=1

# Move into the package, build the distribution and upload.
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password")
TWINE_PASSWORD=$(cat "${KOKORO_GFILE_DIR}/secret_manager/google-cloud-pypi-token")
cd github/python-aiplatform
python3 setup.py sdist bdist_wheel
twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/*
twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/*
14 changes: 2 additions & 12 deletions .kokoro/release/common.cfg
Expand Up @@ -23,18 +23,8 @@ env_vars: {
value: "github/python-aiplatform/.kokoro/release.sh"
}

# Fetch PyPI password
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google_cloud_pypi_password"
}
}
}

# Tokens needed to report release status back to GitHub
env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem"
}
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem,google-cloud-pypi-token"
}
16 changes: 15 additions & 1 deletion .pre-commit-config.yaml
@@ -1,3 +1,17 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
Expand All @@ -12,6 +26,6 @@ repos:
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
rev: 3.9.1
hooks:
- id: flake8
16 changes: 1 addition & 15 deletions CONTRIBUTING.rst
Expand Up @@ -160,21 +160,7 @@ Running System Tests
auth settings and change some configuration in your project to
run all the tests.

- System tests will be run against an actual project and
so you'll need to provide some environment variables to facilitate
authentication to your project:

- ``GOOGLE_APPLICATION_CREDENTIALS``: The path to a JSON key file;
Such a file can be downloaded directly from the developer's console by clicking
"Generate new JSON key". See private key
`docs <https://cloud.google.com/storage/docs/authentication#generating-a-private-key>`__
for more details.

- Once you have downloaded your json keys, set the environment variable
``GOOGLE_APPLICATION_CREDENTIALS`` to the absolute path of the json file::

$ export GOOGLE_APPLICATION_CREDENTIALS="/Users/<your_username>/path/to/app_credentials.json"

- System tests will be run against an actual project. You should use local credentials from gcloud when possible. See `Best practices for application authentication <https://cloud.google.com/docs/authentication/best-practices-applications#local_development_and_testing_with_the>`__. Some tests require a service account. For those tests see `Authenticating as a service account <https://cloud.google.com/docs/authentication/production>`__.

*************
Test Coverage
Expand Down
13 changes: 12 additions & 1 deletion docs/_static/custom.css
@@ -1,9 +1,20 @@
div#python2-eol {
border-color: red;
border-width: medium;
}
}

/* Ensure minimum width for 'Parameters' / 'Returns' column */
dl.field-list > dt {
min-width: 100px
}

/* Insert space between methods for readability */
dl.method {
padding-top: 10px;
padding-bottom: 10px
}

/* Insert empty space between classes */
dl.class {
padding-bottom: 50px
}
@@ -0,0 +1,6 @@
FeaturestoreOnlineServingService
--------------------------------------------------

.. automodule:: google.cloud.aiplatform_v1beta1.services.featurestore_online_serving_service
:members:
:inherited-members:
11 changes: 11 additions & 0 deletions docs/aiplatform_v1beta1/featurestore_service.rst
@@ -0,0 +1,11 @@
FeaturestoreService
-------------------------------------

.. automodule:: google.cloud.aiplatform_v1beta1.services.featurestore_service
:members:
:inherited-members:


.. automodule:: google.cloud.aiplatform_v1beta1.services.featurestore_service.pagers
:members:
:inherited-members:
11 changes: 11 additions & 0 deletions docs/aiplatform_v1beta1/index_endpoint_service.rst
@@ -0,0 +1,11 @@
IndexEndpointService
--------------------------------------

.. automodule:: google.cloud.aiplatform_v1beta1.services.index_endpoint_service
:members:
:inherited-members:


.. automodule:: google.cloud.aiplatform_v1beta1.services.index_endpoint_service.pagers
:members:
:inherited-members:
11 changes: 11 additions & 0 deletions docs/aiplatform_v1beta1/index_service.rst
@@ -0,0 +1,11 @@
IndexService
------------------------------

.. automodule:: google.cloud.aiplatform_v1beta1.services.index_service
:members:
:inherited-members:


.. automodule:: google.cloud.aiplatform_v1beta1.services.index_service.pagers
:members:
:inherited-members:
11 changes: 11 additions & 0 deletions docs/aiplatform_v1beta1/metadata_service.rst
@@ -0,0 +1,11 @@
MetadataService
---------------------------------

.. automodule:: google.cloud.aiplatform_v1beta1.services.metadata_service
:members:
:inherited-members:


.. automodule:: google.cloud.aiplatform_v1beta1.services.metadata_service.pagers
:members:
:inherited-members:
6 changes: 6 additions & 0 deletions docs/aiplatform_v1beta1/services.rst
Expand Up @@ -5,10 +5,16 @@ Services for Google Cloud Aiplatform v1beta1 API

dataset_service
endpoint_service
featurestore_online_serving_service
featurestore_service
index_endpoint_service
index_service
job_service
metadata_service
migration_service
model_service
pipeline_service
prediction_service
specialist_pool_service
tensorboard_service
vizier_service
11 changes: 11 additions & 0 deletions docs/aiplatform_v1beta1/tensorboard_service.rst
@@ -0,0 +1,11 @@
TensorboardService
------------------------------------

.. automodule:: google.cloud.aiplatform_v1beta1.services.tensorboard_service
:members:
:inherited-members:


.. automodule:: google.cloud.aiplatform_v1beta1.services.tensorboard_service.pagers
:members:
:inherited-members:
13 changes: 13 additions & 0 deletions docs/conf.py
@@ -1,4 +1,17 @@
# -*- coding: utf-8 -*-
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# google-cloud-aiplatform documentation build configuration file
#
Expand Down

0 comments on commit beb4032

Please sign in to comment.