-
Notifications
You must be signed in to change notification settings - Fork 6
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
Merge pull request #597 from iKostanOrg/master #598
Conversation
Merge from master
Reviewer's Guide by SourceryThis pull request implements a solution to the "Pointless Farmer" kata and adds it to the project. The solution involves determining a sequence of 'buy' or 'sell' actions based on given fruit pairs and the initially harvested fruit, ensuring the final fruit matches the initial one. If no valid sequence exists, it returns 'ERROR'. The implementation includes a core function Sequence diagram for Pointless Farmer trading processsequenceDiagram
participant F as Farmer
participant M as Market
Note over F: Has harvested fruit
loop For each trading pair
F->>M: Check trading pair
alt Can trade current fruit
F->>M: Execute 'buy' or 'sell'
M-->>F: Receive new fruit
else Cannot trade
M-->>F: Return ERROR
end
end
Note over F: Verify final fruit matches initial
Class diagram for Pointless Farmer solutionclassDiagram
class Solution {
+buy_or_sell(pairs: list, harvested_fruit: str) list|str
+make_deal(results: list, pair: tuple, currently_holding: str) str
}
note for Solution "Main solution class for Pointless Farmer kata"
class TradingPair {
+fruit1: str
+fruit2: str
}
Solution ..> TradingPair: uses
State diagram for fruit trading processstateDiagram-v2
[*] --> HarvestedFruit
HarvestedFruit --> Trading: Start trading
Trading --> Trading: Execute buy/sell
Trading --> Success: Final fruit matches initial
Trading --> Error: Cannot complete trades
Success --> [*]
Error --> [*]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
We have skipped reviewing this pull request. Here's why:
- We don't review packaging changes - Let us know if you'd like us to change this.
- All of the files are larger than we can process. We're working on it!
Code Climate has analyzed commit c25cc6c and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 90.4% (0.0% change). View more on Code Climate. |
@sourcery-ai review |
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.
Hey @ikostan - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Merge from master
Summary by Sourcery
Implement a solution for the "Pointless Farmer" kata.
New Features:
Tests: