[go: up one dir, main page]

Skip to content

Commit

Permalink
fix: fix invalid version specification of pyarrow (#1403)
Browse files Browse the repository at this point in the history
* ci: skip docfx in main 'Kokoro' presubmit (#423)

* ci: skip docfx in main 'Kokoro' presubmit

* fix: specify default sessions in noxfile

* add conditional for cd to project root

* ci: use python3 instead of python3.6 in build.sh (#425)

* ci: skip docfx in main 'Kokoro' presubmit

* fix: specify default sessions in noxfile

* fix: use python3 instead of 3.6

* fix: add NOX_SESSION to pass down envvars

* fix: remove quotes arround sessions

Co-authored-by: Tim Swast <swast@google.com>

* fix: fix invalid version specification of pyarrow

Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Co-authored-by: Tim Swast <swast@google.com>
  • Loading branch information
3 people committed Dec 14, 2022
1 parent 9292769 commit 4812d82
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 7 deletions.
16 changes: 10 additions & 6 deletions .kokoro/build.sh
Expand Up @@ -15,7 +15,11 @@

set -eo pipefail

cd github/python-bigquery
if [[ -z "${PROJECT_ROOT:-}" ]]; then
PROJECT_ROOT="github/python-bigquery"
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
Expand Up @@ -15,3 +15,14 @@ env_vars: {
key: "TRAMPOLINE_IMAGE_UPLOAD"
value: "false"
}

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

# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "docs docfx"
}
2 changes: 2 additions & 0 deletions .trampolinerc
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
12 changes: 12 additions & 0 deletions noxfile.py
Expand Up @@ -25,6 +25,18 @@
BLACK_PATHS = ("docs", "google", "samples", "tests", "noxfile.py", "setup.py")
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()

# 'docfx' is excluded since it only needs to run in 'docs-presubmit'
nox.options.sessions = [
"unit",
"system",
"snippets",
"cover",
"lint",
"lint_setup_py",
"blacken",
"docs",
]


def default(session):
"""Default unit test session.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -51,7 +51,7 @@
"pandas": ["pandas>=0.23.0"],
"pyarrow": [
# pyarrow 1.0.0 is required for the use of timestamp_as_object keyword.
"pyarrow >= 1.0.0, < 2.0de ; python_version>='3.5'",
"pyarrow >= 1.0.0, < 2.0dev ; python_version>='3.5'",
"pyarrow >= 0.16.0, < 0.17.0dev ; python_version<'3.5'",
],
"tqdm": ["tqdm >= 4.7.4, <5.0.0dev"],
Expand Down

0 comments on commit 4812d82

Please sign in to comment.