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

expr: Convert date time accessors to properties #571

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

aditya-nambiar
Copy link
Contributor

@aditya-nambiar aditya-nambiar commented Sep 24, 2024

Important

Convert datetime accessors to properties in fennel/expr/expr.py and update related tests, documentation, and versioning.

  • Behavior:
    • Convert datetime accessors (year, month, day, hour, minute, second, millisecond, microsecond, week) to properties in fennel/expr/expr.py.
    • Introduce timezone-specific methods (year_with_tz, month_with_tz, etc.) for datetime accessors.
  • Tests:
    • Update tests in test_expr.py and test_featureset.py to use new datetime properties.
  • Documentation:
    • Update examples in dt.py to reflect changes in datetime accessors.
  • Misc:
    • Update CHANGELOG.md to document changes in version 1.5.30.
    • Bump version to 1.5.30 in pyproject.toml.
    • Minor logging addition in featureset.py.

This description was created by Ellipsis for d85f253. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to c0fd502 in 1 minute and 1 seconds

More details
  • Looked at 556 lines of code in 25 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. fennel/CHANGELOG.md:3
  • Draft comment:
    The changelog entry mentions only some of the datetime accessors that were changed to properties. Consider listing all the accessors that were changed for clarity.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR changes datetime accessors to properties, but the changelog entry is missing some of the accessors that were changed.

Workflow ID: wflow_ecKsQvy4JhoNWxyG


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@@ -103,6 +103,7 @@ def feature(
if isinstance(args[0], Expr):
feature_obj._expr = args[0]
else:
print("Setting ref", args[0])
Copy link

Choose a reason for hiding this comment

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

Remove the print statement as it seems to be a leftover debug statement.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 7c27a0f in 37 seconds

More details
  • Looked at 534 lines of code in 24 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. fennel/CHANGELOG.md:5
  • Draft comment:
    The changelog entry for version 1.5.30 is missing some datetime accessors that were converted to properties. Ensure all accessors (year, month, day, hour, minute, second, millisecond, microsecond, week) are listed.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_amYvmiiEHWpMFnut


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Incremental review on fa5d9fc in 59 seconds

More details
  • Looked at 553 lines of code in 24 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_sdInLEeRognVxJQ1


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

StringNoop(),
)

def year(self, timezone: Optional[str] = "UTC") -> _Number:
return self.parts(TimeUnit.YEAR, timezone)
def with_tz(self, timezone: str) -> _DateTime:
Copy link

Choose a reason for hiding this comment

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

The with_tz method modifies the instance's timezone, which can lead to unexpected behavior if the same instance is reused. Consider returning a new instance with the updated timezone instead.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on d85f253 in 39 seconds

More details
  • Looked at 562 lines of code in 24 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. fennel/CHANGELOG.md:5
  • Draft comment:
    The changelog entry for version 1.5.30 is missing some datetime accessors that were converted to properties. Ensure all accessors like year, month, day, hour, minute, second, millisecond, microsecond, and week are mentioned.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR changes datetime accessors to properties, but the changelog entry is missing some of the accessors that were changed. It should include all the accessors that were converted to properties.

Workflow ID: wflow_xuAzW6V4pP7R3YlG


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@aditya-nambiar aditya-nambiar enabled auto-merge (squash) September 24, 2024 22:26
@aditya-nambiar aditya-nambiar merged commit 503fd1e into main Sep 24, 2024
8 checks passed
@aditya-nambiar aditya-nambiar deleted the aditya/make-hour-property branch September 24, 2024 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants