Skip to content

Commit 4812d82

Browse files
mamo3grbusunkim96tswast
authored
fix: fix invalid version specification of pyarrow (#1403)
* 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 <[email protected]> * fix: fix invalid version specification of pyarrow Co-authored-by: Bu Sun Kim <[email protected]> Co-authored-by: Tim Swast <[email protected]>
1 parent 9292769 commit 4812d82

File tree

5 files changed

+36
-7
lines changed

5 files changed

+36
-7
lines changed

.kokoro/build.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515

1616
set -eo pipefail
1717

18-
cd github/python-bigquery
18+
if [[ -z "${PROJECT_ROOT:-}" ]]; then
19+
PROJECT_ROOT="github/python-bigquery"
20+
fi
21+
22+
cd "${PROJECT_ROOT}"
1923

2024
# Disable buffering, so that the logs stream through.
2125
export PYTHONUNBUFFERED=1
@@ -30,16 +34,16 @@ export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
3034
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
3135

3236
# Remove old nox
33-
python3.6 -m pip uninstall --yes --quiet nox-automation
37+
python3 -m pip uninstall --yes --quiet nox-automation
3438

3539
# Install nox
36-
python3.6 -m pip install --upgrade --quiet nox
37-
python3.6 -m nox --version
40+
python3 -m pip install --upgrade --quiet nox
41+
python3 -m nox --version
3842

3943
# If NOX_SESSION is set, it only runs the specified session,
4044
# otherwise run all the sessions.
4145
if [[ -n "${NOX_SESSION:-}" ]]; then
42-
python3.6 -m nox -s "${NOX_SESSION:-}"
46+
python3 -m nox -s ${NOX_SESSION:-}
4347
else
44-
python3.6 -m nox
48+
python3 -m nox
4549
fi

.kokoro/docs/docs-presubmit.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,14 @@ env_vars: {
1515
key: "TRAMPOLINE_IMAGE_UPLOAD"
1616
value: "false"
1717
}
18+
19+
env_vars: {
20+
key: "TRAMPOLINE_BUILD_FILE"
21+
value: "github/python-bigquery/.kokoro/build.sh"
22+
}
23+
24+
# Only run this nox session.
25+
env_vars: {
26+
key: "NOX_SESSION"
27+
value: "docs docfx"
28+
}

.trampolinerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@
1818
required_envvars+=(
1919
"STAGING_BUCKET"
2020
"V2_STAGING_BUCKET"
21+
"NOX_SESSION"
2122
)
2223

2324
# Add env vars which are passed down into the container here.
2425
pass_down_envvars+=(
2526
"STAGING_BUCKET"
2627
"V2_STAGING_BUCKET"
28+
"NOX_SESSION"
2729
)
2830

2931
# Prevent unintentional override on the default image.

noxfile.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@
2525
BLACK_PATHS = ("docs", "google", "samples", "tests", "noxfile.py", "setup.py")
2626
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
2727

28+
# 'docfx' is excluded since it only needs to run in 'docs-presubmit'
29+
nox.options.sessions = [
30+
"unit",
31+
"system",
32+
"snippets",
33+
"cover",
34+
"lint",
35+
"lint_setup_py",
36+
"blacken",
37+
"docs",
38+
]
39+
2840

2941
def default(session):
3042
"""Default unit test session.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"pandas": ["pandas>=0.23.0"],
5252
"pyarrow": [
5353
# pyarrow 1.0.0 is required for the use of timestamp_as_object keyword.
54-
"pyarrow >= 1.0.0, < 2.0de ; python_version>='3.5'",
54+
"pyarrow >= 1.0.0, < 2.0dev ; python_version>='3.5'",
5555
"pyarrow >= 0.16.0, < 0.17.0dev ; python_version<'3.5'",
5656
],
5757
"tqdm": ["tqdm >= 4.7.4, <5.0.0dev"],

0 commit comments

Comments
 (0)