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

Skip NCAAB teams without stat pages #366

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

roclark
Copy link
Owner

@roclark roclark commented Apr 1, 2020

In 2010 and earlier years, some NCAAB teams, such as Bryant University, made the transition from Division-II or lower to Division-I basketball. This caused an issue on the website as sometimes those teams would be displayed in the overall school stats, but they would not have their own standalone stats page specific to their school. This would prevent the code from parsing the team's conference and other stats, and would throw an error while attempting to instantiate the team. Doing a simple check to see if the team exists in the conference dataset prior to checking instantiating the team mitigates this issue.

Fixes #365

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

In 2010 and earlier years, some NCAAB teams, such as Bryant University,
made the transition from Division-II or lower to Division-I basketball.
This caused an issue on the website as sometimes those teams would be
displayed in the overall school stats, but they would not have their own
standalone stats page specific to their school. This would prevent the
code from parsing the team's conference and other stats, and would throw
an error while attempting to instantiate the team. Doing a simple check
to see if the team exists in the conference dataset prior to checking
instantiating the team mitigates this issue.

Signed-Off-By: Robert Clark <robdclark@outlook.com>
@roclark roclark added the bug Something isn't working label Apr 1, 2020
@roclark roclark added this to the Release 0.5.1 milestone Apr 1, 2020
@roclark roclark self-assigned this Apr 1, 2020
@codecov
Copy link

codecov bot commented Apr 1, 2020

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #366    +/-   ##
========================================
  Coverage   99.97%   99.97%            
========================================
  Files          48       48            
  Lines       10549    10692   +143     
========================================
+ Hits        10546    10689   +143     
  Misses          3        3            
Impacted Files Coverage Δ
sportsreference/ncaab/teams.py 100.00% <100.00%> (ø)
sportsreference/ncaaf/roster.py 100.00% <0.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 6f1f0d9...79bf383. Read the comment docs.

@roclark roclark merged commit 64e1214 into master Apr 1, 2020
@roclark roclark deleted the patch/fix-ncaab-index-error-for-older-teams branch April 1, 2020 16:59
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.

Key Error
1 participant