-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat(python): Enable generating data with time zones in parametric testing #16298
Conversation
@@ -89,6 +89,7 @@ def dtypes( | |||
*, | |||
allowed_dtypes: Collection[PolarsDataType] | None = None, | |||
excluded_dtypes: Sequence[PolarsDataType] | None = None, | |||
allow_time_zones: bool = True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like we need a helper class at this point. Will probably refactor in the future.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16298 +/- ##
==========================================
- Coverage 80.80% 80.78% -0.02%
==========================================
Files 1393 1393
Lines 179406 179375 -31
Branches 2921 2925 +4
==========================================
- Hits 144971 144917 -54
- Misses 33932 33955 +23
Partials 503 503 ☔ View full report in Codecov by Sentry. |
Changes
allow_time_zones
parameter toseries
/dataframes/dtypes
strategies. It's enabled by default.Note that I'm avoiding the
Datetime(time_zone="*")
notation here because it's problematic in a number of ways. Instantiated data types should represent one specific data type, not match a whole bunch of data types. Unfortunately that does mean we have no good way to enable/disable time zones usingallowed_dtypes/excluded_dtypes
parameters, so I'm going with a separate parameter for this one.