Skip to content

Conversation

@Alek050
Copy link
Owner

@Alek050 Alek050 commented Jan 7, 2026

closes #332

Copy link
Contributor

Copilot AI left a 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 DataBallPyError to DataBallPyWarning for playing direction checks in the game validation logic
  • Added a check_game_inputs parameter to get_game_from_kloppy to 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
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.55%. Comparing base (e4ce2b3) to head (88833d9).
⚠️ Report is 73 commits behind head on develop.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Jan 7, 2026

@Alek050 I've opened a new pull request, #336, to work on those changes. Once the pull request is ready, I'll request review from you.

* 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>
@Alek050 Alek050 merged commit 065f4a5 into develop Jan 7, 2026
14 checks passed
@Alek050 Alek050 deleted the 332-kloppy-skillcorner-error branch January 7, 2026 12:50
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.

Skillcorner get_game_from_kloppy error

2 participants