-
Notifications
You must be signed in to change notification settings - Fork 4
0.0.55 #56
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
0.0.55 #56
Conversation
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.
Pull Request Overview
This PR bumps the version to 0.0.55 and refactors the FX forward points interpolation algorithm along with observer pattern improvements.
- Refactored the
get_forwardmethod to use binary search for more efficient date lookup and cleaner interpolation logic - Added observer pruning functionality to automatically remove dead weak references before notifications
- Added comprehensive test coverage for edge cases including exact matches, out-of-range dates, and observer behavior
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Cargo.toml | Version bump from 0.0.54 to 0.0.55 |
| src/markets/forex/quotes/forwardpoints.rs | Major refactor of interpolation logic with binary search, observer pruning, and extensive new test coverage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| #[cfg(test)] | ||
| mod tests { | ||
| use crate::error::Result; | ||
| use crate::markets::forex::quotes::forwardpoints::{FXForwardHelper, FXForwardQuote}; |
Copilot
AI
Sep 19, 2025
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.
This import is redundant since FXForwardHelper and FXForwardQuote are already available in the current module scope. The import should be removed.
| use crate::markets::forex::quotes::forwardpoints::{FXForwardHelper, FXForwardQuote}; |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #56 +/- ##
==========================================
+ Coverage 74.78% 75.40% +0.61%
==========================================
Files 65 65
Lines 3681 3664 -17
==========================================
+ Hits 2753 2763 +10
+ Misses 928 901 -27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if total_day_count == 0.0 { | ||
| // Degenerate case: identical settlement dates; use start value | ||
| return Ok(Some(start_val)); | ||
| } |
Copilot
AI
Sep 19, 2025
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.
Consider using a small epsilon value instead of exact equality comparison for floating-point arithmetic. Use total_day_count.abs() < f64::EPSILON to handle potential floating-point precision issues.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| thiserror = "2.0.12" | ||
| typetag = "0.2.20" | ||
|
|
||
| [dev-dependencies] |
Copilot
AI
Sep 19, 2025
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.
[nitpick] Adding cargo-husky as a dev-dependency can automatically install git hooks for all developers. This should be documented in the project README or installation guide to inform developers about the automatic hook installation behavior.
| [dev-dependencies] | |
| [dev-dependencies] | |
| # NOTE: Adding cargo-husky as a dev-dependency will automatically install Git hooks (e.g., pre-commit, pre-push) for all developers. | |
| # Please see the project README or installation guide for details about this behavior. |
No description provided.