Closed alexpung closed 2 months ago
[!WARNING]
Rate limit exceeded
@alexpung has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 19 minutes and 58 seconds before requesting another review.
How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. 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](https://coderabbit.ai/docs/faq) for further information.Commits
Files that changed from the base of the PR and between 683f0bed43a73200119df583f6f45b21221f9985 and 5ef0da358f094f612a4293f12d9b82641c52fbb2.
The changes introduce modifications to the TaxEventLists
, Trade
, and OptionTradeTaxCalculation
classes, refining how trades are added and validated. The TaxEventLists
now filters trades to exclude options and futures, while the Trade
class implements validation for Quantity
and GrossProceed
properties. Additionally, unit tests are updated and new tests are added for option exercises, ensuring comprehensive coverage of the new logic.
File Path | Change Summary |
---|---|
BlazorApp-Investment Tax Calculator/Model/TaxEventLists.cs |
Updated AddData method to refine conditions for adding Trade instances, excluding OptionTrade and FutureContractTrade . |
BlazorApp-Investment Tax Calculator/Model/TaxEvents/Trade.cs |
Modified Quantity and GrossProceed properties to include backing fields with validation logic, ensuring values are greater than 0. |
BlazorApp-Investment Tax Calculator/Model/UkTaxModel/Options/OptionTradeTaxCalculation.cs |
Adjusted logic for handling exercised options, including new calculations for allowable costs and conditional checks based on option types. |
BlazorApp-Investment Tax Calculator/Model/UkTaxModel/Options/UkOptionTradeCalculator.cs |
Changed message in MatchExercisedOption method to include premium cost details. |
UnitTest/Test/Model/TaxEventListsTest.cs |
Updated AddData_AddsTaxEvents_CombinesAllLists test method to include assertions for FutureContractTrade and OptionTrade . |
UnitTest/Test/TradeCalculations/Options/UkTradeCalculatorOptionExeciseTest.cs |
Introduced new unit tests for exercising options, validating calculations for long put and call options. |
UnitTest/Test/TradeCalculations/Options/UkTradeCalculatorOptionExpireTest.cs |
Changed namespace and class name to better reflect focus on options, with updated method name for clarity. |
TaxEventLists
class that now accommodates OptionTrade
instances.Trade
record are pertinent as changes to the TaxEventLists
class involve handling Trade
instances, including new logic for adding trades based on their types.refactoring
π In fields of code, we hop and play,
With trades and taxes, we find our way.
New rules for options, clear and bright,
Validations ensure we do it right.
So letβs celebrate, with a joyful cheer,
For a cleaner codebase, we hold so dear! π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
Release Notes
New Features
Quantity
andGrossProceed
in trade records to ensure values are greater than 0.Bug Fixes
Tests
Chores