Skip to content

fix(configs): avoid weird ratios in config float parsing#703

Merged
scarmuega merged 1 commit into
mainfrom
fix/ratio-parse
Sep 14, 2025
Merged

fix(configs): avoid weird ratios in config float parsing#703
scarmuega merged 1 commit into
mainfrom
fix/ratio-parse

Conversation

@scarmuega
Copy link
Copy Markdown
Member

@scarmuega scarmuega commented Sep 14, 2025

Summary by CodeRabbit

  • Chores
    • Updated dependencies and made related internal adjustments to maintain stability.

@scarmuega scarmuega merged commit 38546da into main Sep 14, 2025
12 of 14 checks passed
@scarmuega scarmuega deleted the fix/ratio-parse branch September 14, 2025 01:12
@rodrigosuaya
Copy link
Copy Markdown

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 23, 2025

✅ Actions performed

Full review triggered.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 23, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The PR upgrades the num-rational dependency from 0.4.1 to 0.4.2 and refactors Shelley configuration code to migrate from BigRational to Rational64 for float-to-rational conversions, simplifying rational number handling.

Changes

Cohort / File(s) Change Summary
Dependency Update
pallas-configs/Cargo.toml
Updated num-rational dependency from 0.4.1 to 0.4.2
BigRational to Rational64 Migration
pallas-configs/src/shelley.rs
Replaced BigRational import with Rational64; changed float-to-rational conversion from BigRational::from_float(s) to Rational64::approximate_float(s); adjusted RationalNumber construction to directly convert Rational64 components to u64

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A rational hop, so neat and small,
No need for Big when Fixed works for all!
From Float to Sixty-Four, we bound and spring,
Our numbers dance—oh what joy they bring!
The update flows, efficient and light,
A simpler path makes the code just right! 🌟

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ratio-parse

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8a9d1dc and b9af222.

📒 Files selected for processing (2)
  • pallas-configs/Cargo.toml (1 hunks)
  • pallas-configs/src/shelley.rs (2 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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