-
Notifications
You must be signed in to change notification settings - Fork 41
Add CronTrigger model and update version to 0.0.3b1 #434
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
Conversation
NiveditJain
commented
Sep 29, 2025
- Introduced a new CronTrigger model in models.py to handle cron expressions.
- Updated the StateManager's upsert_graph method to accept a list of CronTrigger instances.
- Added CronTrigger to the all exports in init.py.
- Bumped version to 0.0.3b1 in _version.py.
- Introduced a new CronTrigger model in models.py to handle cron expressions. - Updated the StateManager's upsert_graph method to accept a list of CronTrigger instances. - Added CronTrigger to the __all__ exports in __init__.py. - Bumped version to 0.0.3b1 in _version.py.
SafeDep Report SummaryPackage Details
This report is generated by SafeDep Github App. |
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds a CronTrigger Pydantic model and exposes it in the package public API; extends StateManager.upsert_graph to accept and serialize optional cron triggers into the upsert request; bumps SDK version from 0.0.3b0 to 0.0.3b1. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant StateManager
participant API
Note over StateManager: upsert_graph(..., triggers?)
Client->>StateManager: upsert_graph(graph_name, graph_nodes, secrets, triggers?)
StateManager->>StateManager: validate inputs
alt triggers provided
StateManager->>StateManager: map triggers -> [{type:"CRON", expression:expr}, ...]
StateManager->>StateManager: add triggers to request body
end
StateManager->>API: POST /graphs (body with nodes, secrets, optional triggers)
API-->>StateManager: response
StateManager-->>Client: return result / raise on error
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
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. Comment |
Summary of ChangesHello @NiveditJain, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the system's scheduling capabilities by introducing a dedicated Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces support for cron-based triggers by adding a CronTrigger model and updating the StateManager to handle it. The changes are well-structured. My feedback includes suggestions to improve robustness by adding validation to the new CronTrigger model and to enhance code clarity and consistency in the StateManager by simplifying the new logic. I've also pointed out a minor style issue.
- Simplified the logic for processing triggers in the StateManager's upsert_graph method by directly constructing the triggers list. - Removed the previous loop and validation for CronTrigger instances, streamlining the code and improving readability.
- Added 'CronTrigger' to the list of expected exports in the test for __all__ in the package initialization file, ensuring that the new model is properly tested for inclusion.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |