-
Notifications
You must be signed in to change notification settings - Fork 13
From kloppy skillcorner fix #335
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
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 addresses issue #332 by changing the behavior of playing direction validation in the Game object from raising errors to issuing warnings. This allows games with potentially incorrect playing directions (e.g., from SkillCorner data) to be loaded while still notifying users of the issue.
Key changes:
- Converted
DataBallPyErrortoDataBallPyWarningfor playing direction checks in the game validation logic - Added a
check_game_inputsparameter toget_game_from_kloppyto allow bypassing validation checks - Updated tests to expect warnings instead of errors for playing direction validation
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| databallpy/game.py | Changed playing direction validation from raising errors to issuing warnings, added import for DataBallPyWarning |
| databallpy/utils/get_game.py | Added check_game_inputs parameter to control validation, passed to Game constructor, and conditionally skip "ALIVE" frames warning |
| tests/test_game.py | Updated test assertions from assertRaises to assertWarns and added DataBallPyWarning import |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #335 +/- ##
===========================================
+ Coverage 99.22% 99.55% +0.33%
===========================================
Files 49 65 +16
Lines 3736 4973 +1237
===========================================
+ Hits 3707 4951 +1244
+ Misses 29 22 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Initial plan * Fix spelling errors in warning message for away team validation Co-authored-by: Alek050 <49450063+Alek050@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Alek050 <49450063+Alek050@users.noreply.github.com>
closes #332