Skip to content

Conversation

@tswast
Copy link
Collaborator

@tswast tswast commented Aug 27, 2024

We explicitly use the numpy module, so it should be an explicit dependency in setup.py. Also, make sure we test with the minimum supported version by setting the minimum version in the constraints file (see: googleapis/synthtool#1901 and googleapis/python-test-utils#8).

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)
  • [N/A] Appropriate docs were updated (if necessary)

Fixes #687 🦕

@tswast tswast requested review from a team as code owners August 27, 2024 16:11
@tswast tswast requested a review from rey-esp August 27, 2024 16:11
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Aug 27, 2024
@tswast tswast requested review from shobsi and removed request for rey-esp August 27, 2024 16:12
## dtype predicates - use these to maintain consistency
def is_datetime_like(type: ExpressionType) -> bool:
return type in (DATETIME_DTYPE, TIMESTAMP_DTYPE)
def is_datetime_like(type_: ExpressionType) -> bool:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

type is a built-in. Avoid conflicts by using type_.

single_trailing_underscore_: used by convention to avoid conflicts with Python keyword

https://peps.python.org/pep-0008/#descriptive-naming-styles

In this case, type is a function, not a keyword, so not strictly needed, but type is a common enough function that it is best to avoid conflicts, IMO.

@tswast tswast enabled auto-merge (squash) August 28, 2024 15:56
@tswast tswast merged commit 3d71913 into main Aug 28, 2024
@tswast tswast deleted the issue687-numpy branch August 28, 2024 16:25
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-dataframes API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bigframes 1.5.0 example showing module 'numpy' has no attribute 'dtypes'

4 participants