-
Notifications
You must be signed in to change notification settings - Fork 117
fix: better formatting handling in definitions script #879
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?
Conversation
|
Warning Rate limit exceeded@mvadari has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 18 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughBroadened multiple parser regexes to accept optional spaces/newlines between tokens and updated binary codec definitions JSON by adding Int32/Int64 types and two new fields, removing one transaction result key, and reordering some transaction type entries. Changes
Sequence Diagram(s)sequenceDiagram
participant Tool as generate_definitions.py
participant Spec as Source spec/text
participant Parser as Regex parser
participant JSON as definitions.json
Note over Tool,Spec: Input spec or source lines
Tool->>Parser: Apply relaxed regexes (STYPE, TYPED_SFIELD,\nLEDGER_ENTRY, TER, TRANSACTION)
alt Match
Parser-->>Tool: Extracted tokens/groups
Tool->>JSON: Emit/augment fields and types (Int32, Int64, MutableFlags, DummyInt32)
JSON-->>Tool: Updated definitions.json
else No match
Parser-->>Tool: Skip or warn
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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 |
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: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tools/generate_definitions.py(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: ckeshava
PR: XRPLF/xrpl-py#759
File: xrpl/models/transactions/credential_delete.py:57-68
Timestamp: 2024-10-30T20:34:35.451Z
Learning: Consistent implementation patterns are preferred in the `xrpl-py` codebase, especially in transaction models under `xrpl/models/transactions/`. When suggesting refactoring that affects multiple transactions, consider the impact on overall consistency and propose comprehensive changes when appropriate.
High Level Overview of Change
Fix the definitions generation script so that it better handles formatting changes, like adding new lines
Context of Change
Some newlines were introduced in
transactions.macro, which weren't properly captured by the regexType of Change
Did you update CHANGELOG.md?
Test Plan
Works locally.