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

feat(api): isoyear method #9034

Merged
merged 7 commits into from
May 8, 2024
Merged

feat(api): isoyear method #9034

merged 7 commits into from
May 8, 2024

Conversation

kaijennissen
Copy link
Contributor

  • first steps for implementing iso_year method
  • added isoyear method for duckdb

Description of changes

Added a new isoyear method for timestamps.

Issues closed

Resolved #8989

Copy link
Contributor

ACTION NEEDED

Ibis follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message.

Please update your PR title and description to match the specification.

@kaijennissen kaijennissen changed the title feat(types) isoyear method feat(types): isoyear method Apr 21, 2024
@kaijennissen
Copy link
Contributor Author

@cpcloud I'm not sure where the corresponding tests should be placed?

  • Inside ibis/tests/expr/test_timestampy.py
    • as new parametrization of test_extract_fields
    • as a new test function, f.e. test_iso_year
  • Inside ibis/backends/tests/test_temportal.py

@gforsyth
Copy link
Member

Hey @kaijennissen!

For tests of ibis internals, like does the extract operation return the Ibis type we expect for a given input, those go in ibis/tests/expr.

For testing execution against backends (does the operation do what we want, which backends are implemented, etc), those go in ibis/backends/tests

@cpcloud cpcloud added feature Features or general enhancements timestamps Issues related to the timestamp API labels May 8, 2024
@cpcloud cpcloud added this to the 9.1 milestone May 8, 2024
@cpcloud cpcloud marked this pull request as ready for review May 8, 2024 14:18
Copy link
Member

@cpcloud cpcloud left a comment

Choose a reason for hiding this comment

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

LGTM!

@kaijennissen I went ahead and added tests and implemented the remaining easy-to-implement backend compilation rules.

Thanks for kicking this off!

@cpcloud cpcloud changed the title feat(types): isoyear method feat(api): isoyear method May 8, 2024
@cpcloud cpcloud merged commit 4707c44 into ibis-project:main May 8, 2024
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Features or general enhancements timestamps Issues related to the timestamp API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possibility to extract isoyear and isoweekday (or weekday) from a timestamp column.
3 participants