Skip to content
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

feat: Add active status to Player #502

Merged
merged 3 commits into from Dec 1, 2023

Conversation

DesiPilla
Copy link
Contributor

@DesiPilla DesiPilla commented Nov 18, 2023

This PR can finally resolve a long-standing issue... historical injury status! For a while now, an issue (#327, #401) we've had is that ESPN only return's a player's current health status, even when querying a previous week or year. I think I have a way to get around this and assume a player's health status from previous weeks.

This uses the embedded stats objects to decipher whether a player was active in a historical week.

  • active: the player had a game and participated in it
  • inactive: the player had a game but did not participate in it (due to injury or suspension)
  • bye: the player did not have a game that week

Testing and research can be viewed here.

This uses the embedded stats objects to decipher whether a player was active in a historical week.
* `active`: the player had a game and participated in it
* `inactive`: the player had a game but did not participate in it (due to injury or suspension)
* `bye`: the player did not have a game that week
I'm just an idiot don't mind me
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cac4300) 80.53% compared to head (3c00fdc) 80.57%.
Report is 2 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #502      +/-   ##
==========================================
+ Coverage   80.53%   80.57%   +0.04%     
==========================================
  Files          59       59              
  Lines        2106     2111       +5     
==========================================
+ Hits         1696     1701       +5     
  Misses        410      410              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DesiPilla
Copy link
Contributor Author

@cwendt94 I can't quite figure out where/how to add unit tests with your current setup, but I validated this on a variety of cases here.

@DesiPilla
Copy link
Contributor Author

@cwendt94 Any update on this PR?

@cwendt94
Copy link
Owner

cwendt94 commented Dec 1, 2023

Thanks for the bump @DesiPilla and figuring out a work around from ESPNs data. Looks good to me!

@cwendt94 cwendt94 merged commit 5a3bc2e into cwendt94:master Dec 1, 2023
3 checks passed
@DesiPilla DesiPilla deleted the add-active-status-to-player branch December 1, 2023 18:33
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.

None yet

3 participants