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

Fix issues pulling default NBA year for 2020 #481

Merged
merged 1 commit into from
Sep 28, 2020

Conversation

roclark
Copy link
Owner

@roclark roclark commented Sep 27, 2020

Given the lengthy delays to the NBA season in 2020, attempting to pull the NBA modules towards the end of the calendar year throws off the logic as the default logic assumes the next season is either getting ready to start or is already underway. In 2020, however, this has not yet happened, and an HTTPError will be thrown while attempting to pull the stats without specifying the year. By doing a one-off check for 2020, a handler can be made to identify whether or not the next season has started yet. This will only be applicable for the second half of 2020, and can be removed at a later date.

Fixes #464

Signed-Off-By: Robert Clark robdclark@outlook.com

@roclark roclark added the bug Something isn't working label Sep 27, 2020
@roclark roclark added this to the Release 0.6.0 milestone Sep 27, 2020
@roclark roclark self-assigned this Sep 27, 2020
@codecov
Copy link

codecov bot commented Sep 27, 2020

Codecov Report

Merging #481 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #481   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files          55       55           
  Lines       13006    13023   +17     
=======================================
+ Hits        13003    13020   +17     
  Misses          3        3           
Impacted Files Coverage Δ
sportsreference/nba/nba_utils.py 100.00% <100.00%> (ø)
sportsreference/nba/roster.py 100.00% <100.00%> (ø)
sportsreference/nba/schedule.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46f75b0...2a3be27. Read the comment docs.

Given the lengthy delays to the NBA season in 2020, attempting to pull
the NBA modules towards the end of the calendar year throws off the
logic as the default logic assumes the next season is either getting
ready to start or is already underway. In 2020, however, this has not
yet happened, and an HTTPError will be thrown while attempting to pull
the stats without specifying the year. By doing a one-off check for
2020, a handler can be made to identify whether or not the next season
has started yet. This will only be applicable for the second half of
2020, and can be removed at a later date.

Signed-Off-By: Robert Clark <robdclark@outlook.com>
@roclark roclark merged commit db00e1c into master Sep 28, 2020
@roclark roclark deleted the fix-nba-default-season-2020 branch September 28, 2020 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Teams() giving http error
1 participant