diff --git a/packages/google-analytics-admin/.kokoro/build.sh b/packages/google-analytics-admin/.kokoro/build.sh index 831e0ab037a3..c65a3d354d33 100755 --- a/packages/google-analytics-admin/.kokoro/build.sh +++ b/packages/google-analytics-admin/.kokoro/build.sh @@ -15,7 +15,11 @@ set -eo pipefail -cd github/python-analytics-admin +if [[ -z "${PROJECT_ROOT:-}" ]]; then + PROJECT_ROOT="github/python-analytics-admin" +fi + +cd "${PROJECT_ROOT}" # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 @@ -30,16 +34,16 @@ export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json") # Remove old nox -python3.6 -m pip uninstall --yes --quiet nox-automation +python3 -m pip uninstall --yes --quiet nox-automation # Install nox -python3.6 -m pip install --upgrade --quiet nox -python3.6 -m nox --version +python3 -m pip install --upgrade --quiet nox +python3 -m nox --version # If NOX_SESSION is set, it only runs the specified session, # otherwise run all the sessions. if [[ -n "${NOX_SESSION:-}" ]]; then - python3.6 -m nox -s "${NOX_SESSION:-}" + python3 -m nox -s ${NOX_SESSION:-} else - python3.6 -m nox + python3 -m nox fi diff --git a/packages/google-analytics-admin/.kokoro/docs/docs-presubmit.cfg b/packages/google-analytics-admin/.kokoro/docs/docs-presubmit.cfg index 1118107829b7..4ee2c46a3293 100644 --- a/packages/google-analytics-admin/.kokoro/docs/docs-presubmit.cfg +++ b/packages/google-analytics-admin/.kokoro/docs/docs-presubmit.cfg @@ -15,3 +15,14 @@ env_vars: { key: "TRAMPOLINE_IMAGE_UPLOAD" value: "false" } + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-analytics-admin/.kokoro/build.sh" +} + +# Only run this nox session. +env_vars: { + key: "NOX_SESSION" + value: "docs docfx" +} diff --git a/packages/google-analytics-admin/.trampolinerc b/packages/google-analytics-admin/.trampolinerc index 995ee29111e1..383b6ec89fbc 100644 --- a/packages/google-analytics-admin/.trampolinerc +++ b/packages/google-analytics-admin/.trampolinerc @@ -24,6 +24,7 @@ required_envvars+=( pass_down_envvars+=( "STAGING_BUCKET" "V2_STAGING_BUCKET" + "NOX_SESSION" ) # Prevent unintentional override on the default image. diff --git a/packages/google-analytics-admin/LICENSE b/packages/google-analytics-admin/LICENSE index a8ee855de2aa..d64569567334 100644 --- a/packages/google-analytics-admin/LICENSE +++ b/packages/google-analytics-admin/LICENSE @@ -1,6 +1,7 @@ - Apache License + + Apache License Version 2.0, January 2004 - https://www.apache.org/licenses/ + http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -192,7 +193,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - https://www.apache.org/licenses/LICENSE-2.0 + 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, diff --git a/packages/google-analytics-admin/docs/_static/custom.css b/packages/google-analytics-admin/docs/_static/custom.css index 0abaf229fce3..bcd37bbd3c4a 100644 --- a/packages/google-analytics-admin/docs/_static/custom.css +++ b/packages/google-analytics-admin/docs/_static/custom.css @@ -1,4 +1,9 @@ div#python2-eol { border-color: red; border-width: medium; -} \ No newline at end of file +} + +/* Ensure minimum width for 'Parameters' / 'Returns' column */ +dl.field-list > dt { + min-width: 100px +} diff --git a/packages/google-analytics-admin/noxfile.py b/packages/google-analytics-admin/noxfile.py index a57e24be11e3..301179757576 100644 --- a/packages/google-analytics-admin/noxfile.py +++ b/packages/google-analytics-admin/noxfile.py @@ -30,6 +30,17 @@ SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"] UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] +# 'docfx' is excluded since it only needs to run in 'docs-presubmit' +nox.options.sessions = [ + "unit", + "system", + "cover", + "lint", + "lint_setup_py", + "blacken", + "docs", +] + @nox.session(python=DEFAULT_PYTHON_VERSION) def lint(session): diff --git a/packages/google-analytics-admin/synth.metadata b/packages/google-analytics-admin/synth.metadata index cecd5f6e7efb..c6ac9411deef 100644 --- a/packages/google-analytics-admin/synth.metadata +++ b/packages/google-analytics-admin/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-analytics-admin.git", - "sha": "0f4e3821619fff948ae1173ce149c6beca22318d" + "sha": "04d05d7436a752dba18cb04d0e6882b1670114d7" } }, { @@ -19,14 +19,14 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "373861061648b5fe5e0ac4f8a38b32d639ee93e4" + "sha": "ba960d730416fe05c50547e975ce79fcee52c671" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "373861061648b5fe5e0ac4f8a38b32d639ee93e4" + "sha": "ba960d730416fe05c50547e975ce79fcee52c671" } } ],