Skip to content

feat: Add time_zone to Datetime column#33

Merged
Andreas Albert (AndreasAlbertQC) merged 11 commits intoQuantco:mainfrom
dfrankland:add-time_zone-to-datetime-results
May 19, 2025
Merged

feat: Add time_zone to Datetime column#33
Andreas Albert (AndreasAlbertQC) merged 11 commits intoQuantco:mainfrom
dfrankland:add-time_zone-to-datetime-results

Conversation

@dfrankland
Copy link
Copy Markdown
Contributor

@dfrankland Dylan Frankland (dfrankland) commented May 7, 2025

Motivation

Closes #32

Changes

allows setting a time zone for datetimes and checking if the values in the column matches it

Pertinent polars docs:
https://docs.pola.rs/user-guide/transformations/time-series/timezones/

allows setting a time zone for datetimes and checking if the values in the column matches it
Comment thread tests/column_types/test_datetime.py Outdated
@dfrankland Dylan Frankland (dfrankland) changed the title add time_zone to Datetime results feat: add time_zone to Datetime results May 7, 2025
@github-actions github-actions Bot added the enhancement New feature or request label May 7, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (08972c6) to head (29b10f8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #33   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           39        39           
  Lines         1887      1890    +3     
=========================================
+ Hits          1887      1890    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the nice PR Dylan Frankland (@dfrankland)! Could you add a test in test_sql_schema.py for the oracle part?

Comment thread dataframely/columns/datetime.py Outdated
Comment thread dataframely/columns/datetime.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the initiative Dylan Frankland (@dfrankland), I think this is a very useful addition! :)

Comment thread dataframely/columns/datetime.py Outdated
Comment thread dataframely/columns/datetime.py Outdated
Comment thread dataframely/random.py Outdated
Comment thread tests/columns/test_sql_schema.py Outdated
@borchero Oliver Borchert (borchero) changed the title feat: add time_zone to Datetime results feat: Add time_zone to Datetime results May 9, 2025
@dfrankland
Copy link
Copy Markdown
Contributor Author

Let me know if you'd like for me to rebase these changes

@dfrankland Dylan Frankland (dfrankland) force-pushed the add-time_zone-to-datetime-results branch from 8de8c8f to 30e3538 Compare May 10, 2025 00:28
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All right, nice, I think we're almost there! :)

Comment thread dataframely/columns/datetime.py Outdated
Comment thread tests/column_types/test_datetime.py Outdated
Comment thread tests/column_types/test_datetime.py Outdated
@dfrankland
Copy link
Copy Markdown
Contributor Author

Updated to keep things minimal and also made the test name more accurate

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the updates! Just one tiny comment left :)

Comment thread dataframely/columns/datetime.py
Comment thread dataframely/columns/datetime.py Outdated
Comment thread dataframely/columns/datetime.py Outdated
@borchero Oliver Borchert (borchero) changed the title feat: Add time_zone to Datetime results feat: Add time_zone to Datetime column May 15, 2025
Copy link
Copy Markdown
Member

@borchero Oliver Borchert (borchero) left a comment

Choose a reason for hiding this comment

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

I quickly took care of the small remaining comments to finally merge this -- thanks for your work Dylan Frankland (@dfrankland)!

@AndreasAlbertQC Andreas Albert (AndreasAlbertQC) merged commit ea591aa into Quantco:main May 19, 2025
18 checks passed
@dfrankland
Copy link
Copy Markdown
Contributor Author

Oliver Borchert (@borchero) not a problem at all, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dy.Datetime() does not support time_unit and time_zone

4 participants