Skip to content

Conversation

@tswast
Copy link
Contributor

@tswast tswast commented Sep 10, 2021

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 a review from a team September 10, 2021 21:18
@tswast tswast requested a review from a team as a code owner September 10, 2021 21:18
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Sep 10, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 10, 2021
@tswast
Copy link
Contributor Author

tswast commented Sep 10, 2021

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
Contributor Author

tswast commented Sep 10, 2021

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

Copy link
Contributor

@plamut plamut left a comment

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.

noxfile.py Outdated
deps = [
line.strip()
for line in constraints_text.split("\n")
if line.strip() and line[0] != "#"
Copy link
Contributor

@plamut plamut Sep 13, 2021

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
Contributor Author

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.

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

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

@plamut plamut Sep 13, 2021

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
Contributor Author

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
Contributor Author

tswast commented Sep 13, 2021

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 plamut September 13, 2021 18:12
@plamut
Copy link
Contributor

plamut commented Sep 14, 2021

@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
Contributor Author

tswast commented Sep 14, 2021

We need to merge this first, actually.

@tswast tswast merged commit 4f72359 into main Sep 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/python-bigquery API. cla: yes This 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