Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
chore: update templates
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 committed Jan 8, 2021
1 parent 4326214 commit fdf24a5
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 12 deletions.
16 changes: 10 additions & 6 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@

set -eo pipefail

cd github/python-compute
if [[ -z "${PROJECT_ROOT:-}" ]]; then
PROJECT_ROOT="github/python-compute"
fi

cd "${PROJECT_ROOT}"

# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1
Expand All @@ -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
11 changes: 11 additions & 0 deletions .kokoro/docs/docs-presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,14 @@ env_vars: {
key: "TRAMPOLINE_IMAGE_UPLOAD"
value: "false"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-compute/.kokoro/build.sh"
}

# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "docs docfx"
}
2 changes: 2 additions & 0 deletions .trampolinerc
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
required_envvars+=(
"STAGING_BUCKET"
"V2_STAGING_BUCKET"
"NOX_SESSION"
)

# Add env vars which are passed down into the container here.
pass_down_envvars+=(
"STAGING_BUCKET"
"V2_STAGING_BUCKET"
"NOX_SESSION"
)

# Prevent unintentional override on the default image.
Expand Down
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Apache License

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Expand Down
7 changes: 6 additions & 1 deletion docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
div#python2-eol {
border-color: red;
border-width: medium;
}
}

/* Ensure minimum width for 'Parameters' / 'Returns' column */
dl.field-list > dt {
min-width: 100px
}
11 changes: 11 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
9 changes: 5 additions & 4 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,29 @@
{
"git": {
"name": ".",
"remote": "sso://devrel/cloud/libraries/python/python-compute"
"remote": "sso://devrel/cloud/libraries/python/python-compute",
"sha": "432621401ddf808a5fef2d6d565b0e3a75bd2df0"
}
},
{
"git": {
"name": "googleapis-discovery",
"remote": "https://github.com/googleapis/googleapis-discovery.git",
"sha": "18ffd98bed11b88302a79b047e75262964a2b3ea"
"sha": "ed8fe29ede4a8c5117c955bf0972e6b751800e41"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "a3e990f3545dc8ccd384a75d20ce9cb185ca6a28"
"sha": "fb53b6fb373b7c3edf4e55f3e8036bc6d73fa483"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "a3e990f3545dc8ccd384a75d20ce9cb185ca6a28"
"sha": "fb53b6fb373b7c3edf4e55f3e8036bc6d73fa483"
}
}
],
Expand Down

0 comments on commit fdf24a5

Please sign in to comment.