Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

test: ensure prerelease versions of pandas and arrow are tested nightly - #961

Merged
tswast merged 3 commits into
mainfrom
issue882-prerelease-deps
Sep 14, 2021
Merged

test: ensure prerelease versions of pandas and arrow are tested nightly#961
tswast merged 3 commits into
mainfrom
issue882-prerelease-deps

Conversation

@tswast

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes#882 🦕

@tswast
tswast requested review from a team and stephaniewang526September 10, 2021 21:18
@product-auto-labelproduct-auto-labelBot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Sep 10, 2021
@google-clagoogle-claBot added the cla: yes This human has signed the Contributor License Agreement. label Sep 10, 2021
@tswast

Copy link
Copy Markdown
ContributorAuthor

Local output, verifying expected package versions are actually used now:

nox > python -m pip install --no-deps -e .[all]
nox > python -c import grpc; print(grpc.__version__)
1.40.0
nox > python -c import pandas; print(pandas.__version__)
1.4.0.dev0+639.g00e10a5c48
nox > python -c import pyarrow; print(pyarrow.__version__)
6.0.0.dev226

@tswast

Copy link
Copy Markdown
ContributorAuthor

Internal change 396006532 pending review to actually enable this continuous job.

@plamutplamut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just had a comment about possibly improving/simplifying pattern matching.

Comment threadnoxfile.py Outdated
deps = [
line.strip()
for line in constraints_text.split("\n")
if line.strip() and line[0] != "#"

@plamutplamutSep 13, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we somehow end up with a comment line that starts with whitespace? Unlikely, indeed, but it would feel clumsy if we accidentally break the pipeline with redundant whitespace in a text file. 😆

BTW, should we instead match the entire lines containing version pins and directly extract the dependency name with grouping in the regex pattern itself? Feels more straightforward, to me at least.

Edit: Something like this maybe (untested):

\s*(\S+)(?===\S+) # .group(1) is the dependency name

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it! I made one modification, which was to add ^ to only match from the start of a line. Otherwise, it picked up "foo" from the comments.

Comment threadnoxfile.py Outdated
session.install("-e", ".[all]")

with open(
CURRENT_DIRECTORY / "testing" / "constraints-3.6.txt", encoding="utf-8"

@plamutplamutSep 13, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, BTW, we might not want to hardcode the 3.6 Python version, but instead use UNIT_TEST_PYTHON_VERSIONS[0], i.e. the oldest one supported?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit odd to use UNIT_TEST_PYTHON_VERSIONS in something that's a system test, but I agree it's worth having. I added a comment explaining why it's that version.

@tswast

Copy link
Copy Markdown
ContributorAuthor

Expected pre-release dependencies are being used:

nox > python -c import grpc; print(grpc.__version__)
1.40.0
nox > python -c import pandas; print(pandas.__version__)
1.4.0.dev0+678.ga54aa399dd
nox > python -c import pyarrow; print(pyarrow.__version__)
6.0.0.dev233

https://source.cloud.google.com/results/invocations/c54bbd58-2026-421d-a174-153f13f8f86b/targets/cloud-devrel%2Fclient-libraries%2Fpython%2Fgoogleapis%2Fpython-bigquery%2Fpresubmit%2Fprerelease-deps-3.8/log

@tswast
tswast requested a review from plamutSeptember 13, 2021 18:12
@plamut

Copy link
Copy Markdown
Contributor

@tswast Do we first need to wait for the internal change to be applied, or can we already go ahead and merge this?

@tswast

Copy link
Copy Markdown
ContributorAuthor

We need to merge this first, actually.

@tswast
tswast merged commit 4f72359 into mainSep 14, 2021
@tswast
tswast deleted the issue882-prerelease-deps branch September 14, 2021 14:32
abdelmegahedgoogle pushed a commit to abdelmegahedgoogle/python-bigquery that referenced this pull request Apr 17, 2023
…ly (googleapis#961)
* test: ensure prerelease versions of pandas and arrow are tested nightly
* use regex to find package names rather than filter out comment lines
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "continuous" job for prerelease deps tests

2 participants

@tswast@plamut