Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: re-introduce support for numpy 1.24.x #931

Merged
merged 3 commits into from
Aug 28, 2024
Merged

deps: re-introduce support for numpy 1.24.x #931

merged 3 commits into from
Aug 28, 2024

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
@@ -205,93 +205,100 @@ class SimpleDtypeInfo:


## 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.

setup.py Show resolved Hide resolved
@tswast tswast enabled auto-merge (squash) August 28, 2024 15:56
@tswast tswast merged commit 3d71913 into main Aug 28, 2024
20 of 23 checks passed
@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'
3 participants