-
Notifications
You must be signed in to change notification settings - Fork 18
docs: add today_with_timezone and min to macros #481
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
base: main
Are you sure you want to change the base?
docs: add today_with_timezone and min to macros #481
Conversation
📝 WalkthroughWalkthroughThis pull request introduces two new macro definitions in the declarative component schema. The Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant S as Declarative Schema
U->>S: Call today_with_timezone(timezone)
S-->>U: Return current date in specified timezone
U->>S: Call min(args)
S-->>U: Return smallest value from arguments
Would you like me to add any more details or perhaps simplify the diagram further? wdyt? Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
airbyte_cdk/sources/declarative/declarative_component_schema.yaml (2)
4040-4048
: Typo intoday_with_timezone
macro description.
The description currently reads:Returns the current data in the specified timezone.
Should this be "Returns the current date in the specified timezone" to match the return type? wdyt?
4059-4066
: Inconsistency inmin
macro description.
The macro is intended to return the smallest value, yet the description states:Returns the largest object of a iterable, or or two or more arguments.
Would you agree to change it to "Returns the smallest object of an iterable, or two or more arguments"? Additionally, would you consider adding a
return_type: Any
for consistency with the other macros? wdyt?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
airbyte_cdk/sources/declarative/declarative_component_schema.yaml
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Pytest (All, Python 3.11, Ubuntu)
- GitHub Check: Pytest (Fast)
- GitHub Check: Pytest (All, Python 3.10, Ubuntu)
- GitHub Check: SDM Docker Image Build
44fb1b7
to
fec0baa
Compare
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
airbyte_cdk/sources/declarative/declarative_component_schema.yaml (2)
4040-4048
: Review ontoday_with_timezone
MacroThis new macro is a useful addition that extends the documentation capabilities by allowing a timezone parameter. The description and examples are clear. One question: have you considered detailing how the macro handles an invalid or missing timezone value? wdyt?
4060-4066
: Review onmin
MacroThe
min
macro is a great utility to have! I noticed a minor wording issue in the description: it reads “Returns the smallest object of a iterable, or or two or more arguments.” Would you consider revising this to remove the duplicate "or"—for example, “Returns the smallest object from an iterable, or from two or more arguments”—to improve clarity? wdyt?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
airbyte_cdk/sources/declarative/declarative_component_schema.yaml
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Pytest (All, Python 3.11, Ubuntu)
- GitHub Check: Pytest (Fast)
- GitHub Check: Pytest (All, Python 3.10, Ubuntu)
- GitHub Check: SDM Docker Image Build
@airbytehq/dev-extensibility can someone take a look at this contribution? |
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.
Adding the related PRs here:
- today_with_timezone: feat(airbyte-cdk): add jinja macros today_with_timezone airbyte#48400
- min: feat: add
min
macros #203
This is good documentation to be added. Thanks @morgan-dgk
cad2983
to
c39a233
Compare
This commit adds the today_with_timezone and min macros to the list of macros defined in `declarative_component_schema.yaml`. This is important because this file is used to generate the YAML reference in Airbyte's documentation. See the fetchSchema script in main repository for details.
c39a233
to
2cd7048
Compare
This commit adds the
today_with_timezone
andmin
macros to the list of macros defined indeclarative_component_schema.yaml
. This is important because this file is used to generate the YAML reference in Airbyte's documentation.See the fetchSchema script in main repository for details.
Summary by CodeRabbit